Improvements in up-to-date checking and use of parallel tests where possible.
This commit is contained in:
@@ -13,22 +13,25 @@ dependencies {
|
||||
task compileJava(overwrite: true, description: 'Compiles AspectJ Source', type: Ajc) {
|
||||
dependsOn processResources
|
||||
sourceSet = sourceSets.main
|
||||
outputs.dir(sourceSet.classesDir)
|
||||
aspectPath = configurations.aspectpath
|
||||
}
|
||||
|
||||
task compileTestJava(overwrite: true, description: 'Compiles AspectJ Test Source', type: Ajc) {
|
||||
dependsOn processTestResources, compileJava, jar
|
||||
sourceSet = sourceSets.test
|
||||
outputs.dir(sourceSet.classesDir)
|
||||
aspectPath = files(configurations.aspectpath, jar.archivePath)
|
||||
}
|
||||
|
||||
class Ajc extends DefaultTask {
|
||||
@Input
|
||||
SourceSet sourceSet
|
||||
|
||||
@Input
|
||||
FileCollection aspectPath
|
||||
|
||||
Ajc() {
|
||||
logging.captureStandardOutput(LogLevel.INFO)
|
||||
}
|
||||
|
||||
@TaskAction
|
||||
def compile() {
|
||||
println "Running ajc ..."
|
||||
@@ -44,4 +47,4 @@ class Ajc extends DefaultTask {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,10 +47,16 @@ dependencies {
|
||||
|
||||
sourceSets.main.compileClasspath += configurations.compileOnly
|
||||
|
||||
System.setProperty('apacheDSWorkDir', "${buildDir}/apacheDSWork")
|
||||
|
||||
test {
|
||||
onlyIf {
|
||||
!project.hasProperty('skipTests')
|
||||
}
|
||||
jvmArgs = ['-ea', '-Xms128m', '-Xmx500m', '-XX:MaxPermSize=128m']
|
||||
jvmArgs = ['-ea', '-Xmx500m']
|
||||
maxParallelForks = guessMaxForks()
|
||||
testReport = false
|
||||
}
|
||||
|
||||
def guessMaxForks() {
|
||||
int processors = Runtime.runtime.availableProcessors()
|
||||
return Math.max(2, (int) (processors / 2))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user