super-productivity/android/app/build.gradle
Johannes Millan d71bc0988f 11.1.2
2025-01-10 16:19:52 +01:00

109 lines
3.7 KiB
Groovy

plugins {
id "com.android.application"
id "org.jetbrains.kotlin.android"
}
// Apply the external configuration script
apply from: "config.gradle"
// Load the application configuration properties
def appConfig = loadAppConfig()
// Retrieve the build configuration fields for Debug and Release builds
def debugConfigFields = getBuildConfigFields(appConfig, true)
def releaseConfigFields = getBuildConfigFields(appConfig, false)
android {
defaultConfig {
applicationId "com.superproductivity.superproductivity"
minSdkVersion 24
targetSdkVersion 34
compileSdk 34
versionCode 11_01_02_0000
versionName "11.1.2"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
manifestPlaceholders = [
hostName : "app.super-productivity.com",
defaultUrl : "https://app.super-productivity.com",
launcherName : "Super Productivity",
assetStatements: '[{ "relation": ["delegate_permission/common.handle_all_urls"], ' +
'"target": {"namespace": "web", "site": "https://app.super-productivity.com"}}]'
]
}
// Configure the build types (Debug and Release)
buildTypes {
debug {
// Define each field in BuildConfig for the Debug build
debugConfigFields.each { key, value ->
buildConfigField "String", key, value.toString()
}
}
release {
// Define each field in BuildConfig for the Release build
releaseConfigFields.each { key, value ->
buildConfigField "String", key, value.toString()
}
// signingConfig signingConfigs.release
minifyEnabled false
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
signingConfigs{
release{
storeFile file("../keystore.jks")
storePassword System.getenv("RELEASE_KEYSTORE_PASSWORD")
keyAlias System.getenv("RELEASE_KEYSTORE_ALIAS")
keyPassword System.getenv("RELEASE_KEY_PASSWORD")
}
}
flavorDimensions "version"
productFlavors {
play {
dimension "version"
Properties properties = new Properties()
file("google.properties").withInputStream {
properties.load(it)
}
buildConfigField "String", "CLIENT_ID_WEB", "\"" + properties.webToken + "\""
}
fdroid {
dimension "version"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '17'
}
namespace "com.superproductivity.superproductivity"
}
dependencies {
implementation 'com.squareup.okhttp3:okhttp:4.9.1'
implementation "androidx.appcompat:appcompat:1.5.1"
implementation "com.google.androidbrowserhelper:androidbrowserhelper:2.4.0"
implementation "com.google.code.gson:gson:2.10"
implementation "androidx.core:core-ktx:1.9.0"
implementation 'androidx.lifecycle:lifecycle-process:2.8.6'
implementation 'androidx.preference:preference-ktx:1.2.1'
implementation "com.anggrayudi:storage:1.5.4"
playImplementation "com.google.android.gms:play-services-auth:20.4.0"
implementation project(':capacitor-android')
testImplementation "junit:junit:4.13.2"
androidTestImplementation "androidx.test:rules:1.5.0"
androidTestImplementation "com.android.support.test:runner:1.0.2"
androidTestImplementation "com.android.support.test.espresso:espresso-core:3.0.2"
}
apply from: 'capacitor.build.gradle'