forked from y0k4i-1337/copy-as-python-aiohttp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
60 lines (48 loc) · 1.73 KB
/
build.gradle.kts
File metadata and controls
60 lines (48 loc) · 1.73 KB
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
53
54
55
56
57
58
59
60
version = "1.1.2"
plugins {
// Apply the java-library plugin for API and implementation separation.
id("java-library")
}
repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
}
dependencies {
// Use JUnit Jupiter for testing.
testImplementation(libs.junit.jupiter)
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
// https://mvnrepository.com/artifact/org.json/json
implementation("org.json:json:20251224")
// Dependency needed to create a new extension
// https://mvnrepository.com/artifact/net.portswigger.burp.extensions/montoya-api
compileOnly("net.portswigger.burp.extensions:montoya-api:2026.2")
// https://mvnrepository.com/artifact/org.apache.httpcomponents.core5/httpcore5
implementation("org.apache.httpcomponents.core5:httpcore5:5.4.1")
}
// Apply a specific Java toolchain to ease working on different environments.
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
tasks.named<Test>("test") {
// Use JUnit Platform for unit tests.
useJUnitPlatform()
}
// Define a task to create a fat jar with all dependencies included
tasks.register<Jar>("fatJar") {
archiveClassifier = "fat"
manifest {
attributes(mapOf("Main-Class" to "burp.BurpExtender", "Implementation-Title" to project.name,
"Implementation-Version" to project.version))
}
from(sourceSets.main.get().output)
dependsOn(configurations.runtimeClasspath)
from({
configurations.runtimeClasspath.get().filter { it.name.endsWith("jar") }.map { zipTree(it) }
})
}
// Ensure the fatJar task runs when the build task is executed
tasks.named("build") {
dependsOn(tasks.named("fatJar"))
}