1+ plugins {
2+ id ' java'
3+ }
4+
5+ java {
6+ sourceCompatibility = JavaVersion . VERSION_17
7+ targetCompatibility = JavaVersion . VERSION_17
8+ }
9+
110configurations {
211 ajtools
312 ajcTestImplementation. extendsFrom testCompileClasspath
413 ajcTestRuntimeOnly. extendsFrom testRuntimeClasspath
514 ajc
615}
716
8-
917sourceSets {
1018 ajcTest {
1119 compileClasspath + = main. output + test. output
@@ -21,42 +29,45 @@ sourceSets {
2129 }
2230}
2331
24-
25-
2632compileAjcTestJava {
27-
2833 doLast {
29- ant. taskdef(resource : " org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties" , classpath : configurations. ajtools. asPath)
30- ant. iajc(source : " 1.8" , target : " 1.8" ,
31- destDir : " ${ sourceSets.ajcTest.output.classesDirs.files.first().absolutePath} " , maxmem : " 512m" , fork : " true" ,
32- classpath : " ${ sourceSets.main.output.classesDirs.files.first()absolutePath} ;${ configurations.testCompileClasspath.asPath} " )
33- {
34- sourceroots {
34+ ant. taskdef(
35+ resource : " org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties" ,
36+ classpath : configurations. ajtools. asPath
37+ )
38+ ant. iajc(
39+ source : " 17" , target : " 17" ,
40+ destDir : " ${ sourceSets.ajcTest.output.classesDirs.files.first().absolutePath} " ,
41+ maxmem : " 512m" , fork : " true" ,
42+ classpath : " ${ sourceSets.main.output.classesDirs.files.first().absolutePath} ;${ configurations.testCompileClasspath.asPath} "
43+ ) {
44+ sourceroots {
3545 files(" src/ajcTest/java/com/netflix/hystrix/contrib/javanica/test/aspectj" , " src/test/java/com/netflix/hystrix/contrib/javanica/test/common" , " src/main/java/com/netflix/hystrix/contrib/javanica/aop/aspectj" ). each {
3646 File file -> pathelement(location : file. absolutePath)
37- }
38- }
3947 }
48+ }
49+ }
4050 }
41-
4251}
4352
4453compileAjcJava {
45-
4654 doLast {
47- ant. taskdef(resource : " org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties" , classpath : configurations. ajtools. asPath)
48- ant. iajc(source : " ${ sourceCompatibility} " , target : " ${ targetCompatibility} " ,
49- destDir : " ${ sourceSets.ajc.output.classesDirs.files.first().absolutePath} " , maxmem : " 512m" , fork : " true" , " showWeaveInfo" : " true" ,
50- classpath : " ${ configurations.compileClasspath.asPath} " )
51-
52- {
53- sourceroots {
54- sourceSets. ajc. java. srcDirs. each {
55- pathelement(location : it. absolutePath)
56-
57- }
58- }
55+ ant. taskdef(
56+ resource : " org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties" ,
57+ classpath : configurations. ajtools. asPath
58+ )
59+ ant. iajc(
60+ source : " ${ sourceCompatibility} " , target : " ${ targetCompatibility} " ,
61+ destDir : " ${ sourceSets.ajc.output.classesDirs.files.first().absolutePath} " ,
62+ maxmem : " 512m" , fork : " true" , " showWeaveInfo" : " true" ,
63+ classpath : " ${ configurations.compileClasspath.asPath} "
64+ ) {
65+ sourceroots {
66+ sourceSets. ajc. java. srcDirs. each {
67+ pathelement(location : it. absolutePath)
5968 }
69+ }
70+ }
6071 }
6172}
6273
@@ -71,13 +82,11 @@ task ajcTest(type: Test) {
7182
7283check. dependsOn test, ajcTest
7384
74-
7585ext {
7686 aspectjVersion = ' 1.8.6'
7787 springframeworkVesion = ' 4.3.2.RELEASE'
7888}
7989
80-
8190task ajcJar (type : Jar ) {
8291 archiveFileName = " ${ project.name} " + " -ctw-${ version} .jar"
8392 destinationDirectory = file(" ${ buildDir} /libs" )
0 commit comments