-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
39 lines (32 loc) · 955 Bytes
/
Copy pathbuild.gradle
File metadata and controls
39 lines (32 loc) · 955 Bytes
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
plugins {
id "java-library"
}
version = "1.0.0"
repositories {
mavenCentral()
}
compileJava {
targetCompatibility "21"
sourceCompatibility "21"
}
dependencies {
compileOnly "net.portswigger.burp.extensions:montoya-api:2026.2"
testImplementation "org.junit.jupiter:junit-jupiter:5.10.2"
}
compileJava {
options.compilerArgs << "-Xlint:deprecation"
}
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(null, projectDir).text.trim() ?: "unknown"}
Build-Jdk: ${System.properties["java.version"]}
""".stripIndent().strip()
}
test {
useJUnitPlatform()
}