The release build type reuses the debug signing config, so a downloaded APK installs over an existing one instead of demanding an uninstall. This never goes to Play, which rejects debug keys anyway, so there is no private key worth safeguarding for years and no way to strand anyone on a version that can no longer be updated. That choice is load-bearing in one direction: a release build is not DEBUGGABLE, so adb shell run-as stops reading app data back out, and there is no in-app restore. A signature change would have cost the drill progress. npm run release stages release/404-Layers-<version>.apk with a checksum and verifies the signature, since an unsigned APK builds fine and only fails at install time, on someone else's phone. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
60 lines
2.5 KiB
Groovy
60 lines
2.5 KiB
Groovy
apply plugin: 'com.android.application'
|
|
|
|
android {
|
|
namespace = "dev.ncode.sp404layers"
|
|
compileSdk = rootProject.ext.compileSdkVersion
|
|
defaultConfig {
|
|
applicationId "dev.ncode.sp404layers"
|
|
minSdkVersion rootProject.ext.minSdkVersion
|
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
|
versionCode 1
|
|
versionName "1.0.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:!*~'
|
|
}
|
|
}
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
// Debug key on purpose: this only ever ships as a sideloaded APK, never
|
|
// to Play. Same signature as every build so far, so a release installs
|
|
// over an existing one instead of demanding an uninstall. Using the
|
|
// built-in config keeps the path and password out of this file.
|
|
signingConfig signingConfigs.debug
|
|
}
|
|
}
|
|
}
|
|
|
|
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")
|
|
}
|