Skip to content

Commit

Permalink
task named depends on
Browse files Browse the repository at this point in the history
  • Loading branch information
jdelga committed Dec 5, 2024
1 parent 9a6bc77 commit a872c2b
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions mavencentral.gradle
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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'
}

0 comments on commit a872c2b

Please sign in to comment.