Skip to content

Commit 5094a45

Browse files
committed
Use gpg-agent for signing
1 parent 5568a74 commit 5094a45

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

plugin/build.gradle.kts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,28 @@ gradlePlugin {
2626
}
2727
}
2828

29-
signing { setRequired { gradle.taskGraph.hasTask(":plugin:publishPlugins") } }
29+
signing { useGpgCmd() }
3030

3131
ktfmt {
3232
kotlinLangStyle()
3333
maxWidth.set(100)
3434
removeUnusedImports.set(true)
3535
}
3636

37+
val codeSigningEnabled =
38+
providers
39+
.gradleProperty("mullvad.rust-android-gradle.codeSigningEnabled")
40+
.map { it.toBoolean() }
41+
.orElse(false)
42+
43+
tasks.withType<Sign>().configureEach {
44+
val signingEnabledProvider = codeSigningEnabled
45+
46+
onlyIf("signing is enabled") {
47+
signingEnabledProvider.get()
48+
}
49+
}
50+
3751
val versionProperties =
3852
Properties().apply { load(FileInputStream("${rootProject.projectDir}/version.properties")) }
3953

0 commit comments

Comments
 (0)