-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
51 lines (40 loc) · 1.06 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
//
// Gradle build for Nearenough
//
// Copyright (c) 2017-2018 int08h LLC. All rights reserved.
//
plugins {
id 'java'
id 'eclipse'
id 'idea'
id "org.sonarqube" version "2.8"
}
repositories {
jcenter()
}
dependencies {
compile 'io.netty:netty-all:4.1.43.Final'
compile 'net.i2p.crypto:eddsa:0.3.0'
testCompile 'junit:junit:4.12'
}
// Suppress "Illegal reflective access" warnings on Java 9+
def shouldAddOpens = JavaVersion.current().java9Compatible
// Runs the NIO example
task nioExample(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
main = 'nearenough.examples.NioClient'
if (shouldAddOpens) {
jvmArgs = ['--add-opens', 'java.base/java.nio=ALL-UNNAMED']
}
}
// Runs the Netty example
task nettyExample(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
main = 'nearenough.examples.NettyClient'
if (shouldAddOpens) {
jvmArgs = [
'--add-opens', 'java.base/sun.nio.ch=ALL-UNNAMED',
'--add-opens', 'java.base/java.nio=ALL-UNNAMED'
]
}
}