Files
spring-loaded/springloaded/build.gradle
Andy Clement 0787767b09 Upgrade to asm-5.0.2
This ASM has a different visitMethodInsn() instruction so
there are big changes throughout the code. The tests are running
fine but as new testcases are added related to Java8 we may need
further fixes to take account of the extra isInterface parameter
on visitMethodInsn()
2014-05-15 12:36:13 -07:00

137 lines
3.4 KiB
Groovy

apply plugin: 'maven'
group = "org.springframework"
jar.baseName = 'springloaded'
sourceCompatibility = 1.5
targetCompatibility = 1.5
task writeNewPom << {
def pompom = pom {
project {
inceptionYear '2013'
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
}
};
// Remove junit and asm jar references
pompom.whenConfigured { p ->
p.dependencies.clear()
}
pompom.writeTo("$buildDir/springloaded.pom");
}
compileJava {
options.debug = true
}
configurations {
testCompileOnly
}
task wrapper(type: Wrapper) {
gradleVersion = '1.8'
}
dependencies {
tools 'com.googlecode.jarjar:jarjar:1.3'
compile 'org.ow2.asm:asm:5.0.2'
compile 'org.ow2.asm:asm-tree:5.0.2'
testCompile 'junit:junit:4.11'
testCompileOnly files("../testdata-groovy/groovy-all-1.8.6.jar")
testCompileOnly project(':testdata')
testCompileOnly project(':testdata-aspectj')
testCompileOnly project(':testdata-groovy')
testCompileOnly project(':testdata-java8')
testCompileOnly project(':testdata-plugin')
testCompileOnly project(':testdata-subloader')
testCompileOnly project(':testdata-superloader')
}
sourceSets {
test {
compileClasspath += configurations.testCompileOnly
}
}
test {
jvmArgs "-noverify"
ignoreFailures true
systemProperties["springloaded.tests.useGradleBuildDir"] = true
systemProperties["springloaded.tests.generatedTests"] = System.getProperty("generatedTests", "false")
}
// org.springsource.loaded-VERSION.jar
jar {
from 'LICENSES/LICENSE'
baseName = 'org.springsource.loaded'
}
// org.springsource.loaded-VERSION-sources.jar
task sourcesJar(type: Jar, dependsOn:classes) {
baseName = 'org.springsource.loaded'
classifier = 'sources'
from sourceSets.main.allSource
}
task agentSourcesJar(type: Jar, dependsOn:classes) {
baseName = 'springloaded'
classifier = 'sources'
from sourceSets.main.allSource
}
//task agentjar(type: Jar, dependsOn: [jar,writeNewPom]) {
task agentjar(type: Jar, dependsOn: jar) {
manifest {
from('src/main/java/META-INF/MANIFEST.MF') {
eachEntry { details ->
if (details.key == 'Specification-Version' ||
details.key == 'Implementation-Version') {
details.value = version;
}
}
}
}
inputs.files jar.archivePath
baseName = 'springloaded'
doLast {
project.ant {
taskdef name: "jarjar", classname: "com.tonicsystems.jarjar.JarJarTask", classpath: configurations.tools.asPath
jarjar(jarfile: archivePath, manifest: "$temporaryDir/MANIFEST.MF") {
zipfileset(src: jar.archivePath)
configurations.compile.files.each { jarjarFile ->
zipfileset(src: jarjarFile)
}
rule pattern: "org.objectweb.asm.**", result: "sl.org.objectweb.asm.@1"
}
}
}
}
task javadocJar(type: Jar) {
classifier="javadoc"
from javadoc
}
// add the jars as artifacts
artifacts {
archives sourcesJar
archives agentjar
archives javadocJar
archives agentSourcesJar
}
configurations.archives.artifacts.removeAll(
configurations.archives.allArtifacts.findAll { it.file.toString().indexOf("org.springsource.loaded")!=-1}
)