mirror of https://github.com/zlatinb/muwire
60 lines
1.4 KiB
Groovy
60 lines
1.4 KiB
Groovy
|
|
plugins {
|
|
id 'java-library'
|
|
id 'maven-publish'
|
|
id 'jacoco'
|
|
}
|
|
|
|
dependencies {
|
|
api "net.i2p:i2p:${i2pVersion}"
|
|
api "net.i2p:router:${i2pVersion}"
|
|
api "net.i2p.client:mstreaming:${i2pVersion}"
|
|
implementation "net.i2p.client:streaming:${i2pVersion}"
|
|
|
|
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.4.2'
|
|
testImplementation 'junit:junit:4.12'
|
|
testImplementation 'org.codehaus.groovy:groovy-all:3.0.4'
|
|
}
|
|
|
|
|
|
// this is necessary because applying both groovy and java-library doesn't work well
|
|
configurations {
|
|
apiElements.outgoing.variants {
|
|
classes {
|
|
artifact file: compileGroovy.destinationDir, builtBy: compileGroovy
|
|
}
|
|
}
|
|
}
|
|
|
|
configurations.testImplementation {
|
|
exclude group:'org.codehaus.groovy', module:'groovy-testng'
|
|
}
|
|
|
|
test {
|
|
doFirst {
|
|
jvmArgs=["--add-opens","java.base/java.lang=ALL-UNNAMED",
|
|
"--add-opens","java.base/sun.nio.fs=ALL-UNNAMED",
|
|
"--add-opens","java.base/java.nio=ALL-UNNAMED"]
|
|
}
|
|
finalizedBy jacocoTestReport
|
|
}
|
|
|
|
jacocoTestReport {
|
|
reports {
|
|
xml.required = true
|
|
html.outputLocation = layout.buildDirectory.dir('jacocoHtml')
|
|
}
|
|
}
|
|
|
|
// publish core to local maven repo for sister projects
|
|
publishing {
|
|
publications {
|
|
muCore(MavenPublication) {
|
|
from components.java
|
|
}
|
|
}
|
|
repositories {
|
|
mavenLocal()
|
|
}
|
|
}
|