Enable Gradle test and add manifest to yacycore.jar, set outputdir to lib

as part of migration from Ant to Gradle builds.
pull/442/head
reger 3 years ago committed by reger24
parent d411566c45
commit 6a8d351df3

@ -19,6 +19,7 @@ repositories {
flatDir {
dirs 'lib'
}
mavenCentral()
}
sourceSets {
@ -27,6 +28,12 @@ sourceSets {
srcDirs = ['source']
}
}
test {
java {
srcDirs = ['test/java']
}
}
}
group = 'net.yacy'
@ -65,4 +72,21 @@ tasks.withType(JavaCompile) {
dependencies {
implementation(fileTree("lib"))
testImplementation('junit:junit:4.13.2')
}
// output to lib/yacycore.jar (like with ant with downside by determine class-path)
jar {
archiveFileName = 'yacycore.jar'
destinationDirectory = new File('lib')
// @TODO: class-path workaround until we've dependencies to use configurations.implementation instead of filetree.
FileTree libdir = fileTree("lib").include ("*.jar").exclude("yacycore.jar")
manifest {
attributes(
"Main-Class": "net.yacy.yacy" ,
"Class-Path": libdir.collect { it.name }.join(' ')
)
}
}
Loading…
Cancel
Save