android-wrapper/app/build.gradle

76 lines
2.9 KiB
Groovy
Raw Normal View History

2024-11-11 23:00:13 +01:00
apply plugin: 'com.android.application'
android {
namespace "org.mapcomplete"
compileSdk rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "org.mapcomplete"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
2025-06-30 12:51:58 +00:00
versionCode 5
2025-07-06 20:22:40 +02:00
versionName "debug"
2024-11-11 23:00:13 +01:00
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:!*~'
}
}
2025-04-28 18:00:46 +02:00
signingConfigs {
release {
// Works together with "on_release"_script in the forgejo actions
2025-06-18 18:50:46 +02:00
// Hint: might also be set in .bashrc
// A keys file is needed even for debug :shrug:
storeFile file(System.getenv("storeFile"))
2025-04-29 00:56:43 +02:00
storePassword System.getenv("storePassword")
keyAlias System.getenv("keyAlias")
keyPassword System.getenv("keyPassword")
2025-04-28 18:00:46 +02:00
}
}
2024-11-11 23:00:13 +01:00
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
2025-04-28 18:00:46 +02:00
signingConfig signingConfigs.release
2025-04-28 18:32:31 +02:00
minifyEnabled false
2025-04-28 18:00:46 +02:00
shrinkResources false
2024-11-11 23:00:13 +01:00
}
}
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
}
2024-11-11 23:00:13 +01:00
}
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")
}