Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

110 lines (94 sloc) 2.781 kb
// useful example: http://svn.codehaus.org/groovy/branches/GROOVY_1_8_X/gradle/assemble.gradle
apply plugin:"java"
apply plugin:"maven"
apply plugin:"signing"
majorVersion="3"
group="org.kohsuke"
version="3.3.0";
description="ObjectWeb ASM package-renamed to isolate incompatibilities between major versions";
p=project // to avoid name conflict
repositories {
mavenCentral()
}
configurations {
tools
repackage
sourceJar
javadocJar
}
dependencies {
tools "com.googlecode.jarjar:jarjar:1.1"
repackage "com.jolira:asm:${version}"
sourceJar "com.jolira:asm:${version}:sources"
javadocJar "com.jolira:asm:${version}:javadoc"
}
def resolve(name) {
configurations[name].files.iterator().next()
}
def jarjar(task,configName) {
task.doLast {
task.project.ant {
taskdef name: "jarjar", classname: "com.tonicsystems.jarjar.JarJarTask", classpath: configurations.tools.asPath
jarjar(jarfile: task.archivePath) {
configurations[configName].files.each {jar ->
zipfileset(src: jar)
}
rule pattern: "org.objectweb.asm.**", result: p.group+".asm${majorVersion}.@1" // "org.kohsuke.asm${majorVersion}.@1"
}
}
}
}
jar {
jarjar(delegate,"repackage")
}
task renamedSourceJar(type:Jar) {
classifier = "souces"
jarjar(delegate,"sourceJar")
}
task emptyJavadocJar(type:Jar) {
classifier = "javadoc"
}
artifacts {
archives(renamedSourceJar) {
classifier = "sources"
}
archives (resolve("javadocJar")) {
// archives (emptyJavadocJar) {
classifier = "javadoc"
}
}
signing {
sign configurations.archives
}
customizePom = {
pom {
artifactId = "asm${majorVersion}"
name = "asm${majorVersion}"
project {
description = p.description
url = "http://kohsuke.org/";
licenses {
license {
name = "BSD License"
url = "http://asm.ow2.org/license.html"
}
}
developers {
developer {
id = "kohsuke"
}
}
scm {
url = "http://github.com/kohsuke/package-renamed-asm";
}
}
}
}
install.repositories.mavenInstaller(customizePom)
uploadArchives.repositories.mavenDeployer(customizePom)
uploadArchives.repositories.mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/", id:"sonatype-nexus-staging") {
authentication(userName:"kohsuke", password:System.getProperty("password"))
}
}
Jump to Line
Something went wrong with that request. Please try again.