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.*
|
import java.util.*
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
@ -25,7 +25,8 @@ android {
|
|||||||
applicationId = "de.mm20.launcher2"
|
applicationId = "de.mm20.launcher2"
|
||||||
minSdk = sdk.versions.minSdk.get().toInt()
|
minSdk = sdk.versions.minSdk.get().toInt()
|
||||||
targetSdk = sdk.versions.targetSdk.get().toInt()
|
targetSdk = sdk.versions.targetSdk.get().toInt()
|
||||||
versionCode = versionCodeDate()
|
@SuppressLint("HighAppVersionCode")
|
||||||
|
versionCode = 2023012300
|
||||||
versionName = "1.21.0"
|
versionName = "1.21.0"
|
||||||
signingConfig = signingConfigs.getByName("debug")
|
signingConfig = signingConfigs.getByName("debug")
|
||||||
}
|
}
|
||||||
@ -38,8 +39,6 @@ android {
|
|||||||
isObfuscate = false
|
isObfuscate = false
|
||||||
isOptimizeCode = true
|
isOptimizeCode = true
|
||||||
}
|
}
|
||||||
|
|
||||||
versionNameSuffix = "-" + buildTime()
|
|
||||||
}
|
}
|
||||||
debug {
|
debug {
|
||||||
applicationIdSuffix = ".debug"
|
applicationIdSuffix = ".debug"
|
||||||
@ -47,6 +46,17 @@ android {
|
|||||||
// This somehow seems to resolve that issue.
|
// This somehow seems to resolve that issue.
|
||||||
isDebuggable = false
|
isDebuggable = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
flavorDimensions += "variant"
|
||||||
|
productFlavors {
|
||||||
|
create("default") {
|
||||||
|
dimension = "variant"
|
||||||
|
}
|
||||||
|
create("fdroid") {
|
||||||
|
dimension = "variant"
|
||||||
|
versionNameSuffix = "-fdroid"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
configurations.all {
|
configurations.all {
|
||||||
//Fixes Error: Duplicate class: com.google.common.util.concurrent.ListenableFuture
|
//Fixes Error: Duplicate class: com.google.common.util.concurrent.ListenableFuture
|
||||||
@ -68,16 +78,6 @@ android {
|
|||||||
namespace = "de.mm20.launcher2"
|
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 {
|
dependencies {
|
||||||
implementation(libs.bundles.kotlin)
|
implementation(libs.bundles.kotlin)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user