diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2021-04-15 14:11:43 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-15 14:11:43 +0530 |
commit | fb7788ba7ee327d3ad51b04d3303e2dd3ef3f88a (patch) | |
tree | 03f64bc2c30f0585012c5a1dc4eb739ac536402b /buildSrc/src/main/java | |
parent | cfbdb5f92ac034f595925fc25c3d0a11e0b3a390 (diff) |
Fix library deployment workflow (#1383)
Diffstat (limited to 'buildSrc/src/main/java')
-rw-r--r-- | buildSrc/src/main/java/PasswordStorePlugin.kt | 5 | ||||
-rw-r--r-- | buildSrc/src/main/java/SigningConfig.kt | 8 |
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) +} |