-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
31 lines (28 loc) · 1.08 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
plugins {
id 'org.springframework.boot' version '2.1.6.RELEASE'
}
apply plugin: 'java'
apply plugin: 'io.spring.dependency-management'
repositories {
mavenCentral()
}
dependencies {
implementation group: 'org.aspectj', name: 'aspectjweaver', version: '1.9.4'
implementation group: 'org.testng', name: 'testng', version: '6.11'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-aop'
implementation 'org.springframework:spring-aspects'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
test {
useTestNG() {
useDefaultListeners = true
testName "UnitTest"
suiteName "UnitTestSuite"
}
configurations.implementation.setCanBeResolved(true)
File springAgent = configurations.implementation.filter { f -> f.name.matches("aspectjweaver.*\\.jar") }.iterator().next();
if (!springAgent.exists())
throw new Exception("Missing aspectjweaver.jar");
println springAgent
jvmArgs += ["-javaagent:" + springAgent.absolutePath] //commenting this line causes test to pass (1 of 3)
}