-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.gradle
97 lines (84 loc) · 2.53 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
plugins {
// Apply the application plugin to add support for building a CLI application in Java.
id 'application'
id 'com.github.johnrengelman.shadow' version '7.1.2'
}
repositories {
mavenCentral()
}
application {
// Define the main class for the application.
mainClass = 'passive.signature.ReDoSDetectorTab'
}
// Apply a specific Java toolchain to ease working on different environments.
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
shadowJar {
mergeServiceFiles()
destinationDirectory = file('release')
archiveVersion = "v${release_version_major}"
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
processResources {
filteringCharset = 'UTF-8'
filesMatching ('**/*.properties') {
expand(project.properties)
// naitive2ascii
filter(org.apache.tools.ant.filters.EscapeUnicode)
}
}
clean.doFirst {
delete fileTree('release') {
include '*.jar'
}
}
//jar {
// // Keep jar clean:
// exclude 'META-INF/**', 'about.html', 'module-info.class'
//
// manifest {
// attributes 'Main-Class': mainClassName
// }
//
// from {
// configurations.runtimeClasspath.filter{ it.exists() }.collect { it.isDirectory() ? it : zipTree(it) }
// }
//
// destinationDirectory = file('release')
// archiveVersion = "v${release_version_major}"
//
//}
task release(type: Zip, dependsOn: ['build']) {
archiveBaseName ="${rootProject.name}_v${release_version_major}.${release_version_minor}"
destinationDirectory = file("${projectDir}")
from rootProject.rootDir
include '*'
include 'gradle/**'
include 'image/**'
include 'libs/**'
include 'src/**'
include 'release/**'
exclude 'build'
exclude '.git'
exclude '.gradle'
exclude '*.zip'
}
dependencies {
// https://github.com/raise-isayan/BurpExtensionCommons
implementation fileTree(dir: 'libs', include: ['*.jar'])
// https://mvnrepository.com/artifact/net.portswigger.burp.extensions/montoya-api
implementation 'net.portswigger.burp.extensions:montoya-api:2023.12.1'
//
// UnitTest
// https://mvnrepository.com/artifact/net.portswigger.burp.extender/burp-extender-api
testImplementation 'net.portswigger.burp.extensions:montoya-api:2023.12.1'
// Use JUnit Jupiter for testing.
// https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.3'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.9.3'
}