-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Making changes to sign and publish to maven central.
- Loading branch information
1 parent
4f81dd1
commit ef371a7
Showing
2 changed files
with
60 additions
and
27 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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
|
||
plugins { | ||
id 'groovy' | ||
id 'maven-publish' | ||
id "com.jfrog.bintray" version "1.8.4" | ||
id "org.asciidoctor.gradle.asciidoctor" version "1.5.1" | ||
id 'idea' | ||
id 'signing' | ||
id "io.github.gradle-nexus.publish-plugin" version "1.1.0" | ||
} | ||
|
||
// sourceCompatibility has to be placed after applying the Groovy (Java) Plugin: | ||
|
@@ -21,9 +21,8 @@ wrapper { | |
} | ||
|
||
|
||
|
||
repositories { | ||
jcenter() | ||
mavenCentral() | ||
} | ||
|
||
sourceSets { | ||
|
@@ -53,7 +52,6 @@ task sourceJar(type: Jar) { | |
} | ||
|
||
|
||
|
||
ext { | ||
theTitle = 'Groovy Config Writer' | ||
titleForDocumentation = archivesBaseName + ' ' + version | ||
|
@@ -101,7 +99,12 @@ groovydoc { | |
|
||
publishing { | ||
publications { | ||
groovyMaven(MavenPublication) { | ||
maven(MavenPublication) { | ||
|
||
groupId = project.group | ||
artifactId = 'GroovyConfigWriter' | ||
version = project.version | ||
|
||
from components.java | ||
|
||
artifact(sourceJar) { | ||
|
@@ -111,6 +114,30 @@ publishing { | |
artifact jarDoc { | ||
classifier = 'javadoc' | ||
} | ||
|
||
pom { | ||
name = 'Groovy Config Writer' | ||
description = 'This library provides a writer for Groovy base configuration, that can be parsed by the ConfigSlurper.' | ||
url = 'https://github.com/virtualdogbert/groovyConfigWriter' | ||
licenses { | ||
license { | ||
name = 'The Apache License, Version 2.0' | ||
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'virtualdogbert' | ||
name = 'Tucker J. Pelletier' | ||
email = '[email protected]' | ||
} | ||
} | ||
scm { | ||
connection = 'scm:git:git://github.com/virtualdogbert/groovyConfigWriter.git' | ||
developerConnection = 'scm:git:ssh://github.com:virtualdogbert/groovyConfigWriter.git' | ||
url = 'https://github.com/virtualdogbert/groovyConfigWriter/tree/master' | ||
} | ||
} | ||
} | ||
|
||
|
||
|
@@ -127,27 +154,6 @@ artifacts { | |
archives(jarDoc) | ||
} | ||
|
||
|
||
bintray { | ||
|
||
user = getPropertyOrUseDefault("bintrayUser", "fake_user") | ||
key = getPropertyOrUseDefault("bintrayKey", "fake_key") | ||
publications = ['groovyMaven'] | ||
|
||
def projectName = project.name | ||
def projectDescription = project.description | ||
|
||
pkg { | ||
repo = 'maven' | ||
name = 'GroovyConfigWriter' | ||
desc = 'This library provides a writer for Groovy base configuration, that can be parsed buy the ConfigSlurper.' | ||
issueTrackerUrl = "https://github.com/virtualdogbert/GroovyConfigWriter/issues" | ||
vcsUrl = "https://github.com/virtualdogbert/GroovyConfigWriter/" | ||
websiteUrl = "https://virtualdogbert.github.io/GroovyConfigWriter" | ||
licenses = ['Apache-2.0'] | ||
} | ||
} | ||
|
||
String getPropertyOrUseDefault(String propertyName, String defaultValue) { | ||
hasProperty(propertyName) ? getProperty(propertyName) : defaultValue | ||
} | ||
|
@@ -200,3 +206,26 @@ task docs(dependsOn: [asciidoc]) { | |
include '**/*.png' | ||
} | ||
} | ||
|
||
|
||
afterEvaluate { | ||
signing { | ||
//required { gradle.taskGraph.hasTask("publish") || gradle.taskGraph.hasTask("publishMavenPublicationToMavenLocal") } | ||
sign publishing.publications.maven | ||
} | ||
} | ||
|
||
nexusPublishing { | ||
repositories { | ||
sonatype { | ||
def ossUser = System.getenv("SONATYPE_USERNAME") ?: project.hasProperty("sonatypeOssUsername") ? project.sonatypeOssUsername : '' | ||
def ossPass = System.getenv("SONATYPE_PASSWORD") ?: project.hasProperty("sonatypeOssPassword") ? project.sonatypeOssPassword : '' | ||
def ossStagingProfileId = System.getenv("SONATYPE_STAGING_PROFILE_ID") ?: project.hasProperty("sonatypeOssStagingProfileId") ? project.sonatypeOssStagingProfileId : '' | ||
nexusUrl = uri("https://s01.oss.sonatype.org/service/local/") | ||
snapshotRepositoryUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/") | ||
username = ossUser | ||
password = ossPass | ||
stagingProfileId = ossStagingProfileId | ||
} | ||
} | ||
} |
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,4 @@ | ||
signingKeyId="" | ||
signingPassword="" | ||
signingSecretKeyRingFile="" | ||
isReleaseVersion="" |