diff --git a/mavencentral.gradle b/mavencentral.gradle index 9706a1f..db744a1 100644 --- a/mavencentral.gradle +++ b/mavencentral.gradle @@ -1,20 +1,10 @@ -plugins { - id 'maven-publish' - id 'signing' -} - task androidSourcesJar(type: Jar) { archiveClassifier.set('sources') from android.sourceSets.main.java.srcDirs } -//task publishReleasePublicationToSonatypeRepository { -// dependsOn ':library:signReleasePublication' -//} -// -//task publishNoopPublicationToSonatypeRepository { -// dependsOn ':library:signNoopPublication' -//} +apply plugin: 'maven-publish' +apply plugin: 'signing' artifacts { archives androidSourcesJar @@ -127,3 +117,11 @@ signing { useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword) sign publishing.publications } + +tasks.named('publishReleasePublicationToSonatypeRepository') { task -> + task.dependsOn ':library:signReleasePublication' +} + +tasks.named('publishNoopPublicationToSonatypeRepository') { task -> + task.dependsOn ':library:signNoopPublication' +} \ No newline at end of file