Files
i2p.i2p/core/build.gradle

89 lines
2.0 KiB
Groovy
Raw Normal View History

2019-02-17 01:27:05 +00:00
plugins {
id 'java-library'
id 'scala'
id 'me.champeau.gradle.jmh' version '0.4.8'
2019-02-17 01:27:05 +00:00
}
archivesBaseName = 'i2p'
sourceSets {
main {
java {
srcDir 'java/src'
exclude 'gnu/getopt'
exclude 'gnu/gettext'
}
resources {
srcDir 'java/src'
include 'gnu/getopt/*.properties'
}
}
test {
java {
srcDir 'java/test/junit'
2017-12-02 17:25:09 +00:00
exclude 'net/i2p/AllCoreTests.java'
exclude 'net/i2p/data/DataTestSuite.java'
exclude 'net/i2p/data/i2cp/I2CPTestSuite.java'
2017-12-02 19:35:33 +00:00
exclude {
it.name.endsWith('IT.java')
}
}
resources {
srcDir 'java/test/resources'
}
}
jmh {
java {
srcDir 'java/bench'
}
}
}
dependencies {
implementation 'gnu.getopt:java-getopt:1.0.13'
implementation 'org.gnu.gettext:libintl:0.18.3'
if (project.hasProperty("with.jbigi")) {
runtimeOnly project(path: ':installer', configuration: 'jbigi')
}
testCompile "org.scala-lang:scala-library:2.12.4"
testCompile 'org.scalatest:scalatest_2.12:3.0.4'
}
if (System.getenv("TARGET_JAVA_HOME") == null && JavaVersion.current() != JavaVersion.VERSION_1_7) {
2017-12-09 12:42:52 +00:00
sourceSets {
test {
scala {
srcDir 'java/test/scalatest'
}
}
}
2017-12-09 02:28:01 +00:00
task scalaTest(dependsOn: ['testClasses'], type: JavaExec) {
main = 'org.scalatest.tools.Runner'
args = ['-R', 'build/classes/scala/test', '-o']
classpath = sourceSets.test.runtimeClasspath
}
test.dependsOn scalaTest
}
jar {
manifest {
attributes 'Specification-Title': 'I2P Core API'
attributes 'Implementation-Title': 'I2P Java Core API'
attributes 'Main-Class': 'net.i2p.util.CommandLine'
}
}
2014-06-25 02:50:24 +00:00
configurations {
tests
}
task testJar(type: Jar) {
baseName = 'i2p-test'
dependsOn classes
from sourceSets.test.output
}
artifacts {
tests testJar
}