-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
51 lines (44 loc) · 1.36 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
plugins {
id 'java-library' //distinguishes between api and implementation
id 'maven-publish'
id 'io.freefair.aspectj' version '8.11'
}
group 'net.scoreworks'
version '1.1.0'
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
repositories {
mavenCentral()
}
//this tells the ajc compiler to apply aspect to classes in these directories
//aspect itself must remain in src/main/aspectj folder
sourceSets.main.aspectj.srcDir "src/main/java"
sourceSets.main.java.srcDirs = files()
sourceSets.test.aspectj.srcDir "src/test/java"
sourceSets.test.java.srcDirs = files()
dependencies {
implementation group: 'org.aspectj', name: 'aspectjrt', version: '1.9.22'
//necessary dependencies included in .jar
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'
implementation 'org.apache.commons:commons-collections4:4.4'
implementation group: 'org.jetbrains', name: 'annotations', version: '21.0.1'
//unit testing
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.0'
}
test {
useJUnitPlatform()
}
//provide .java classes in sources.jar
java {
withSourcesJar()
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}