-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
52 lines (42 loc) · 1.5 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
52
plugins {
id "java-library"
}
version = "2.0.0"
repositories {
mavenCentral()
}
compileJava {
targetCompatibility "21"
sourceCompatibility "21"
options.compilerArgs << "-Xlint:deprecation"
}
configurations {
mockitoAgent
}
dependencies {
compileOnly libs.net.portswigger.burp.extensions.montoya.api
implementation libs.com.google.code.gson.gson
implementation libs.org.scijava.native.lib.loader
testImplementation libs.net.portswigger.burp.extensions.montoya.api
testImplementation libs.org.hamcrest.hamcrest.all
testImplementation libs.org.junit.jupiter
testImplementation libs.org.mockito.mockito.core
testImplementation libs.org.slf4j.slf4j.simple
mockitoAgent(libs.org.mockito.mockito.core) { transitive = false }
}
jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
new File(projectDir, "src/main/resources/version.txt").text = """
Version : ${version}
Build-By : Gradle ${gradle.gradleVersion}
Build-Timestamp : ${java.time.format.DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(LocalDateTime.now())}
Build-Revision : ${"git rev-parse HEAD".execute().text.trim()}
Build-Jdk : ${System.properties["java.version"]}
""".stripIndent().strip()
}
test {
jvmArgs += "-javaagent:${configurations.mockitoAgent.asPath}"
enableAssertions = true
useJUnitPlatform()
}