mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-22 09:58:08 +00:00
Simplify build.gradle
This commit is contained in:
parent
1ea956f5fb
commit
84d380aee5
@ -27,7 +27,7 @@ plugins {
|
||||
}
|
||||
|
||||
val licenseResDir = File("$projectDir/build/dependency-license-res")
|
||||
val debugSuffix = "debugging_edition"
|
||||
val debugSuffix = "debug"
|
||||
|
||||
fun String.runCommand(
|
||||
workingDir: File = File("."),
|
||||
@ -75,23 +75,18 @@ android {
|
||||
androidResources {
|
||||
generateLocaleConfig = true
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
getByName("main") {
|
||||
manifest.srcFile("AndroidManifest.xml")
|
||||
java.setSrcDirs(listOf("src"))
|
||||
resources.setSrcDirs(listOf("resources"))
|
||||
res.setSrcDirs(listOf(licenseResDir, "res"))
|
||||
assets.setSrcDirs(listOf("assets"))
|
||||
setRoot(".") // By default AGP expects all directories under src/main/...
|
||||
java.srcDir("src") // by default is "java"
|
||||
res.setSrcDirs(listOf(licenseResDir, "res")) // add licenseResDir
|
||||
}
|
||||
getByName("debug") {
|
||||
manifest.srcFile("AndroidManifest.xml")
|
||||
java.setSrcDirs(listOf("src"))
|
||||
resources.setSrcDirs(listOf("resources"))
|
||||
res.setSrcDirs(listOf(licenseResDir, "dbg-res"))
|
||||
assets.setSrcDirs(listOf("assets"))
|
||||
res.srcDir("dbg-res")
|
||||
}
|
||||
getByName("test") {
|
||||
java.setSrcDirs(listOf("tests"))
|
||||
java.srcDir("tests")
|
||||
}
|
||||
}
|
||||
|
||||
@ -113,8 +108,8 @@ android {
|
||||
isMinifyEnabled = false
|
||||
isShrinkResources = false
|
||||
signingConfig = signingConfigs.getByName("debug")
|
||||
applicationIdSuffix = ".$debugSuffix"
|
||||
versionNameSuffix = "-$debugSuffix"
|
||||
applicationIdSuffix = ".debug"
|
||||
versionNameSuffix = "-debug"
|
||||
}
|
||||
getByName("release") {
|
||||
isMinifyEnabled = true
|
||||
|
Loading…
x
Reference in New Issue
Block a user