flotilla/android/app/build.gradle

77 lines
3.1 KiB
Groovy
Raw Normal View History

2024-11-15 23:16:06 +00:00
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
2024-11-15 23:16:06 +00:00
2026-09-18 17:44:35 +00:00
// Release credentials come from the environment so they stay out of the repo and out of the
// process list. Without them the release build is unsigned, which is what Android Studio gets.
def releaseKeystore = System.getenv("ANDROID_KEYSTORE_PATH")
2024-11-15 23:16:06 +00:00
android {
2026-01-23 18:25:06 +00:00
namespace = "social.flotilla"
compileSdk = rootProject.ext.compileSdkVersion
2024-11-15 23:16:06 +00:00
defaultConfig {
applicationId "social.flotilla"
2025-05-07 01:07:30 +00:00
minSdk rootProject.ext.minSdkVersion
targetSdk rootProject.ext.targetSdkVersion
2026-09-25 15:56:54 +00:00
versionCode 55
versionName "1.11.2"
2024-11-15 23:16:06 +00: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
2026-01-23 18:25:06 +00:00
ignoreAssetsPattern = '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
2024-11-15 23:16:06 +00:00
}
}
2026-09-18 17:44:35 +00:00
signingConfigs {
release {
if (releaseKeystore) {
storeFile file(releaseKeystore)
storePassword System.getenv("ANDROID_KEYSTORE_PASSWORD")
keyAlias System.getenv("ANDROID_KEYSTORE_ALIAS")
keyPassword System.getenv("ANDROID_KEYSTORE_ALIAS_PASSWORD")
}
}
}
2024-11-15 23:16:06 +00:00
buildTypes {
release {
2026-09-18 17:44:35 +00:00
if (releaseKeystore) {
signingConfig signingConfigs.release
}
2024-11-15 23:16:06 +00:00
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.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.work:work-runtime:2.10.3"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "com.squareup.okhttp3:okhttp:4.12.0"
implementation "fr.acinq.secp256k1:secp256k1-kmp-jni-android:0.22.0"
2024-11-15 23:16:06 +00:00
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")
}