From d801724c5dcf49e00988cad04a6b58749346fcac Mon Sep 17 00:00:00 2001 From: Berstanio Date: Wed, 14 Aug 2024 10:35:39 +0200 Subject: [PATCH] fix: Use javac instead of removed javah --- gdx/build.gradle | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/gdx/build.gradle b/gdx/build.gradle index 32e0f60edd4..24f0e1226c0 100644 --- a/gdx/build.gradle +++ b/gdx/build.gradle @@ -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" } } }