hal/build.gradle

83 lines
1.5 KiB
Groovy
Raw Normal View History

2020-08-28 23:07:24 +02:00
plugins {
id 'java'
id 'application'
}
// ------------------------------------
// Hal common configuration
// ------------------------------------
2020-08-28 23:07:24 +02:00
allprojects {
2020-08-28 23:07:24 +02:00
repositories {
mavenLocal()
mavenCentral()
jcenter()
}
}
subprojects {
apply plugin: 'java-library'
2020-08-28 23:07:24 +02:00
dependencies {
2020-11-10 16:40:31 +01:00
implementation 'se.koc:zutil:1.0.0-SNAPSHOT'
2020-08-28 23:07:24 +02:00
testImplementation 'junit:junit:4.12'
testImplementation 'org.hamcrest:hamcrest-core:2.2'
}
sourceSets {
main {
java {
srcDirs 'src'
}
//resources {
// srcDir 'resource'
//}
2020-08-28 23:07:24 +02:00
}
test {
java {
srcDirs 'test'
}
}
}
}
// ------------------------------------
// Hal core configuration
// ------------------------------------
dependencies {
project.subprojects.each { subProject ->
runtime subProject
}
2020-08-28 23:07:24 +02:00
}
distributions {
main {
contents {
from 'hal.conf.example'
from 'hal-default.db'
2020-08-28 23:07:24 +02:00
from 'logging.properties'
2020-11-11 01:48:09 +01:00
from "${buildDir}/resources"
2020-08-28 23:07:24 +02:00
}
}
}
2020-11-11 01:48:09 +01:00
task copyRecources(type: Copy) {
doFirst{
System.out.println("Copying resource files...")
}
project.subprojects.each { subProject ->
from "${subProject.projectDir}/resource"
}
into("${buildDir}/resources")
}
processResources.finalizedBy(copyRecources)
2020-11-10 16:40:31 +01:00
application {
mainClass = 'se.hal.HalServer'
2020-08-28 23:07:24 +02:00
}