Skip to content

Commit 15b7340

Browse files
Addressed the review comment related to signing the release.
1 parent e93518f commit 15b7340

3 files changed

Lines changed: 15 additions & 5 deletions

File tree

build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ subprojects {
3030
if (project.hasProperty('android')) {
3131
project.android {
3232
if (namespace == null) {
33-
namespace project.group
33+
throw new GradleException(
34+
"Module '${project.name}' is missing an explicit namespace declaration. " +
35+
"Please add 'namespace' to the android {} block in ${project.buildFile.name}"
36+
)
3437
}
3538
}
3639
}

kit-plugin/src/main/groovy/com/mparticle/kits/KitPlugin.groovy

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,18 @@ class KitPlugin implements Plugin<Project> {
140140
}
141141

142142
target.extensions.configure(SigningExtension) { signing ->
143-
signing.required = { target.gradle.taskGraph.hasTask('publishReleasePublicationToMavenRepository') }
143+
signing.required {
144+
target.gradle.taskGraph.hasTask("publishReleasePublicationToMavenRepository")
145+
}
146+
144147
def signingKey = target.findProperty('signingKey') ?: System.getenv('mavenSigningKeyId')
145148
def signingPassword = target.findProperty('signingPassword') ?: System.getenv('mavenSigningKeyPassword')
149+
146150
if (signingKey && signingPassword) {
147-
signing.useInMemoryPgpKeys(target.property('signingKey'), target.property('signingPassword'))
151+
signing.useInMemoryPgpKeys(signingKey, signingPassword)
152+
signing.sign(target.extensions.getByType(PublishingExtension)
153+
.publications
154+
.findByName("release"))
148155
}
149156
}
150157
}

scripts/maven.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,5 +124,5 @@ afterEvaluate {
124124
}
125125

126126
//Publishing task aliases for simpler local development
127-
task publishLocal { dependsOn "publishDebugPublicationToMavenLocal"}
128-
task publishReleaseLocal { dependsOn "publishReleasePublicationToMavenLocal"}
127+
task publishLocal { dependsOn "publishDebugPublicationToMavenLocal" }
128+
task publishReleaseLocal { dependsOn "publishReleasePublicationToMavenLocal" }

0 commit comments

Comments
 (0)