ThreadCount Community edition

Uniform stock management for healthcare linen rooms. Licensed under the GNU AGPL v3.
This commit is contained in:
ThreadCount
2026-09-13 08:45:19 +10:00
commit 1bc2de655a
505 changed files with 56223 additions and 0 deletions
+101
View File
@@ -0,0 +1,101 @@
# Using Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore
# Built application files
*.apk
*.aar
*.ap_
*.aab
# Files for the ART/Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
out/
# Uncomment the following line in case you need and you don't have the release build type files in your app
# release/
# Gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
# Android Studio Navigation editor temp files
.navigation/
# Android Studio captures folder
captures/
# IntelliJ
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
# Android Studio 3 in .gitignore file.
.idea/caches
.idea/modules.xml
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
.idea/navEditor.xml
# Keystore files
# Uncomment the following lines if you do not want to check your keystore files in.
#*.jks
#*.keystore
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
.cxx/
# Google Services (e.g. APIs or Firebase)
# google-services.json
# Freeline
freeline.py
freeline/
freeline_project_description.json
# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md
# Version control
vcs.xml
# lint
lint/intermediates/
lint/generated/
lint/outputs/
lint/tmp/
# lint/reports/
# Android Profiling
*.hprof
# Cordova plugins for Capacitor
capacitor-cordova-android-plugins
# Copied web assets
app/src/main/assets/public
# Generated Config files
app/src/main/assets/capacitor.config.json
app/src/main/assets/capacitor.plugins.json
app/src/main/res/xml/config.xml
+2
View File
@@ -0,0 +1,2 @@
/build/*
!/build/.npmkeep
+108
View File
@@ -0,0 +1,108 @@
apply plugin: 'com.android.application'
// Release signing. The keystore and its password live in ~/threadcount-keys, outside the repo —
// nothing secret is ever committed. Without either file the release build is simply unsigned, so a
// fresh clone still builds.
//
// staff-keystore.properties wins if it exists, so this app can be given its own upload key later
// without touching the build; until then it shares the counter app's, which is what Play expects
// anyway — with Play App Signing the upload key only authenticates the upload, and two listings
// from one publisher sharing one is ordinary. Splitting them is a decision worth making
// deliberately, not by default.
def keystoreProps = new Properties()
def staffKeys = file("${System.getProperty('user.home')}/threadcount-keys/staff-keystore.properties")
def sharedKeys = file("${System.getProperty('user.home')}/threadcount-keys/keystore.properties")
def keystorePropsFile = staffKeys.exists() ? staffKeys : sharedKeys
if (keystorePropsFile.exists()) {
keystorePropsFile.withInputStream { keystoreProps.load(it) }
}
android {
namespace "tech.threadcount.staff"
compileSdk rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "tech.threadcount.staff"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
// Play permanently reserves a version code the moment a bundle is ingested, even into a
// discarded draft — it can never be reused. Bump this for EVERY upload, not every release.
// 1 was spent on the first bundle, before the sign-in rework, app links and the video.
// 2 was uploaded before the sign-out fixes. Play keeps a code the moment it ingests a
// bundle, so neither can ever be reused.
versionCode 7
versionName "1.2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
aaptOptions {
ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
}
}
signingConfigs {
release {
if (keystoreProps['storeFile']) {
storeFile file(keystoreProps['storeFile'])
storePassword keystoreProps['storePassword']
keyAlias keystoreProps['keyAlias']
keyPassword keystoreProps['keyPassword']
}
}
}
buildTypes {
release {
if (keystoreProps['storeFile']) {
signingConfig signingConfigs.release
}
// R8 shrinks and obfuscates, and Gradle folds the resulting mapping.txt into the
// bundle, which is what lets Play symbolicate a stack trace instead of showing
// a.b.c(). Capacitor ships its plugin keep-rules as consumerProguardFiles, so the
// classes the bridge loads reflectively survive; proguard-rules.pro pins the rest.
//
// Resource shrinking is deliberately left off, as in the counter app: the bundled
// splash and welcome are plain files under assets/, which resource shrinking never
// inspects, so it would trade a real risk for almost no bytes.
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
// This app ships no native code at all — the barcode scanner and its MLKit/CameraX
// .so files are stripped out by scripts/build-staff-aab.sh before the build. The
// block stays so that the day it does, the symbols go with it without anyone having
// to remember.
ndk {
debugSymbolLevel 'FULL'
}
}
}
// Devices from Android 15 can run 16 KB memory pages, and Play refuses uploads whose native
// libraries are only 4 KB-aligned. Uncompressed + page-aligned .so files satisfy both.
packaging {
jniLibs {
useLegacyPackaging false
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}
repositories {
flatDir{
dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion"
// WebViewCompat / WebViewFeature, for MainActivity.giveTheSiteTheBridge(). The Capacitor
// module has this as an implementation dependency, which does not reach this module.
implementation "androidx.webkit:webkit:$androidxWebkitVersion"
implementation project(':capacitor-android')
testImplementation "junit:junit:$junitVersion"
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
implementation project(':capacitor-cordova-android-plugins')
}
apply from: 'capacitor.build.gradle'
+21
View File
@@ -0,0 +1,21 @@
// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}
apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
dependencies {
implementation project(':capacitor-mlkit-barcode-scanning')
implementation project(':capacitor-browser')
implementation project(':capacitor-haptics')
}
if (hasProperty('postBuildExtras')) {
postBuildExtras()
}
+34
View File
@@ -0,0 +1,34 @@
# R8 rules for the ThreadCount Staff shell.
#
# Capacitor's own AAR already contributes consumerProguardFiles that keep anything extending
# com.getcapacitor.Plugin and the @CapacitorPlugin / @PluginMethod members. These rules cover the
# things that sit outside that net — everything the bridge, the WebView or the manifest reaches by
# name rather than by a reference R8 can see.
#
# This app carries no plugins at all: scripts/build-staff-aab.sh strips the barcode scanner and
# haptics out of the generated gradle files and empties assets/capacitor.plugins.json after every
# sync, so there is nothing here to keep for them. Rules naming those packages were inherited from
# the counter app's copy and matched nothing.
# The bridge, its WebView plumbing, and the annotations that drive plugin dispatch.
-keep class com.getcapacitor.** { *; }
-keep interface com.getcapacitor.** { *; }
-keep @interface com.getcapacitor.** { *; }
# Anything the WebView calls from JavaScript. proguard-android.txt carries this rule too; it is
# repeated here because losing it silently breaks every call from the page into the app.
-keepclassmembers class * {
@android.webkit.JavascriptInterface <methods>;
}
# The activity is named in AndroidManifest.xml, and it subclasses BridgeWebViewClient to keep the
# back button honest and to follow an approval link into the right page.
-keep class tech.threadcount.staff.** { *; }
# Keep source file and line numbers in stack traces, and tell Play's symbolicator where to look.
# Without these a crash report names the class but not the line that threw.
-keepattributes SourceFile,LineNumberTable
-renamesourcefileattribute SourceFile
# Annotations drive both Capacitor's dispatch and AndroidX's lifecycle wiring.
-keepattributes *Annotation*,Signature,InnerClasses,EnclosingMethod
@@ -0,0 +1,26 @@
package com.getcapacitor.myapp;
import static org.junit.Assert.*;
import android.content.Context;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
import org.junit.Test;
import org.junit.runner.RunWith;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.getcapacitor.app", appContext.getPackageName());
}
}
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:allowBackup="false"
android:enableOnBackInvokedCallback="true"
android:fullBackupContent="false"
android:dataExtractionRules="@xml/data_extraction_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
android:name=".MainActivity"
android:screenOrientation="portrait"
android:label="@string/title_activity_main"
android:theme="@style/AppTheme.NoActionBarLaunch"
android:launchMode="singleTask"
android:exported="true">
<meta-data android:name="android.app.shortcuts" android:resource="@xml/shortcuts" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<!-- The whole approval flow arrives by email. Without this, tapping "Approve" in a
manager's inbox opens Chrome rather than the app they installed. Scoped to /my
only: the marketing site and the linen room's own /app must keep opening in a
browser. -->
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="threadcount.tech" android:pathPrefix="/my" />
</intent-filter>
</activity>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths"></meta-data>
</provider>
</application>
<!-- Permissions -->
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
@@ -0,0 +1,217 @@
package tech.threadcount.staff;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.webkit.WebResourceRequest;
import android.webkit.WebResourceResponse;
import android.webkit.WebView;
import androidx.activity.OnBackPressedCallback;
import androidx.webkit.WebViewCompat;
import androidx.webkit.WebViewFeature;
import com.getcapacitor.Bridge;
import com.getcapacitor.BridgeActivity;
import com.getcapacitor.BridgeWebViewClient;
import com.getcapacitor.JSExport;
import com.getcapacitor.PluginHandle;
import java.lang.reflect.Field;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
/**
* Back navigation.
*
* Capacitor 6 leaves the back button alone, and nothing else was handling it, so back finished the
* activity from wherever you were standing: halfway through a request, one back gesture and the
* app was gone. Here back walks the WebView's history instead — which includes the app's own
* client-side routing — and only leaves the app once there is nothing left to go back to.
*
* The callback's enabled flag is kept in step with canGoBack() rather than left permanently on,
* because Android 13+ reads that flag before the gesture starts to decide whether to animate. With
* it accurate, a back gesture at the root peels the app away to reveal the home screen (predictive
* back, switched on by android:enableOnBackInvokedCallback in the manifest); anywhere else it
* stays put and moves the app back one screen.
*
* Links into the app.
*
* The manifest claims https://threadcount.tech/my with autoVerify, and the launcher shortcuts are
* VIEW intents on three deeper pages, so Android hands this activity a URL rather than a bare
* launch. Nothing read it: Capacitor keeps it in Bridge.intentUri and only ever hands it out
* through the @capacitor/app plugin, which this app does not carry — so a manager tapping
* "Approve" in their email landed on the /my home screen with the token dropped, and the three
* shortcuts all opened the same page. Reading the intent here is a dozen lines against a plugin,
* an npm dependency and the plugin-stripping this app's build script already has to do.
*
* Both entry points matter: onCreate for a cold start, onNewIntent because launchMode is
* singleTask, so a tap while the app is in the background resumes this instance and delivers the
* URL there instead — which is the case that made the email link look completely dead.
*/
public class MainActivity extends BridgeActivity {
/** The one host this app will follow a link into, and the one path prefix it owns. */
private static final String SITE_HOST = "threadcount.tech";
private static final String STAFF_PATH = "/my";
/** Set on an intent once its link has been opened, so it is only ever followed once. */
private static final String FOLLOWED = "tech.threadcount.staff.LINK_FOLLOWED";
private OnBackPressedCallback back;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// A device with no WebView never gets a bridge; there is nothing to navigate.
if (getBridge() == null) return;
back = new OnBackPressedCallback(false) {
@Override
public void handleOnBackPressed() {
WebView web = getBridge().getWebView();
if (web != null && web.canGoBack()) {
web.goBack();
} else {
// Nothing left in this WebView: hand the gesture back to the system.
setEnabled(false);
}
}
};
getOnBackPressedDispatcher().addCallback(this, back);
// pushState, replaceState and ordinary navigations all land here, which is what makes the
// enabled flag above trustworthy in a single-page app.
getBridge().setWebViewClient(new BridgeWebViewClient(getBridge()) {
@Override
public void doUpdateVisitedHistory(WebView view, String url, boolean isReload) {
super.doUpdateVisitedHistory(view, url, isReload);
syncBack(view);
}
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
super.onPageStarted(view, url, favicon);
syncBack(view);
}
/**
* Capacitor's own version swaps in the bundled "No connection." screen for any main
* frame response that isn't 2xx. That is the wrong diagnosis for most of them: the
* site answered, and its 404 and its branded 500 (which carries the reference someone
* reads out on the phone) are both better pages than a bundled one telling a nurse to
* go and check the ward's wifi. A gateway status is the exception — nothing is
* answering behind the proxy, which is what the offline screen actually describes.
*/
@Override
public void onReceivedHttpError(WebView view, WebResourceRequest request, WebResourceResponse errorResponse) {
int status = errorResponse != null ? errorResponse.getStatusCode() : 0;
if (status == 502 || status == 503 || status == 504) {
super.onReceivedHttpError(view, request, errorResponse);
}
}
});
syncBack(getBridge().getWebView());
giveTheSiteTheBridge();
openLink(getIntent());
}
/**
* Put window.Capacitor on the live site.
*
* The shell opens on its bundled welcome at https://localhost and then hands the WebView to
* threadcount.tech. Capacitor 6 installs its JavaScript bridge with addDocumentStartJavaScript
* scoped to a single origin — the app's own — and, having done that, drops the request-proxy
* path that would otherwise have injected it into pages from the hosts in allowNavigation. So
* every /my page arrived with androidBridge (the message channel is registered for
* allowNavigation hosts too) but no window.Capacitor: the site took itself for a browser, so
* the legal rows promised "a new tab" and loaded the marketing site over the app instead of
* handing it to Chrome through the Browser plugin. Found on a Pixel 8 Pro running the Play
* build, 2026-09-12 — the same defect as the counter app's, fixed the same way.
*
* The identical script Bridge assembles is registered for the site's origin as well. On a
* WebView too old for document-start scripts Capacitor keeps its proxy injector, which already
* covers allowNavigation hosts. The plugin registry is read reflectively (proguard-rules.pro
* keeps com.getcapacitor.** intact); if anything fails the app is exactly as it was before.
*/
private void giveTheSiteTheBridge() {
Bridge bridge = getBridge();
WebView web = bridge == null ? null : bridge.getWebView();
if (web == null) return;
if (!WebViewFeature.isFeatureSupported(WebViewFeature.DOCUMENT_START_SCRIPT)) return;
try {
String script = bridgeScript(bridge);
WebViewCompat.addDocumentStartJavaScript(web, script, Collections.singleton("https://" + SITE_HOST));
Log.i("ThreadCountStaff", "Capacitor bridge registered for https://" + SITE_HOST);
} catch (Exception e) {
Log.e("ThreadCountStaff", "Could not register the Capacitor bridge for https://" + SITE_HOST + "; the site will run as a browser page", e);
}
}
/** Bridge.getJSInjector(), piece for piece, using the public JSExport helpers it calls. */
private String bridgeScript(Bridge bridge) throws Exception {
String globalJS = JSExport.getGlobalJS(this, bridge.getConfig().isLoggingEnabled(), bridge.isDevMode());
String bridgeJS = JSExport.getBridgeJS(this);
String pluginJS = JSExport.getPluginJS(pluginsOf(bridge));
String cordovaJS = JSExport.getCordovaJS(this);
String cordovaPluginsJS = JSExport.getCordovaPluginJS(this);
String cordovaPluginsFileJS = JSExport.getCordovaPluginsFileJS(this);
String localUrlJS = "window.WEBVIEW_SERVER_URL = '" + bridge.getLocalUrl() + "';";
return globalJS + "\n\n" + localUrlJS + "\n\n" + bridgeJS + "\n\n" + pluginJS + "\n\n"
+ cordovaJS + "\n\n" + cordovaPluginsFileJS + "\n\n" + cordovaPluginsJS;
}
@SuppressWarnings("unchecked")
private static Collection<PluginHandle> pluginsOf(Bridge bridge) throws Exception {
Field f = Bridge.class.getDeclaredField("plugins");
f.setAccessible(true);
Map<String, PluginHandle> plugins = (Map<String, PluginHandle>) f.get(bridge);
if (plugins == null || plugins.isEmpty()) throw new IllegalStateException("Bridge has no plugins registered");
return plugins.values();
}
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
openLink(intent);
}
/**
* Navigates the WebView to a link this app owns. Anything else — another host, a path outside
* /my, a plain launch from the icon — is left alone, so the shell's own splash and welcome
* still run.
*/
private void openLink(Intent intent) {
String url = staffUrl(intent);
if (url == null || getBridge() == null) return;
// The launch intent reaches this method twice: BridgeActivity.load() routes it through
// onNewIntent while super.onCreate() is still running, and onCreate follows it again
// afterwards in case a future Capacitor stops doing that. Marking the intent means
// whichever arrives first wins and the other is a no-op, rather than the same page being
// loaded twice. A later tap is a different Intent, so it is followed as it should be.
if (intent.getBooleanExtra(FOLLOWED, false)) return;
intent.putExtra(FOLLOWED, true);
WebView web = getBridge().getWebView();
if (web != null) web.loadUrl(url);
}
private static String staffUrl(Intent intent) {
if (intent == null || !Intent.ACTION_VIEW.equals(intent.getAction())) return null;
Uri uri = intent.getData();
if (uri == null) return null;
if (!"https".equals(uri.getScheme()) || !SITE_HOST.equals(uri.getHost())) return null;
String path = uri.getPath();
if (path == null || !(path.equals(STAFF_PATH) || path.startsWith(STAFF_PATH + "/"))) return null;
return uri.toString();
}
private void syncBack(WebView view) {
if (back != null && view != null) back.setEnabled(view.canGoBack());
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

@@ -0,0 +1,34 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportHeight="108"
android:viewportWidth="108">
<path
android:fillType="evenOdd"
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
android:strokeColor="#00000000"
android:strokeWidth="1">
<aapt:attr name="android:fillColor">
<gradient
android:endX="78.5885"
android:endY="90.9159"
android:startX="48.7653"
android:startY="61.0927"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
android:strokeColor="#00000000"
android:strokeWidth="1" />
</vector>
@@ -0,0 +1,170 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportHeight="108"
android:viewportWidth="108">
<path
android:fillColor="#26A69A"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
</vector>
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<WebView
android:layout_width="match_parent"
android:layout_height="match_parent" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
<!-- Android 13+ themed icons: the launcher tints this layer to the wallpaper. It is the same
mark; the system supplies the colour, so the stepped bars still read. -->
<monochrome android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
<!-- Android 13+ themed icons: the launcher tints this layer to the wallpaper. It is the same
mark; the system supplies the colour, so the stepped bars still read. -->
<monochrome android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 963 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 881 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 963 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Android 12 and later ignore windowBackground for the launch screen and use the SplashScreen
API instead, which is why the app opened on a white rounded launcher icon rather than ink.
Setting the background here makes the very first frame the same ink the bundled splash uses,
and the icon is deliberately a transparent drawable: the bundled splash draws the mark itself,
one bar at a time, and showing it still first and then redrawing it reads as a stutter. -->
<resources>
<style name="AppTheme.NoActionBarLaunch" parent="Theme.SplashScreen">
<item name="windowSplashScreenBackground">@color/tcInk</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/splash_icon</item>
<item name="postSplashScreenTheme">@style/AppTheme.NoActionBar</item>
<item name="android:statusBarColor">@color/tcInk</item>
<item name="android:navigationBarColor">@color/tcInk</item>
<item name="android:windowLightStatusBar">false</item>
</style>
</resources>
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- The brand palette, so the shell around the WebView is never a colour ThreadCount doesn't use. -->
<resources>
<color name="colorPrimary">#201E1D</color>
<color name="colorPrimaryDark">#201E1D</color>
<color name="colorAccent">#EC3013</color>
<color name="tcInk">#201E1D</color>
<color name="tcPaper">#F3F2F2</color>
</resources>
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Ink, where the counter app is paper. This is what tells the two apps
apart on a home screen. -->
<color name="ic_launcher_background">#201E1D</color>
</resources>
@@ -0,0 +1,16 @@
<?xml version='1.0' encoding='utf-8'?>
<resources>
<string name="app_name">ThreadCount Staff</string>
<string name="title_activity_main">ThreadCount Staff</string>
<string name="package_name">tech.threadcount.staff</string>
<string name="custom_url_scheme">tech.threadcount.staff</string>
<!-- Long-press shortcuts. Short labels are what fits under the icon; long labels are what the
launcher shows when it has room. -->
<string name="shortcut_request_short">Request</string>
<string name="shortcut_request_long">Request an item</string>
<string name="shortcut_kit_short">My kit</string>
<string name="shortcut_kit_long">What I\'m holding</string>
<string name="shortcut_shelf_short">Shelf</string>
<string name="shortcut_shelf_long">What\'s on the shelf</string>
</resources>
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="AppTheme.NoActionBar" parent="Theme.AppCompat.DayNight.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:background">@null</item>
</style>
<!-- The launch screen is the ink ground the bundled splash then draws the mark on, so the
hand-off from native to WebView is invisible. Light status bar content, because every
screen the app opens on is ink. -->
<style name="AppTheme.NoActionBarLaunch" parent="Theme.SplashScreen">
<item name="android:background">@drawable/splash</item>
<item name="android:statusBarColor">@color/tcInk</item>
<item name="android:navigationBarColor">@color/tcInk</item>
<item name="android:windowLightStatusBar">false</item>
</style>
</resources>
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Nothing about a signed-in linen room belongs in a Google Drive backup or on a transferred
device: the WebView holds a live session cookie and an unfinished stocktake. A new device
signs in again, which takes ten seconds and is the honest behaviour. -->
<data-extraction-rules>
<cloud-backup>
<exclude domain="root" />
<exclude domain="database" />
<exclude domain="sharedpref" />
<exclude domain="external" />
</cloud-backup>
<device-transfer>
<exclude domain="root" />
<exclude domain="database" />
<exclude domain="sharedpref" />
<exclude domain="external" />
</device-transfer>
</data-extraction-rules>
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<external-path name="my_images" path="." />
<cache-path name="my_cache_images" path="." />
</paths>
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Long-press the icon. The three things a wearer actually opens the app to do, in the order
they do them. Each is a VIEW on the live site, which the app links intent-filter catches, so
they land inside the app rather than a browser. -->
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
<shortcut
android:shortcutId="request"
android:enabled="true"
android:icon="@mipmap/ic_launcher"
android:shortcutShortLabel="@string/shortcut_request_short"
android:shortcutLongLabel="@string/shortcut_request_long">
<intent
android:action="android.intent.action.VIEW"
android:targetPackage="tech.threadcount.staff"
android:targetClass="tech.threadcount.staff.MainActivity"
android:data="https://threadcount.tech/my/request" />
<categories android:name="android.shortcut.conversation" />
</shortcut>
<shortcut
android:shortcutId="kit"
android:enabled="true"
android:icon="@mipmap/ic_launcher"
android:shortcutShortLabel="@string/shortcut_kit_short"
android:shortcutLongLabel="@string/shortcut_kit_long">
<intent
android:action="android.intent.action.VIEW"
android:targetPackage="tech.threadcount.staff"
android:targetClass="tech.threadcount.staff.MainActivity"
android:data="https://threadcount.tech/my/kit" />
</shortcut>
<shortcut
android:shortcutId="shelf"
android:enabled="true"
android:icon="@mipmap/ic_launcher"
android:shortcutShortLabel="@string/shortcut_shelf_short"
android:shortcutLongLabel="@string/shortcut_shelf_long">
<intent
android:action="android.intent.action.VIEW"
android:targetPackage="tech.threadcount.staff"
android:targetClass="tech.threadcount.staff.MainActivity"
android:data="https://threadcount.tech/my/shelf" />
</shortcut>
</shortcuts>
@@ -0,0 +1,18 @@
package com.getcapacitor.myapp;
import static org.junit.Assert.*;
import org.junit.Test;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
}
+29
View File
@@ -0,0 +1,29 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.2.1'
classpath 'com.google.gms:google-services:4.4.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
apply from: "variables.gradle"
allprojects {
repositories {
google()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
+12
View File
@@ -0,0 +1,12 @@
// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
include ':capacitor-android'
project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor')
include ':capacitor-mlkit-barcode-scanning'
project(':capacitor-mlkit-barcode-scanning').projectDir = new File('../node_modules/@capacitor-mlkit/barcode-scanning/android')
include ':capacitor-browser'
project(':capacitor-browser').projectDir = new File('../node_modules/@capacitor/browser/android')
include ':capacitor-haptics'
project(':capacitor-haptics').projectDir = new File('../node_modules/@capacitor/haptics/android')
+22
View File
@@ -0,0 +1,22 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
Binary file not shown.
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Vendored Executable
+248
View File
@@ -0,0 +1,248 @@
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
warn () {
echo "$*"
} >&2
die () {
echo
echo "$*"
echo
exit 1
} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD=$JAVA_HOME/jre/sh/java
else
JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD=java
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@"
+92
View File
@@ -0,0 +1,92 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
+5
View File
@@ -0,0 +1,5 @@
include ':app'
include ':capacitor-cordova-android-plugins'
project(':capacitor-cordova-android-plugins').projectDir = new File('./capacitor-cordova-android-plugins/')
apply from: 'capacitor.settings.gradle'
+28
View File
@@ -0,0 +1,28 @@
ext {
minSdkVersion = 23
// Play requires new uploads to target a recent API. 36 matches the counter app.
compileSdkVersion = 36
targetSdkVersion = 36
androidxActivityVersion = '1.9.3'
androidxAppCompatVersion = '1.7.0'
androidxCoordinatorLayoutVersion = '1.2.0'
androidxCoreVersion = '1.15.0'
androidxFragmentVersion = '1.8.5'
coreSplashScreenVersion = '1.0.1'
androidxWebkitVersion = '1.12.1'
junitVersion = '4.13.2'
androidxJunitVersion = '1.2.1'
androidxEspressoCoreVersion = '3.6.1'
cordovaAndroidVersion = '10.1.1'
// Kept in step with the counter app's pins even though this project builds without the
// barcode scanner: scripts/build-staff-aab.sh strips the plugin after `cap sync`, and if
// that ever stops happening the build should fail loudly on a missing version rather than
// quietly fall back to a CameraX whose .so files are only 4 KB-aligned.
mlkitBarcodeScanningVersion = '17.3.0'
playServicesMlkitBarcodeScanningVersion = '18.3.1'
androidxCameraCamera2Version = '1.4.2'
androidxCameraCoreVersion = '1.4.2'
androidxCameraLifecycleVersion = '1.4.2'
androidxCameraViewVersion = '1.4.2'
}