Skip to content

Commit

Permalink
Configure tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
magx2 committed Oct 27, 2024
1 parent 600d00a commit 00b12ff
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -136,26 +136,16 @@ allProjects {

// Maven Central release
prodProjects {
task javadocJar(type: Jar) {
archiveClassifier = 'javadoc'
tasks.register('javadocJar', Jar) {
archiveClassifier.set('javadoc')
from javadoc
}

task sourcesJar(type: Jar) {
archiveClassifier = 'sources'
tasks.register('sourcesJar', Jar) {
archiveClassifier.set('sources')
from sourceSets.main.allSource
}

artifacts {
archives javadocJar, sourcesJar
}

// signing {
// sign configurations.archives
// }

// tasks.withType(Sign)*.enabled = !version.endsWith("SNAPSHOT")

group = project.group
archivesBaseName = project.name
version = project.version
Expand All @@ -165,6 +155,8 @@ prodProjects {
publications {
mavenJava(MavenPublication) {
from components.java
artifact tasks.javadocJar
artifact tasks.sourcesJar

pom {
name.set(project.name)
Expand Down Expand Up @@ -218,7 +210,7 @@ prodProjects {
}

signing {
sign(publishing.publications["mavenJava"])
sign publishing.publications.mavenJava
}
}

Expand Down

0 comments on commit 00b12ff

Please sign in to comment.