hal/build.gradle

86 lines
No EOL
1.6 KiB
Groovy

plugins {
id 'java'
id 'application'
}
// ------------------------------------
// Hal common configuration
// ------------------------------------
allprojects {
repositories {
mavenLocal()
mavenCentral()
}
}
subprojects {
apply plugin: 'java-library'
dependencies {
implementation 'se.koc:zutil:1.0.311'
//implementation 'se.koc:zutil:1.0.0-SNAPSHOT'
testImplementation 'junit:junit:4.12'
testImplementation 'org.hamcrest:hamcrest-core:2.2'
}
sourceSets {
main {
java {
srcDirs 'src'
}
// We do not want the resource folder to be included in the jar file
//resources {
// srcDir 'resource'
//}
}
test {
java {
srcDirs 'test'
}
}
}
}
// ------------------------------------
// Hal general configuration
// ------------------------------------
dependencies {
project.subprojects.each { subProject ->
runtimeOnly subProject
}
}
distributions {
distTar.enabled = false
distZip.enabled = false
main {
contents {
from 'hal.conf.example'
from 'logging.properties'
from "${buildDir}/resources"
}
}
}
task copyRecources(type: Copy) {
doFirst{
System.out.println("Copying resource files...")
}
project.subprojects.each { subProject ->
from "${subProject.projectDir}/resources"
}
into("${buildDir}/resources")
}
processResources.finalizedBy(copyRecources)
application {
mainClass = 'se.hal.HalServer'
}