aboutsummaryrefslogtreecommitdiff
path: root/buildSrc/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'buildSrc/src/main')
-rw-r--r--buildSrc/src/main/java/PasswordStorePlugin.kt5
-rw-r--r--buildSrc/src/main/java/SigningConfig.kt8
2 files changed, 13 insertions, 0 deletions
diff --git a/buildSrc/src/main/java/PasswordStorePlugin.kt b/buildSrc/src/main/java/PasswordStorePlugin.kt
index c250d981..21496f8f 100644
--- a/buildSrc/src/main/java/PasswordStorePlugin.kt
+++ b/buildSrc/src/main/java/PasswordStorePlugin.kt
@@ -16,6 +16,8 @@ import org.gradle.api.plugins.JavaPlugin
import org.gradle.api.tasks.compile.JavaCompile
import org.gradle.kotlin.dsl.getByType
import org.gradle.kotlin.dsl.withType
+import org.gradle.plugins.signing.SigningExtension
+import org.gradle.plugins.signing.SigningPlugin
class PasswordStorePlugin : Plugin<Project> {
@@ -45,6 +47,9 @@ class PasswordStorePlugin : Plugin<Project> {
is KtfmtPlugin -> {
project.extensions.getByType<KtfmtExtension>().configureKtfmt()
}
+ is SigningPlugin -> {
+ project.extensions.getByType<SigningExtension>().configureBuildSigning()
+ }
}
}
}
diff --git a/buildSrc/src/main/java/SigningConfig.kt b/buildSrc/src/main/java/SigningConfig.kt
index eaa7433c..aa612b35 100644
--- a/buildSrc/src/main/java/SigningConfig.kt
+++ b/buildSrc/src/main/java/SigningConfig.kt
@@ -6,6 +6,8 @@
import com.android.build.gradle.internal.dsl.BaseAppModuleExtension
import java.util.Properties
import org.gradle.api.Project
+import org.gradle.kotlin.dsl.provideDelegate
+import org.gradle.plugins.signing.SigningExtension
private const val KEYSTORE_CONFIG_PATH = "keystore.properties"
@@ -30,3 +32,9 @@ internal fun BaseAppModuleExtension.configureBuildSigning(project: Project) {
buildTypes.all { setSigningConfig(signingConfig) }
}
}
+
+internal fun SigningExtension.configureBuildSigning() {
+ val signingKey: String? by project
+ val signingPassword: String? by project
+ useInMemoryPgpKeys(signingKey, signingPassword)
+}