Skip to content

Commit 974e3c1

Browse files
committed
Use the 'io.freefair.aspectj' gradle plugin
1 parent 774a2e6 commit 974e3c1

File tree

8 files changed

+17
-151
lines changed

8 files changed

+17
-151
lines changed
+11-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
11
apply plugin: 'io.spring.convention.spring-module'
2-
apply plugin: 'aspectj'
2+
apply plugin: 'io.freefair.aspectj'
33

44
dependencies {
5+
compile "org.aspectj:aspectjrt"
56
compile project(':spring-security-core')
67
compile 'org.springframework:spring-beans'
78
compile 'org.springframework:spring-context'
89
compile 'org.springframework:spring-core'
910

1011
testCompile 'org.springframework:spring-aop'
12+
testAspect sourceSets.main.output
1113
}
14+
15+
sourceSets.main.aspectj.srcDir "src/main/java"
16+
sourceSets.main.java.srcDirs = files()
17+
18+
sourceSets.test.aspectj.srcDir "src/test/java"
19+
sourceSets.test.java.srcDirs = files()
20+
21+
compileAspectj.ajcOptions.outxmlfile = "META-INF/aop.xml"

aspects/src/main/resources/META-INF/aop.xml

-18
This file was deleted.

build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ buildscript {
33
classpath 'io.spring.gradle:spring-build-conventions:0.0.23.RELEASE'
44
classpath "org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion"
55
classpath 'io.spring.nohttp:nohttp-gradle:0.0.2.RELEASE'
6+
classpath "io.freefair.gradle:aspectj-plugin:3.8.4"
67
}
78
repositories {
89
maven { url 'https://repo.spring.io/plugins-snapshot' }

buildSrc/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apply plugin: 'groovy'
1+
apply plugin: 'java'
22

33
repositories {
44
mavenCentral()

buildSrc/src/main/groovy/aspectj/AspectJPlugin.groovy

-126
This file was deleted.

buildSrc/src/main/resources/META-INF/gradle-plugins/aspectj.properties

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apply plugin: 'io.spring.convention.spring-sample'
2-
apply plugin: 'aspectj'
2+
apply plugin: 'io.freefair.aspectj.post-compile-weaving'
33

44
repositories {
55
mavenCentral()
@@ -9,7 +9,7 @@ dependencies {
99
compile project(':spring-security-config')
1010
compile project(':spring-security-core')
1111

12-
aspectpath project(':spring-security-aspects')
12+
aspect project(':spring-security-aspects')
1313

1414
runtime project(':spring-security-aspects')
1515
}

samples/xml/aspectj/spring-security-samples-xml-aspectj.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
apply plugin: 'io.spring.convention.spring-sample-war'
2-
apply plugin: 'aspectj'
2+
apply plugin: 'io.freefair.aspectj.post-compile-weaving'
33

44
dependencies {
55
compile project(':spring-security-core')
66

7-
aspectpath project(':spring-security-aspects')
7+
aspect project(':spring-security-aspects')
88

99
runtime project(':spring-security-aspects')
1010
runtime project(':spring-security-config')

0 commit comments

Comments
 (0)