-
Notifications
You must be signed in to change notification settings - Fork 60
/
Copy pathbuild.gradle
105 lines (92 loc) · 3.58 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
98
99
100
101
102
103
plugins {
id "java"
id "com.github.johnrengelman.shadow" version "8.1.1"
}
group = "org.m2sec"
def version = "3.3.2"
def optionalHooker = "basic" // all/js/graalpy/basic(default)
def graalVersion = "24.1.0"
def versionFile = file("${projectDir}/src/main/resources/version.txt") as Object
repositories {
// mavenCentral()
maven { url "https://maven.aliyun.com/repository/public" }
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
shadowJar {
archiveClassifier.set(version + "-" + optionalHooker)
// 设置版本文件
versionFile.text = version
// 合并服务文件,避免多个 jar 文件中的 META-INF/services 冲突
mergeServiceFiles()
}
dependencies {
if (optionalHooker == "all") {
// cross-language
implementation "org.graalvm.js:js-language:${graalVersion}"
implementation "org.graalvm.python:python-language:${graalVersion}"
implementation "org.graalvm.python:python-resources:${graalVersion}"
} else if (optionalHooker == "js") {
// cross-language
implementation "org.graalvm.js:js-language:${graalVersion}"
compileOnly "org.graalvm.python:python-language:${graalVersion}"
compileOnly "org.graalvm.python:python-resources:${graalVersion}"
} else if (optionalHooker == "graalpy") {
// cross-language
compileOnly "org.graalvm.js:js-language:${graalVersion}"
implementation "org.graalvm.python:python-language:${graalVersion}"
implementation "org.graalvm.python:python-resources:${graalVersion}"
} else {
// cross-language
implementation "org.graalvm.sdk:graal-sdk:${graalVersion}"
compileOnly "org.graalvm.js:js-language:${graalVersion}"
compileOnly "org.graalvm.python:python-language:${graalVersion}"
compileOnly "org.graalvm.python:python-resources:${graalVersion}"
}
compileOnly 'org.python:jython:2.7.3'
// annotation
annotationProcessor "org.projectlombok:lombok:1.18.32"
compileOnly "org.projectlombok:lombok:1.18.32"
compileOnly "org.apache.tomcat:annotations-api:6.0.53"
// yaml
implementation "org.yaml:snakeyaml:2.2"
// gson
implementation 'com.google.code.gson:gson:2.9.0'
// crypto
compileOnly "org.bouncycastle:bcprov-jdk18on:1.78.1"
// template
implementation "org.apache.commons:commons-text:1.12.0"
// log
implementation "org.slf4j:slf4j-api:2.0.13"
implementation "ch.qos.logback:logback-classic:1.5.6"
// code text area
implementation "com.fifesoft:rsyntaxtextarea:3.4.1"
implementation "com.fifesoft:autocomplete:3.3.1"
// express
implementation "org.mvel:mvel2:2.5.2.Final"
// client
implementation "cn.hutool:hutool-http:5.8.29"
implementation 'org.java-websocket:Java-WebSocket:1.5.7'
// burp
compileOnly "net.portswigger.burp.extensions:montoya-api:2023.12.1"
// test
testAnnotationProcessor "org.projectlombok:lombok:1.18.32"
testImplementation platform("org.junit:junit-bom:5.9.1")
testImplementation "org.junit.jupiter:junit-jupiter"
testImplementation "net.portswigger.burp.extensions:montoya-api:2023.12.1"
testImplementation "org.bouncycastle:bcprov-jdk18on:1.78.1"
testImplementation "org.projectlombok:lombok:1.18.32"
testImplementation "com.fifesoft:rsyntaxtextarea:3.4.1"
testImplementation 'org.python:jython:2.7.3'
}
test {
useJUnitPlatform()
}
jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
}