-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from asciidoctor/maven-central
Maven central
- Loading branch information
Showing
6 changed files
with
124 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ jobs: | |
java: | ||
- '1.8' | ||
- '11.0.5' | ||
- '15' | ||
os: | ||
- ubuntu-latest | ||
- macos-latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
version=2.1.0-SNAPSHOT | ||
version=2.0.1 | ||
sourceCompatibility=1.8 | ||
targetCompatibility=1.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,111 +21,86 @@ ext { | |
buildDate = new SimpleDateFormat('HH:mm:ss.SSSZ').format(buildTimeAndDate) | ||
} | ||
|
||
apply plugin: 'maven-publish' | ||
apply plugin: 'com.jfrog.bintray' | ||
apply plugin: 'de.marcphilipp.nexus-publish' | ||
|
||
def projectArtifactId = 'asciidoctorj-groovy-dsl' | ||
|
||
jar { | ||
manifest { | ||
attributes( | ||
'Built-By': System.properties['user.name'], | ||
'Created-By': System.properties['java.version'] + " (" + System.properties['java.vendor'] + " " + System.getProperty("java.vm.version") + ")", | ||
'Build-Date': project.buildTime, | ||
'Build-Time': project.buildDate, | ||
'Specification-Title': projectArtifactId, | ||
'Specification-Version': project.version, | ||
'Specification-Vendor': 'asciidoctor.org', | ||
'Implementation-Title': projectArtifactId, | ||
'Implementation-Version': project.version, | ||
'Implementation-Vendor': 'asciidoctor.org' | ||
) | ||
} | ||
} | ||
publishing { | ||
publications.create(project.ext.publicationName, MavenPublication) { | ||
|
||
def pomConfig = { | ||
name projectArtifactId | ||
description 'A Groovy DSL that allows to define and register asciidoctor extensions using a DSL' | ||
url 'http://asciidoctor.org' | ||
inceptionYear '2014' | ||
licenses { | ||
license([:]) { | ||
name 'The Apache Software License, Version 2.0' | ||
url 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
distribution 'repo' | ||
} | ||
} | ||
scm { | ||
url 'https://github.com/robertpanzer/asciidoctorj-groovy-dsl' | ||
} | ||
developers { | ||
developer { | ||
id 'mojavelinux' | ||
name 'Dan Allen' | ||
roles { | ||
role 'Asciidoctor Founder and Benevolent Dictator' | ||
role 'Open Source Hero' | ||
} | ||
} | ||
[ | ||
bobbytank42: 'Robert Panzer', | ||
].each { devId, devName -> | ||
developer { | ||
id devId | ||
name devName | ||
roles { | ||
role 'Developer' | ||
from components.java | ||
|
||
pom { | ||
name = project.name | ||
description = project.description | ||
url = 'https://github.com/asciidoctor/asciidoctorj-groovy-dsl' | ||
inceptionYear = '2014' | ||
licenses { | ||
license { | ||
name = 'The Apache Software License, Version 2.0' | ||
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
distribution = 'repo' | ||
} | ||
} | ||
} | ||
} | ||
contributors { | ||
[ | ||
].each { devId, devName -> | ||
contributor { | ||
name devName | ||
roles { | ||
role 'contributor' | ||
} | ||
issueManagement { | ||
system = 'github' | ||
url = 'https://github.com/asciidoctor/asciidoctorj-groovy-dsl/issues' | ||
} | ||
scm { | ||
url = 'https://github.com/asciidoctor/asciidoctorj-groovy-dsl' | ||
} | ||
} | ||
} | ||
} | ||
|
||
afterEvaluate { | ||
publishing { | ||
publications { | ||
mavenCustom(MavenPublication) { | ||
from components.java | ||
artifact sourceJar | ||
setGroupId 'org.asciidoctor' | ||
setArtifactId(projectArtifactId) | ||
pom.withXml { | ||
asNode().children().last() + pomConfig | ||
developers { | ||
developer { | ||
id = 'mojavelinux' | ||
name = 'Dan Allen' | ||
email = '[email protected]' | ||
timezone = '-7' | ||
roles = ['Contributor'] | ||
} | ||
developer { | ||
id = 'robertpanzer' | ||
name = 'Robert Panzer' | ||
email = '[email protected]' | ||
timezone = '1' | ||
roles = ['Contributor'] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
task install(dependsOn: publishToMavenLocal) | ||
|
||
if (!project.hasProperty('bintrayUsername')) ext.bintrayUsername = '' | ||
if (!project.hasProperty('bintrayApiKey')) ext.bintrayApiKey = '' | ||
|
||
bintray { | ||
user = project.bintrayUsername | ||
key = project.bintrayApiKey | ||
|
||
dryRun = project.hasProperty('dryRun') && project.dryRun.toBoolean() | ||
jar { | ||
manifest { | ||
attributes( | ||
'Built-By': System.properties['user.name'], | ||
'Created-By': System.properties['java.version'] + " (" + System.properties['java.vendor'] + " " + System.getProperty("java.vm.version") + ")", | ||
'Build-Date': project.buildTime, | ||
'Build-Time': project.buildDate, | ||
'Specification-Title': projectArtifactId, | ||
'Specification-Version': project.version, | ||
'Specification-Vendor': 'asciidoctor.org', | ||
'Implementation-Title': projectArtifactId, | ||
'Implementation-Version': project.version, | ||
'Implementation-Vendor': 'asciidoctor.org' | ||
) | ||
} | ||
} | ||
|
||
publications = ['mavenCustom'] | ||
pkg { | ||
repo = 'maven' | ||
userOrg = 'asciidoctor' | ||
name = projectArtifactId | ||
desc = 'A Groovy DSL that allows to define and register asciidoctor extensions using a DSL' | ||
licenses = ['Apache-2.0'] | ||
labels = ['groovy', 'asciidoctor'] | ||
publishing { | ||
repositories { | ||
maven { | ||
name = "local" | ||
// change URLs to point to your repos, e.g. http://my.org/repo | ||
def releasesRepoUrl = "${rootProject.buildDir}/repos/releases" | ||
def snapshotsRepoUrl = "${rootProject.buildDir}/repos/snapshots" | ||
url = version.endsWith("SNAPSHOT") ? snapshotsRepoUrl : releasesRepoUrl | ||
} | ||
} | ||
} | ||
|
||
nexusPublishing { | ||
repositories { | ||
sonatype() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
def hasSigningKey = project.hasProperty("signing.keyId") || project.findProperty("signingKey") | ||
if(hasSigningKey && !project.hasProperty('skip.signing')) { | ||
apply plugin: 'signing' | ||
sign(project) | ||
} | ||
void sign(Project project) { | ||
project.signing { | ||
required { project.gradle.taskGraph.hasTask("required") } | ||
def signingKeyId = project.findProperty("signingKeyId") | ||
def signingKey = project.findProperty("signingKey") | ||
def signingPassword = project.findProperty("signingPassword") | ||
if (signingKeyId) { | ||
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword) | ||
} else if (signingKey) { | ||
useInMemoryPgpKeys(signingKey, signingPassword) | ||
} | ||
sign publishing.publications[project.ext.publicationName] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |