Skip to content

Commit

Permalink
fix: Use javac instead of removed javah
Browse files Browse the repository at this point in the history
  • Loading branch information
Berstanio committed Aug 14, 2024
1 parent bc17683 commit d801724
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions gdx/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,17 @@ task regenerateIOSHeader {
dependsOn robovmProject.sourceSets.main.runtimeClasspath
doLast {
[IOSGLES20: "iosgl20.h", IOSGLES30: "iosgl30.h"].each {input, output ->
def tempDir = File.createTempDir()
exec {
workingDir robovmProject.file("build/classes/java/")
commandLine "javah"
args "-o", file("jni/iosgl/$output"), "-cp", robovmProject.sourceSets.main.runtimeClasspath.files.collect { it.getName() }.join(File.pathSeparator),
"com.badlogic.gdx.backends.iosrobovm.$input"
workingDir robovmProject.file("src")
commandLine "javac"
args "-h", tempDir, "-cp", robovmProject.sourceSets.main.runtimeClasspath.files.collect { it.absolutePath }.join(File.pathSeparator),
"com/badlogic/gdx/backends/iosrobovm/${input}.java"
}
copy {
from tempDir
into "jni/iosgl"
rename ".*GLES([0-9]*)\\.h", "iosgl\$1.h"
}
}
}
Expand Down

0 comments on commit d801724

Please sign in to comment.