Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
eval-exec committed Feb 5, 2025
1 parent 620072b commit 761af35
Showing 1 changed file with 9 additions and 21 deletions.
30 changes: 9 additions & 21 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@ configure(subprojects.findAll { it.name != 'tests' }) {
mavenJava(MavenPublication) {
groupId 'org.nervos.ckb'
version '0.0.11'
from components.java
from components.java

beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }


artifact javadocJar
artifact sourcesJar
Expand Down Expand Up @@ -146,26 +149,11 @@ configure(subprojects.findAll { it.name != 'tests' }) {
dependsOn publish
}

signing {
sign publishing.publications.mavenJava

def keyId = project.findProperty('signing.keyId')
def secretKeyRingFile = project.findProperty('signing.secretKeyRingFile')
def password = project.findProperty('signing.password')

if (keyId != null && secretKeyRingFile != null && password != null) {
useInMemoryPgpKeys(keyId, secretKeyRingFile, password)
} else {
throw new GradleException("Signing configuration is incomplete or incorrect.")
}


// required { gradle.taskGraph.hasTask('uploadArchives') }
// only execute as part of this task
// println "start sign"
// sign configurations.archives
// println "sign finish"
}
signing {
required { gradle.taskGraph.hasTask('uploadArchives') }
// only execute as part of this task
sign configurations.archives
}

tasks.register('release') {
println("release ${it.name}")
Expand Down

0 comments on commit 761af35

Please sign in to comment.