mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-21 11:36:05 +00:00
017f229cfc
A switch in the account settings, inside the app on a device that can unlock that way (iOS LocalAuthentication, Android BiometricPrompt with the screen lock as fallback). Turning it on asks once, so nobody locks themselves out. With it on, TREK asks at launch and after half a minute in the background before showing anything, and the app switcher shows a blurred cover (iOS) or no snapshot (Android) instead of the screen. The setting stays on the device, not the account.
68 lines
3.0 KiB
Groovy
68 lines
3.0 KiB
Groovy
apply plugin: 'com.android.application'
|
|
|
|
android {
|
|
namespace = "com.liketrek.trek"
|
|
compileSdk = rootProject.ext.compileSdkVersion
|
|
defaultConfig {
|
|
applicationId "com.liketrek.trek"
|
|
minSdkVersion rootProject.ext.minSdkVersion
|
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
|
// The release workflow (.github/workflows/native-release.yml) passes both:
|
|
// the version from client/package.json and a build number that only grows.
|
|
// Local and PR builds fall back to these placeholders.
|
|
versionCode((project.findProperty('trekVersionCode') ?: '1') as Integer)
|
|
versionName(project.findProperty('trekVersionName') ?: '0.0.0-dev')
|
|
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:!*~'
|
|
}
|
|
}
|
|
// The upload key only exists in the release workflow, which decodes it from a
|
|
// secret and passes its path and passwords as Gradle properties. Every other
|
|
// build (local, fork, PR) stays unsigned and needs no secret.
|
|
signingConfigs {
|
|
release {
|
|
if (project.hasProperty('trekKeystore')) {
|
|
storeFile file(project.property('trekKeystore'))
|
|
storePassword project.property('trekKeystorePassword')
|
|
keyAlias project.property('trekKeyAlias')
|
|
keyPassword project.property('trekKeyPassword')
|
|
}
|
|
}
|
|
}
|
|
buildTypes {
|
|
release {
|
|
if (project.hasProperty('trekKeystore')) {
|
|
signingConfig signingConfigs.release
|
|
}
|
|
minifyEnabled true
|
|
shrinkResources true
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.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 "androidx.browser:browser:$androidxBrowserVersion"
|
|
implementation "androidx.biometric:biometric:1.1.0"
|
|
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'
|