forked from outlaws-bai/Galaxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
108 lines (97 loc) · 3.3 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
104
105
106
107
// from https://github.com/grpc/grpc-java/blob/master/examples/build.gradle
plugins {
id 'java'
id 'com.google.protobuf' version '0.9.4'
id 'com.github.johnrengelman.shadow' version '8.1.1'
}
group = 'org.m2sec'
version = '2.2.9'
def grpcVersion = '1.54.1'
def protobufVersion = '3.24.0'
def protocVersion = protobufVersion
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
}
dependencies {
// annotation
annotationProcessor 'org.projectlombok:lombok:1.18.32'
compileOnly 'org.projectlombok:lombok:1.18.32'
compileOnly "org.apache.tomcat:annotations-api:6.0.53"
// burp
compileOnly 'net.portswigger.burp.extensions:montoya-api:2023.12.1'
// yaml
implementation 'org.yaml:snakeyaml:2.2'
// grpc
runtimeOnly "io.grpc:grpc-netty-shaded:${grpcVersion}"
implementation "io.grpc:grpc-protobuf:${grpcVersion}"
implementation "io.grpc:grpc-stub:${grpcVersion}"
implementation "com.google.protobuf:protobuf-java-util:${protobufVersion}"
// 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'
// cross-language
implementation 'org.openjdk.nashorn:nashorn-core:15.4'
implementation 'org.python:jython-standalone:2.7.3'
// client
implementation 'cn.hutool:hutool-http:5.8.29'
// 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-standalone:2.7.3'
testImplementation 'org.openjdk.nashorn:nashorn-core:15.4'
}
test {
useJUnitPlatform()
}
protobuf {
protoc { artifact = "com.google.protobuf:protoc:${protocVersion}" }
plugins {
grpc { artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}" }
}
generateProtoTasks {
all()*.plugins { grpc {} }
}
}
sourceSets {
main {
java {
srcDirs 'build/generated/source/proto/main/grpc'
srcDirs 'build/generated/source/proto/main/java'
}
}
}
jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
}
shadowJar {
// Not commenting means entering jython into a jar package
//archiveClassifier.set('without-jython')
versionFile.text = version
if (archiveClassifier.get() == 'without-jython') {
dependencies {
exclude(dependency('org.python:jython-standalone:2.7.3'))
}
}
mergeServiceFiles()
}