From 00b12ffd9e0b721c5122548ad9cfe823e20c8b09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Grze=C5=9Blowski?= Date: Sun, 27 Oct 2024 19:46:13 +0100 Subject: [PATCH] Configure tasks --- build.gradle | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/build.gradle b/build.gradle index 850664fe..45e710b1 100644 --- a/build.gradle +++ b/build.gradle @@ -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 @@ -165,6 +155,8 @@ prodProjects { publications { mavenJava(MavenPublication) { from components.java + artifact tasks.javadocJar + artifact tasks.sourcesJar pom { name.set(project.name) @@ -218,7 +210,7 @@ prodProjects { } signing { - sign(publishing.publications["mavenJava"]) + sign publishing.publications.mavenJava } }