-
-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
44 lines (36 loc) · 1.44 KB
/
build.gradle.kts
File metadata and controls
44 lines (36 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import java.time.LocalDate
import java.util.Properties
plugins {
alias(libs.plugins.multiplatform).apply(false)
alias(libs.plugins.kotlin.jvm).apply(false)
alias(libs.plugins.compose.compiler).apply(false)
alias(libs.plugins.compose).apply(false)
alias(libs.plugins.android.application).apply(false)
alias(libs.plugins.android.kmp.library).apply(false)
alias(libs.plugins.kotlinx.serialization).apply(false)
alias(libs.plugins.buildConfig).apply(false)
alias(libs.plugins.aboutlibraries) apply false
}
val prop by extra(Properties().apply {
val propertiesFile = file("kitshn.properties")
if (propertiesFile.exists()) {
val fileContent = providers.fileContents(layout.projectDirectory.file("kitshn.properties")).asText.orNull
if (fileContent != null) {
load(fileContent.byteInputStream())
}
}
})
val date by extra(LocalDate.now().toString())
val kitshnVersionName by extra("2.1.0")
val kitshnVersionCode by extra(20100)
val kitshnAlternateVersionName by extra("2.1.0")
val kitshnAlternateBuildVersionName by extra(kitshnAlternateVersionName.split(".").run {
this[0] + "." + this[1] + "." + kitshnVersionCode
})
val kitshnAndroidPackageName by extra("de.kitshn.android")
val kitshnDesktopPackageName by extra("kitshn")
val kitshnIsBeta by extra(false)
tasks.register("printKitshnVersionName") {
val printedVersion = kitshnVersionName
doLast { println(printedVersion) }
}