-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build - remove grails publish - it does support nested projects
- Loading branch information
1 parent
5f1430c
commit 3b1fe22
Showing
2 changed files
with
115 additions
and
16 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
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,89 @@ | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'signing' | ||
|
||
ext.set('signing.keyId', project.findProperty('signing.keyId') ?: System.getenv('SIGNING_KEY')) | ||
ext.set('signing.password', project.findProperty('signing.password') ?: System.getenv('SIGNING_PASSPHRASE')) | ||
|
||
def pomInfo = { | ||
delegate.name "Spring Security REST plugin" | ||
delegate.description "Grails plugin to implement token-based, RESTful authentication using Spring Security" | ||
delegate.url "https://github.com/grails/grails-spring-security-rest" | ||
|
||
delegate.licenses { | ||
delegate.license { | ||
delegate.name 'Apache-2.0' | ||
delegate.url 'https://www.apache.org/licenses/LICENSE-2.0.txt' | ||
delegate.distribution 'repo' | ||
} | ||
} | ||
|
||
delegate.scm { | ||
delegate.url "scm:git@github.com:grails/grails-spring-security-rest.git" | ||
delegate.connection "scm:git@github.com:grails/grails-spring-security-rest.git" | ||
delegate.developerConnection "scm:git@github.com:grails/grails-spring-security-rest.git" | ||
} | ||
|
||
delegate.developers { | ||
delegate.developer { | ||
delegate.id 'alvarosanchez' | ||
delegate.name 'Alvaro Sanchez-Mariscal' | ||
} | ||
delegate.developer { | ||
delegate.id 'jameskleeh' | ||
delegate.name 'James Kleeh' | ||
} | ||
delegate.developer { | ||
delegate.id 'jdaugherty' | ||
delegate.name "James Daugherty" | ||
} | ||
} | ||
} | ||
|
||
publishing { | ||
publications { | ||
maven(MavenPublication) { | ||
artifactId = project.name | ||
groupId = project.group | ||
version = project.version | ||
|
||
if(!isProfile) { | ||
from components.java | ||
|
||
artifact sourcesJar | ||
artifact javadocJar | ||
} | ||
|
||
pom.withXml { | ||
def pomNode = asNode() | ||
pomNode.children().last() + pomInfo | ||
} | ||
} | ||
} | ||
|
||
if (isSnapshot) { | ||
repositories { | ||
maven { | ||
credentials { | ||
username = project.findProperty('artifactoryPublishUsername') ?: '' | ||
password = project.findProperty('artifactoryPublishPassword') ?: '' | ||
} | ||
url = isProfile ? | ||
uri('https://repo.grails.org/grails/libs-snapshots-local') : | ||
uri('https://repo.grails.org/grails/plugins3-snapshots-local') | ||
|
||
|
||
} | ||
} | ||
} | ||
} | ||
|
||
afterEvaluate { | ||
signing { | ||
required = { isReleaseVersion && gradle.taskGraph.hasTask('publish') } | ||
sign(publishing.publications.maven) | ||
} | ||
} | ||
|
||
tasks.withType(Sign) { | ||
onlyIf { isReleaseVersion } | ||
} |