-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
84 lines (69 loc) · 2.34 KB
/
build.gradle
File metadata and controls
84 lines (69 loc) · 2.34 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
plugins {
id 'java'
id 'application'
id "net.ltgt.errorprone" version "3.0.1"
id "com.github.johnrengelman.shadow" version "7.1.2"
}
application {
mainClass = 'com.nsocks.Socks5Server'
}
compileJava {
options.compilerArgs << '-parameters'
}
compileTestJava {
options.compilerArgs << '-parameters'
}
sourceCompatibility = '15'
targetCompatibility = '15'
sourceSets {
main { java { srcDir 'src/main' } }
test { java { srcDir 'src/test' } }
}
repositories {
mavenCentral()
}
dependencies {
annotationProcessor "org.immutables:value:2.9.2"
implementation "org.slf4j:slf4j-api:1.7.+"
implementation "ch.qos.logback:logback-classic:1.2.+"
implementation 'io.netty:netty-all:4.1.60.Final'
implementation 'com.google.code.findbugs:jsr305:3.0.2'
implementation 'com.google.guava:guava:31.1-jre'
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation 'com.google.guava:guava-testlib:31.1-jre'
implementation 'commons-cli:commons-cli:1.5.0'
implementation 'org.bouncycastle:bcpkix-jdk15on:1.65'
implementation "org.immutables:value-annotations:2.9.2" // or implementation, or compileOnly
testImplementation 'junit:junit:4.13'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.1'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.9.1'
testImplementation 'org.mockito:mockito-all:1.10.19'
annotationProcessor "com.uber.nullaway:nullaway:0.7.9"
compileOnly "com.google.code.findbugs:jsr305:3.0.2"
errorprone "com.google.errorprone:error_prone_core:2.10.0"
errorproneJavac "com.google.errorprone:javac:9+181-r4173-1"
}
test {
useJUnitPlatform()
}
import net.ltgt.gradle.errorprone.CheckSeverity
tasks.withType(JavaCompile) {
// remove the if condition if you want to run NullAway on test code
if (!name.toLowerCase().contains("test")) {
options.errorprone {
excludedPaths.set("$buildDir/generated/sources/.*")
check("NullAway", CheckSeverity.ERROR)
option("NullAway:AnnotatedPackages", "com.nsocks")
}
} else {
options.errorprone {
check("DoNotMock", CheckSeverity.WARN)
}
}
}
shadowJar { manifest { attributes 'Main-Class': 'com.nsocks.Socks5Server' } }
jar {
manifest {
attributes 'Main-Class': 'com.nsocks.Socks5Server'
}
}