8 changed files with 129 additions and 166 deletions
@ -1,94 +0,0 @@ |
|||||||
apply plugin: "maven" |
|
||||||
|
|
||||||
def basePom = { |
|
||||||
project { |
|
||||||
name project.displayName |
|
||||||
packaging 'bundle' |
|
||||||
description project.description |
|
||||||
url 'https://github.com/jayway/JsonPath' |
|
||||||
|
|
||||||
licenses { |
|
||||||
license { |
|
||||||
name "The Apache Software License, Version 2.0" |
|
||||||
url "http://www.apache.org/licenses/LICENSE-2.0.txt" |
|
||||||
distribution "repo" |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
scm { |
|
||||||
url 'scm:git:git://github.com/jayway/JsonPath.git' |
|
||||||
connection 'scm:git:git://github.com/jayway/JsonPath.git' |
|
||||||
developerConnection 'scm:git:git://github.com/jayway/JsonPath.git' |
|
||||||
} |
|
||||||
|
|
||||||
developers { |
|
||||||
developer { |
|
||||||
id 'kalle.stenflo' |
|
||||||
name 'Kalle Stenflo' |
|
||||||
email 'kalle.stenflo (a) gmail.com' |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
def deployers = [] |
|
||||||
|
|
||||||
project.afterEvaluate { |
|
||||||
configure(deployers) { |
|
||||||
pom basePom |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
install { |
|
||||||
deployers << repositories.mavenInstaller |
|
||||||
} |
|
||||||
|
|
||||||
uploadArchives { |
|
||||||
deployers << repositories.mavenDeployer { |
|
||||||
if (snapshotVersion) { |
|
||||||
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") { |
|
||||||
if (project.hasProperty("sonatypeOssUsername")) { |
|
||||||
authentication(userName: sonatypeOssUsername, password: sonatypeOssPassword) |
|
||||||
} |
|
||||||
} |
|
||||||
} else { |
|
||||||
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { |
|
||||||
if (project.hasProperty("sonatypeOssUsername")) { |
|
||||||
authentication(userName: sonatypeOssUsername, password: sonatypeOssPassword) |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
def poms = deployers*.pom |
|
||||||
def optionalDeps = [] |
|
||||||
def providedDeps = [] |
|
||||||
def internalDeps = [] |
|
||||||
|
|
||||||
ext { |
|
||||||
modifyPom = { Closure modification -> |
|
||||||
poms.each { |
|
||||||
it.whenConfigured(modification) |
|
||||||
} |
|
||||||
} |
|
||||||
optional = { optionalDeps << it; it } |
|
||||||
provided = { providedDeps << it; it } |
|
||||||
internal = { internalDeps << it; it } |
|
||||||
} |
|
||||||
|
|
||||||
modifyPom { pom -> |
|
||||||
optionalDeps.each { dep -> |
|
||||||
pom.dependencies.find { it.artifactId == dep.name }.optional = true |
|
||||||
} |
|
||||||
providedDeps.each { dep -> |
|
||||||
pom.dependencies.find { it.artifactId == dep.name }.scope = "provided" |
|
||||||
} |
|
||||||
internalDeps.each { dep -> |
|
||||||
pom.dependencies.removeAll { it.artifactId == dep.name } |
|
||||||
} |
|
||||||
// no need to publish test dependencies |
|
||||||
pom.dependencies.removeAll { it.scope == "test" } |
|
||||||
} |
|
||||||
|
|
||||||
deployers*.beforeDeployment { signing.signPom(it) } |
|
@ -1,5 +1,5 @@ |
|||||||
distributionBase=GRADLE_USER_HOME |
distributionBase=GRADLE_USER_HOME |
||||||
distributionPath=wrapper/dists |
distributionPath=wrapper/dists |
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.2-bin.zip |
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip |
||||||
zipStoreBase=GRADLE_USER_HOME |
zipStoreBase=GRADLE_USER_HOME |
||||||
zipStorePath=wrapper/dists |
zipStorePath=wrapper/dists |
||||||
|
Loading…
Reference in new issue