forked from d0ge/sign-saboteur
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
85 lines (74 loc) · 2.43 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
plugins {
id 'java-library'
}
group = 'one.d4d'
version = '1.0.6'
description = 'sign-saboteur'
repositories {
mavenLocal()
mavenCentral()
maven { url = uri('https://www.jetbrains.com/intellij-repository/releases') }
maven { url = uri('https://packages.jetbrains.team/maven/p/ij/intellij-dependencies/') }
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
configurations {
guiGenerationTask
}
dependencies {
guiGenerationTask(
"com.jetbrains.intellij.java:java-compiler-ant-tasks:${gui_designer_version}"
)
compileOnly(
"net.portswigger.burp.extensions:montoya-api:${extender_version}"
)
api(
"com.google.guava:guava:32.1.1-jre",
"com.google.code.gson:gson:2.10.1",
"com.jetbrains.intellij.java:java-gui-forms-rt:${gui_designer_version}",
'com.nimbusds:nimbus-jose-jwt:9.21',
'org.exbin.deltahex:deltahex-swing:0.1.2',
'com.fifesoft:rsyntaxtextarea:3.3.3',
'org.json:json:20231013',
'org.apache.commons:commons-lang3:3.12.0'
)
testImplementation(
"net.portswigger.burp.extensions:montoya-api:${extender_version}",
'org.junit.jupiter:junit-jupiter:5.9.3',
'org.assertj:assertj-core:3.24.2',
'org.mockito:mockito-core:5.3.1'
)
}
tasks.withType(JavaCompile).configureEach {
doLast {
project.sourceSets.main.output.classesDirs.each { project.mkdir(it) }
ant.taskdef name: 'javac2', classname: 'com.intellij.ant.Javac2', classpath: configurations.guiGenerationTask.asPath
ant.javac2 srcdir: project.sourceSets.main.java.srcDirs.join(':'),
classpath: project.sourceSets.main.compileClasspath.asPath,
destdir: project.sourceSets.main.output.classesDirs.getSingleFile(),
source: sourceCompatibility,
target: targetCompatibility,
includeAntRuntime: false
}
}
def integrationTest = tasks.register("integrationTest", Test) {
useJUnitPlatform {
includeTags "slow"
}
shouldRunAfter test
}
test {
useJUnitPlatform {
excludeTags 'slow'
}
}
jar {
dependsOn test
archiveBaseName = project.name
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
}