android-wrapper/app/build.gradle

66 lines
2.5 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
versionCode 2
2025-02-17 00:34:58 +01:00
versionName "0.49.0"
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 {
2025-04-29 00:27:15 +02:00
storeFile file(System.getProperty("user.home") + "/.gradle/release-key.jks")
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
}
}
}
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")
}