Add fdroid flavor
This commit is contained in:
parent
d2d153b18b
commit
014330ce71
@ -1,4 +1,4 @@
|
||||
import java.text.SimpleDateFormat
|
||||
import android.annotation.SuppressLint
|
||||
import java.util.*
|
||||
|
||||
plugins {
|
||||
@ -25,7 +25,8 @@ android {
|
||||
applicationId = "de.mm20.launcher2"
|
||||
minSdk = sdk.versions.minSdk.get().toInt()
|
||||
targetSdk = sdk.versions.targetSdk.get().toInt()
|
||||
versionCode = versionCodeDate()
|
||||
@SuppressLint("HighAppVersionCode")
|
||||
versionCode = 2023012300
|
||||
versionName = "1.21.0"
|
||||
signingConfig = signingConfigs.getByName("debug")
|
||||
}
|
||||
@ -38,8 +39,6 @@ android {
|
||||
isObfuscate = false
|
||||
isOptimizeCode = true
|
||||
}
|
||||
|
||||
versionNameSuffix = "-" + buildTime()
|
||||
}
|
||||
debug {
|
||||
applicationIdSuffix = ".debug"
|
||||
@ -47,6 +46,17 @@ android {
|
||||
// This somehow seems to resolve that issue.
|
||||
isDebuggable = false
|
||||
}
|
||||
|
||||
flavorDimensions += "variant"
|
||||
productFlavors {
|
||||
create("default") {
|
||||
dimension = "variant"
|
||||
}
|
||||
create("fdroid") {
|
||||
dimension = "variant"
|
||||
versionNameSuffix = "-fdroid"
|
||||
}
|
||||
}
|
||||
}
|
||||
configurations.all {
|
||||
//Fixes Error: Duplicate class: com.google.common.util.concurrent.ListenableFuture
|
||||
@ -68,16 +78,6 @@ android {
|
||||
namespace = "de.mm20.launcher2"
|
||||
}
|
||||
|
||||
fun buildTime(): String {
|
||||
val df = SimpleDateFormat("yyyyMMdd")
|
||||
return df.format(Date())
|
||||
}
|
||||
|
||||
fun versionCodeDate(): Int {
|
||||
val df = SimpleDateFormat("yyyyMMdd00")
|
||||
return df.format(Date()).toInt()
|
||||
}
|
||||
|
||||
|
||||
dependencies {
|
||||
implementation(libs.bundles.kotlin)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user