Skip to content

Commit

Permalink
Fix scripts in :lwjgl3:distZip and relatives.
Browse files Browse the repository at this point in the history
The startScripts task can be told to use a different, smaller classpath, which lets more dependencies be used without ever running into command line length limits.
  • Loading branch information
tommyettinger committed Jul 24, 2024
1 parent 839b643 commit e6e33aa
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
17 changes: 17 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,23 @@ construo {
}
}

distributions {
main {
contents {
into('lib') {
project.configurations.runtimeClasspath.files.findAll { file ->
file.getName() != project.tasks.jar.outputs.files.singleFile.name
}.each { file ->
exclude file.name
}
}
}
}
}

startScripts.dependsOn('jar')
startScripts.classpath = project.tasks.jar.outputs.files

tasks.register('sample', JavaExec) {
dependsOn classes
setDescription("Generates a sample libGDX project into build/dist/sample")
Expand Down
17 changes: 17 additions & 0 deletions src/main/kotlin/gdx/liftoff/data/platforms/Lwjgl3.kt
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,23 @@ tasks.register('dist') {
dependsOn 'jar'
}
distributions {
main {
contents {
into('lib') {
project.configurations.runtimeClasspath.files.findAll { file ->
file.getName() != project.tasks.jar.outputs.files.singleFile.name
}.each { file ->
exclude file.name
}
}
}
}
}
startScripts.dependsOn(':lwjgl3:jar')
startScripts.classpath = project.tasks.jar.outputs.files
if(enableGraalNative == 'true') {
apply from: file("nativeimage.gradle")
}
Expand Down

0 comments on commit e6e33aa

Please sign in to comment.