Platform-v2 step 2.99c. - Both apps on the same current versions: React 19.3.1, react-query 5.107.1, router 7.18.5, axios 1.21.1, zustand 5.1, vite 8.3.8, plugin-react 6.3; manager lucide-react 1.14 -> 1.73, recharts 3.8 -> 3.10. - i18next 27.1.1 + react-i18next 18.0.1 (exact pins). Shared options moved to packages/i18n/src/options.js with returnEmptyString: true (27 shows the key for an empty text otherwise); tests/instance.test.mjs guards it, plus fallback, code casing and plurals. - vite-plugin-pwa 2.0 lists Vite 8 as a peer: .npmrc (legacy-peer-deps) removed, `npm install` resolves without it. - Native (CS-10): @capacitor/core/android/cli 8.6.2, @capacitor/app 8.1.2, @capgo/capacitor-updater 8.54.2; versionCode 2 / versionName 1.1.0 and MIN_SHELL_BUILD 2. capacitor-updater 8.54 refuses plain-HTTP downloads by default, which broke every bundle check in the stacks suite: httpsOnly: false in capacitor.config.json (venues have no domains; zips are sha256-checked). - npm audit: 6 left, all in workbox-build 7.4.1 (build time). Full run-all incl. Android passes (Android re-run after the httpsOnly fix). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
82 lines
3.4 KiB
Groovy
82 lines
3.4 KiB
Groovy
apply plugin: 'com.android.application'
|
|
|
|
// Release signing key lives OUTSIDE the repo (never commit it):
|
|
// %USERPROFILE%\.xenia\keystore.properties (storeFile, storePassword, keyAlias, keyPassword)
|
|
// Override the location with the XENIA_KEYSTORE_PROPS env var. Every APK handed to
|
|
// a venue must be signed with this same key, or phones refuse to install updates.
|
|
def keystorePropsFile = file(System.getenv('XENIA_KEYSTORE_PROPS') ?: "${System.getProperty('user.home')}/.xenia/keystore.properties")
|
|
def keystoreProps = new Properties()
|
|
if (keystorePropsFile.exists()) {
|
|
keystorePropsFile.withInputStream { keystoreProps.load(it) }
|
|
}
|
|
|
|
android {
|
|
namespace = "gr.bonamin.xenia"
|
|
compileSdk = rootProject.ext.compileSdkVersion
|
|
defaultConfig {
|
|
applicationId "gr.bonamin.xenia"
|
|
minSdkVersion rootProject.ext.minSdkVersion
|
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
|
// Bump BOTH for every APK handed out: Android only installs an update over
|
|
// an existing install when versionCode is higher.
|
|
versionCode 2
|
|
versionName "1.1.0"
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
aaptOptions {
|
|
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
|
|
// Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
|
|
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
|
|
} else {
|
|
logger.warn("Xenia: no keystore at ${keystorePropsFile} - release APK will be UNSIGNED")
|
|
}
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
}
|
|
|
|
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"
|
|
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'
|
|
|
|
try {
|
|
def servicesJSON = file('google-services.json')
|
|
if (servicesJSON.text) {
|
|
apply plugin: 'com.google.gms.google-services'
|
|
}
|
|
} catch(Exception e) {
|
|
logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
|
|
}
|