Fixed build dist containing the correct structure and be able to build zip files explicitly.

Also fixed some compile warnings
This commit is contained in:
Ziver Koc 2025-12-18 03:47:54 +01:00
parent c7f0d4e8b3
commit 1779916d97
111 changed files with 254 additions and 162 deletions

View file

@ -65,6 +65,11 @@ subprojects {
}
}
}
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:deprecation"
//options.compilerArgs << "-Xlint:unchecked"
}
}
// ------------------------------------
@ -78,34 +83,44 @@ dependencies {
}
distributions {
distTar.enabled = false
distZip.enabled = false
main {
contents {
// from root project
from 'hal.conf.example'
from 'logging.properties'
from 'run.sh'
from sourceSets.main.output.resourcesDir
// from subprojects
project.subprojects.each { subProject ->
into('bin') {
from "${subProject.projectDir}/resources/bin"
}
into('web') {
from "${subProject.projectDir}/resources/web"
}
into('resources') {
from ("${subProject.projectDir}/resources") {
exclude 'bin'
exclude 'web'
}
}
}
}
}
}
task copyRecources(type: Copy) {
doFirst{
System.out.println("Copying resource files...")
}
distTar.enabled = false
distZip.enabled = false
assemble.dependsOn(installDist)
project.subprojects.each { subProject ->
from "${subProject.projectDir}/resources"
project.gradle.startParameter.taskNames.each { taskName ->
if (taskName == 'distZip') {
distZip.enabled = true
}
into(sourceSets.main.output.resourcesDir)
}
jar.dependsOn(copyRecources)
copyRecources.mustRunAfter(processResources)
application {
mainClass = 'se.hal.HalServer'
}
startScripts.enabled = false