We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f10c1d5 commit 2d5ca14Copy full SHA for 2d5ca14
1 file changed
build.gradle.kts
@@ -31,14 +31,28 @@ fun getBuildProperty(property: String): String {
31
return "n/a"
32
}
33
34
+fun getBuildSignKey(property: String): String {
35
+ val prop: String? = project.findProperty(property) as String?
36
+ if(prop != null) {
37
+ return prop
38
+ }
39
+
40
+ val env: String? = System.getenv(property)
41
+ if (env != null) {
42
+ return env.replace("\\n", "\n")
43
44
45
+ return "n/a"
46
+}
47
48
fun isReleaseVersion(): Boolean {
49
return !(project.version.toString().endsWith("SNAPSHOT"))
50
51
52
ext {
53
set("publishUser", getBuildProperty("PUBLISH_USER"))
54
set("publishKey", getBuildProperty("PUBLISH_KEY"))
- set("signKey", getBuildProperty("SIGN_KEY"))
55
+ set("signKey", getBuildSignKey("SIGN_KEY"))
56
set("signPwd", getBuildProperty("SIGN_PWD"))
57
58
0 commit comments