Files
nearenough/build.gradle

49 lines
1.0 KiB
Groovy
Raw Normal View History

//
// Gradle build for Nearenough
//
// Copyright (c) 2017-2018 int08h LLC. All rights reserved.
//
2017-10-14 11:12:53 -05:00
repositories {
jcenter()
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
2017-10-14 11:12:53 -05:00
dependencies {
2019-06-22 12:50:47 +02:00
compile 'io.netty:netty-all:4.1.36.Final'
2017-10-14 11:12:53 -05:00
compile 'net.i2p.crypto:eddsa:0.3.0'
2017-10-14 11:12:53 -05:00
testCompile 'junit:junit:4.12'
}
2018-12-14 17:50:27 -06:00
// 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'
]
}
}