Skip to content

Commit

Permalink
Move where nativeimage.gradle is applied.
Browse files Browse the repository at this point in the history
Having the other file applied later allows it to use tasks defined in lwjgl3/build.gradle , such as a ProGuard task, letting you have nativeCompile depend on proguard by setting that in nativeimage.gradle .
  • Loading branch information
tommyettinger committed Nov 12, 2023
1 parent 1ce9774 commit 008c08c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/main/kotlin/gdx/liftoff/data/platforms/Lwjgl3.kt
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ class Lwjgl3 : Platform {
implementation "io.github.berstanio:gdx-svmhelper:${'$'}graalHelperVersion"
}
}
""".trimIndent())
""".trimIndent()
)
)
}
}
Expand Down Expand Up @@ -141,10 +142,6 @@ else {
apply plugin: 'application'
}
if(enableGraalNative == 'true') {
apply from: file("nativeimage.gradle")
}
sourceSets.main.resources.srcDirs += [ rootProject.file('assets').path ]
mainClassName = '${project.basic.rootPackage}.lwjgl3.Lwjgl3Launcher'
eclipse.project.name = appName + '-lwjgl3'
Expand Down Expand Up @@ -231,5 +228,9 @@ if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_14)) {
tasks.register('dist') {
dependsOn['jar']
}
if(enableGraalNative == 'true') {
apply from: file("nativeimage.gradle")
}
"""
}

0 comments on commit 008c08c

Please sign in to comment.