mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-02-01 11:16:48 +01:00
b655b8be52
Because proper proguard rules weren't added for Attendee and Gson, we can not make changes to the Attendee data class without affecting it's obfuscated Json member names. When serialized using Gson, the resulting json still uses the obfuscated member names
108 lines
3.2 KiB
Plaintext
108 lines
3.2 KiB
Plaintext
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
import org.jetbrains.kotlin.konan.properties.Properties
|
|
import java.io.FileInputStream
|
|
|
|
plugins {
|
|
alias(libs.plugins.android)
|
|
alias(libs.plugins.kotlinAndroid)
|
|
alias(libs.plugins.ksp)
|
|
base
|
|
}
|
|
|
|
base {
|
|
archivesName.set("calendar")
|
|
}
|
|
|
|
val keystorePropertiesFile: File = rootProject.file("keystore.properties")
|
|
val keystoreProperties = Properties()
|
|
if (keystorePropertiesFile.exists()) {
|
|
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
|
|
}
|
|
|
|
android {
|
|
compileSdk = project.libs.versions.app.build.compileSDKVersion.get().toInt()
|
|
|
|
defaultConfig {
|
|
applicationId = libs.versions.app.version.appId.get()
|
|
minSdk = project.libs.versions.app.build.minimumSDK.get().toInt()
|
|
targetSdk = project.libs.versions.app.build.targetSDK.get().toInt()
|
|
versionCode = project.libs.versions.app.version.versionCode.get().toInt()
|
|
versionName = project.libs.versions.app.version.versionName.get()
|
|
multiDexEnabled = true
|
|
vectorDrawables.useSupportLibrary = true
|
|
ksp {
|
|
arg("room.schemaLocation", "$projectDir/schemas")
|
|
}
|
|
}
|
|
|
|
signingConfigs {
|
|
if (keystorePropertiesFile.exists()) {
|
|
register("release") {
|
|
keyAlias = keystoreProperties.getProperty("keyAlias")
|
|
keyPassword = keystoreProperties.getProperty("keyPassword")
|
|
storeFile = file(keystoreProperties.getProperty("storeFile"))
|
|
storePassword = keystoreProperties.getProperty("storePassword")
|
|
}
|
|
}
|
|
}
|
|
|
|
buildFeatures {
|
|
viewBinding = true
|
|
buildConfig = true
|
|
}
|
|
|
|
buildTypes {
|
|
debug {
|
|
applicationIdSuffix = ".debug"
|
|
}
|
|
release {
|
|
isMinifyEnabled = true
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
if (keystorePropertiesFile.exists()) {
|
|
signingConfig = signingConfigs.getByName("release")
|
|
}
|
|
}
|
|
}
|
|
|
|
flavorDimensions.add("variants")
|
|
productFlavors {
|
|
register("core")
|
|
register("fdroid")
|
|
register("prepaid")
|
|
}
|
|
|
|
sourceSets {
|
|
getByName("main").java.srcDirs("src/main/kotlin")
|
|
}
|
|
|
|
compileOptions {
|
|
val currentJavaVersionFromLibs = JavaVersion.valueOf(libs.versions.app.build.javaVersion.get().toString())
|
|
sourceCompatibility = currentJavaVersionFromLibs
|
|
targetCompatibility = currentJavaVersionFromLibs
|
|
}
|
|
|
|
tasks.withType<KotlinCompile> {
|
|
kotlinOptions.jvmTarget = project.libs.versions.app.build.kotlinJVMTarget.get()
|
|
}
|
|
|
|
namespace = libs.versions.app.version.appId.get()
|
|
|
|
lint {
|
|
checkReleaseBuilds = false
|
|
abortOnError = false
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation(libs.simple.mobile.tools.commons)
|
|
implementation(libs.androidx.multidex)
|
|
implementation(libs.androidx.constraintlayout)
|
|
implementation(libs.androidx.swiperefreshlayout)
|
|
implementation(libs.androidx.print)
|
|
implementation(libs.bundles.room)
|
|
ksp(libs.androidx.room.compiler)
|
|
}
|