Release 2.4.3
MODIFY
asciidoctorj-api/build.gradle
asciidoctorj-api/build.gradle
apply plugin: 'biz.aQute.bnd.builder'
-apply plugin: 'de.marcphilipp.nexus-publish'
dependencies {
compileOnly "org.osgi:osgi.annotation:$osgiVersion"
@@ -17,9 +16,3 @@ ext.publicationName = "mavenAsciidoctorJApi"
apply from: rootProject.file('gradle/publish.gradle')
apply from: rootProject.file('gradle/signing.gradle')
-
-publishing {
- publications.findByName(project.ext.publicationName).each {
- it.from(components.java)
- }
-}

MODIFY
asciidoctorj-arquillian-extension/build.gradle
asciidoctorj-arquillian-extension/build.gradle
-apply plugin: 'de.marcphilipp.nexus-publish'
-
dependencies {
compileOnly project(':asciidoctorj')
compile project(':asciidoctorj-test-support')
@@ -20,9 +18,3 @@ project.ext.publicationName = "mavenAsciidoctorJArquillianExtension"
apply from: rootProject.file('gradle/publish.gradle')
apply from: rootProject.file('gradle/signing.gradle')
-
-publishing {
- publications.findByName(project.ext.publicationName).each {
- it.from(rootProject.project('asciidoctorj-arquillian-extension').components.java)
- }
-}

MODIFY
asciidoctorj-core/build.gradle
asciidoctorj-core/build.gradle
@@ -2,6 +2,11 @@ apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'biz.aQute.bnd.builder'
+project.ext.publicationName = "mavenAsciidoctorJ"
+
+apply from: rootProject.file('gradle/publish.gradle')
+apply from: rootProject.file('gradle/signing.gradle')
+
dependencies {
compile project(path: ':asciidoctorj-api')
compile "org.jruby:jruby:$jrubyVersion"
@@ -120,14 +125,5 @@ task pollutedTest(type: Test) {
test.dependsOn pollutedTest
-project.ext.publicationName = "mavenAsciidoctorJ"
-apply from: rootProject.file('gradle/publish.gradle')
-apply from: rootProject.file('gradle/signing.gradle')
-
-publishing {
- publications.findByName(project.ext.publicationName).each {
- it.from(components.java)
- }
-}

MODIFY
asciidoctorj-distribution/build.gradle
asciidoctorj-distribution/build.gradle
@@ -57,9 +57,13 @@ startScripts {
}
project.ext.publicationName = "mavenAsciidoctorJ"
-
-publishing {
- publications.findByName(project.ext.publicationName).each {
- it.artifact(distZip)
+// This module wants to add an artifact to the publication configured for the module asciidoctorj
+// I am unaware right now how to enforce the configuration order, so it could theoretically happen that
+// the publication is not available yet. In that case fail the build and find some other way to fix it...
+def publication = rootProject.project('asciidoctorj').extensions.findByName('publishing').publications.findByName(project.ext.publicationName)
+if (!publication) {
+ throw new ProjectConfigurationException("Publication ${project.ext.publicationName} not configured yet", [])
}
+publication.each {
+ it.artifact distZip
}

MODIFY
asciidoctorj-test-support/build.gradle
asciidoctorj-test-support/build.gradle
@@ -10,3 +10,8 @@ def junitURL = "https://junit.org/junit4/javadoc/latest"
javadoc {
options.links(javaApiUrl, junitURL)
}
+
+ext.publicationName = "mavenAsciidoctorJTestSupport"
+
+apply from: rootProject.file('gradle/publish.gradle')
+apply from: rootProject.file('gradle/signing.gradle')

MODIFY
gradle.properties
gradle.properties
-version=2.4.3-SNAPSHOT
+version=2.4.3
sourceCompatibility=1.8
targetCompatibility=1.8
org.gradle.jvmargs=-XX:MaxMetaspaceSize=512m

MODIFY
gradle/publish.gradle
gradle/publish.gradle
-nexusPublishing {
- repositories {
- sonatype()
- }
-}
+apply plugin: 'de.marcphilipp.nexus-publish'
publishing {
publications.create(project.ext.publicationName, MavenPublication) {
+
+ from components.java
+
pom {
name = project.name
description = project.description
url = 'https://github.com/asciidoctor/asciidoctorj'
+ scm {
+ url = 'https://github.com/asciidoctor/asciidoctorj'
+ }
+
licenses {
license {
name = 'The Apache Software License, Version 2.0'
@@ -81,3 +84,9 @@ publishing {
}
}
+nexusPublishing {
+ repositories {
+ sonatype()
+ }
+}
+

Release 2.4.3