Skip to content

Commit

Permalink
Update publication signature check
Browse files Browse the repository at this point in the history
  • Loading branch information
codlab committed Feb 4, 2024
1 parent a439cc0 commit c2ab917
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ publishing {
}
}

val hasSigningKeyId = listOf("signing.keyId", "signingKeyId")
.mapNotNull { rootProject.getExtraString(it) }.isNotEmpty()

signing {
isRequired = (null != rootProject.getExtraString("signingKeyId"))
isRequired = hasSigningKeyId
sign(publishing.publications)
}
4 changes: 3 additions & 1 deletion configurations/publishing.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ apply plugin: 'signing'

afterEvaluate {

def signingKeyId = rootProject.ext.prop("signingKeyId", null) as String
def signingKeyId = [ "signing.keyId", "signingKeyId"]
.collect { rootProject.ext.prop(it, null) }
.find { null != it} as String

task sourceJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
Expand Down
2 changes: 1 addition & 1 deletion dolbyio.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
def version = 'v1.6.6'
def version = 'v1.7.0'

if (settings.ext.find("DOLBYIO_GRADLE_VERSION_USED")) {
version = DOLBYIO_GRADLE_VERSION_USED
Expand Down

0 comments on commit c2ab917

Please sign in to comment.