77 lines
3 KiB
Groovy
77 lines
3 KiB
Groovy
apply plugin: 'com.android.application'
|
|
|
|
android {
|
|
namespace "org.mapcomplete"
|
|
compileSdk rootProject.ext.compileSdkVersion
|
|
defaultConfig {
|
|
applicationId "org.mapcomplete"
|
|
minSdk 30
|
|
targetSdkVersion targetSdkVersion
|
|
versionCode 9
|
|
versionName "debug"
|
|
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 {
|
|
// Works together with "on_release"_script in the forgejo actions
|
|
// Hint: might also be set in .bashrc
|
|
// A keys file is needed even for debug :shrug:
|
|
storeFile file(System.getenv("storeFile"))
|
|
storePassword System.getenv("storePassword")
|
|
keyAlias System.getenv("keyAlias")
|
|
keyPassword System.getenv("keyPassword")
|
|
}
|
|
}
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
signingConfig signingConfigs.release
|
|
minifyEnabled false
|
|
shrinkResources false
|
|
}
|
|
}
|
|
dependenciesInfo {
|
|
// Disable some metadata to get reproducible builds for F-Droid
|
|
// Disables dependency metadata when building APKs.
|
|
includeInApk = false
|
|
// Disables dependency metadata when building Android App Bundles.
|
|
includeInBundle = false
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
flatDir{
|
|
dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
|
implementation 'androidx.core:core:1.16.0'
|
|
implementation 'androidx.core:core-ktx:1.16.0'
|
|
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")
|
|
}
|