Skip to content

Bugfix/ios lib path and graal jni config #840

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions kt/common/src/main/kotlin/godot/common/Version.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package godot.common

const val GODOT_KOTLIN_VERSION = "0.13.1-4.4.1"
1 change: 0 additions & 1 deletion kt/godot-library/godot-core-library/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ java {
dependencies {
api("com.utopia-rise:common:$fullGodotKotlinJvmVersion")
implementation(project(":godot-internal-library"))
implementation(project(":godot-build-props"))

testImplementation("junit", "junit", "4.12")
testImplementation("com.utopia-rise:common:$fullGodotKotlinJvmVersion")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package godot.runtime

import godot.common.GODOT_KOTLIN_VERSION
import godot.core.KtClass
import godot.core.VariantParser
import godot.core.variantMapper
import godot.internal.logging.JVMLogging
import godot.internal.reflection.TypeManager
import godot.registration.ClassRegistry
import godot.registration.Entry
import godot.utils.GodotBuildProperties
import java.util.*


Expand All @@ -25,11 +25,11 @@ internal class Bootstrap {
initializeUsingEntry()
}

fun getVersion(): String{
fun getVersion(): String {
// we cannot use the assembled version here as it includes the git hash on local dev builds which is not present
// on the cpp side
// hence we assemble it manually here
return "${GodotBuildProperties.godotKotlinJvmVersion}-${GodotBuildProperties.godotVersion}"
return GODOT_KOTLIN_VERSION
}

fun finish() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
{ "name" : "INSTANCE" }
],
"methods" : [
{ "name" : "getMethodBindPtr$godot_library", "parameterTypes" : ["java.lang.String", "java.lang.String", "long"] }
{ "name" : "getMethodBindPtr", "parameterTypes" : ["java.lang.String", "java.lang.String", "long"] }
]
},
{
Expand Down Expand Up @@ -331,7 +331,10 @@
{ "name" : "engine_call_to_float64_array", "parameterTypes" : ["long"] },
{ "name" : "engine_call_to_int32_array", "parameterTypes" : ["long"] },
{ "name" : "engine_call_to_int64_array", "parameterTypes" : ["long"] },
{ "name" : "engine_call_size", "parameterTypes" : ["long"] }
{ "name" : "engine_call_size", "parameterTypes" : ["long"] },

{ "name" : "engine_convert_to_godot", "parameterTypes" : ["byte[]"] },
{ "name" : "engine_convert_to_jvm", "parameterTypes" : ["long"] }
]
},
{
Expand Down Expand Up @@ -399,7 +402,10 @@
{ "name" : "engine_call_size", "parameterTypes" : ["long"] },
{ "name" : "engine_call_slice", "parameterTypes" : ["long"] },
{ "name" : "engine_call_sort", "parameterTypes" : ["long"] },
{ "name" : "engine_call_to_byte_array", "parameterTypes" : ["long"] }
{ "name" : "engine_call_to_byte_array", "parameterTypes" : ["long"] },

{ "name" : "engine_convert_to_godot", "parameterTypes" : ["float[]"] },
{ "name" : "engine_convert_to_jvm", "parameterTypes" : ["long"] }
]
},
{
Expand Down Expand Up @@ -433,7 +439,10 @@
{ "name" : "engine_call_size", "parameterTypes" : ["long"] },
{ "name" : "engine_call_slice", "parameterTypes" : ["long"] },
{ "name" : "engine_call_sort", "parameterTypes" : ["long"] },
{ "name" : "engine_call_to_byte_array", "parameterTypes" : ["long"] }
{ "name" : "engine_call_to_byte_array", "parameterTypes" : ["long"] },

{ "name" : "engine_convert_to_godot", "parameterTypes" : ["double[]"] },
{ "name" : "engine_convert_to_jvm", "parameterTypes" : ["long"] }
]
},
{
Expand Down Expand Up @@ -467,7 +476,10 @@
{ "name" : "engine_call_size", "parameterTypes" : ["long"] },
{ "name" : "engine_call_slice", "parameterTypes" : ["long"] },
{ "name" : "engine_call_sort", "parameterTypes" : ["long"] },
{ "name" : "engine_call_to_byte_array", "parameterTypes" : ["long"] }
{ "name" : "engine_call_to_byte_array", "parameterTypes" : ["long"] },

{ "name" : "engine_convert_to_godot", "parameterTypes" : ["int[]"] },
{ "name" : "engine_convert_to_jvm", "parameterTypes" : ["long"] }
]
},
{
Expand Down Expand Up @@ -501,7 +513,10 @@
{ "name" : "engine_call_size", "parameterTypes" : ["long"] },
{ "name" : "engine_call_slice", "parameterTypes" : ["long"] },
{ "name" : "engine_call_sort", "parameterTypes" : ["long"] },
{ "name" : "engine_call_to_byte_array", "parameterTypes" : ["long"] }
{ "name" : "engine_call_to_byte_array", "parameterTypes" : ["long"] },

{ "name" : "engine_convert_to_godot", "parameterTypes" : ["long[]"] },
{ "name" : "engine_convert_to_jvm", "parameterTypes" : ["long"] }
]
},
{
Expand Down Expand Up @@ -569,7 +584,10 @@
{ "name" : "engine_call_size", "parameterTypes" : ["long"] },
{ "name" : "engine_call_slice", "parameterTypes" : ["long"] },
{ "name" : "engine_call_sort", "parameterTypes" : ["long"] },
{ "name" : "engine_call_to_byte_array", "parameterTypes" : ["long"] }
{ "name" : "engine_call_to_byte_array", "parameterTypes" : ["long"] },

{ "name" : "engine_convert_to_godot", "parameterTypes" : ["float[]"] },
{ "name" : "engine_convert_to_jvm", "parameterTypes" : ["long"] }
]
},
{
Expand Down Expand Up @@ -603,7 +621,10 @@
{ "name" : "engine_call_size", "parameterTypes" : ["long"] },
{ "name" : "engine_call_slice", "parameterTypes" : ["long"] },
{ "name" : "engine_call_sort", "parameterTypes" : ["long"] },
{ "name" : "engine_call_to_byte_array", "parameterTypes" : ["long"] }
{ "name" : "engine_call_to_byte_array", "parameterTypes" : ["long"] },

{ "name" : "engine_convert_to_godot", "parameterTypes" : ["float[]"] },
{ "name" : "engine_convert_to_jvm", "parameterTypes" : ["long"] }
]
},
{
Expand Down Expand Up @@ -637,7 +658,10 @@
{ "name" : "engine_call_size", "parameterTypes" : ["long"] },
{ "name" : "engine_call_slice", "parameterTypes" : ["long"] },
{ "name" : "engine_call_sort", "parameterTypes" : ["long"] },
{ "name" : "engine_call_to_byte_array", "parameterTypes" : ["long"] }
{ "name" : "engine_call_to_byte_array", "parameterTypes" : ["long"] },

{ "name" : "engine_convert_to_godot", "parameterTypes" : ["float[]"] },
{ "name" : "engine_convert_to_jvm", "parameterTypes" : ["long"] }
]
},
{
Expand Down Expand Up @@ -683,7 +707,9 @@
{ "name" : "<init>", "parameterTypes" : [] },
{ "name" : "loadClasses", "parameterTypes" : ["godot.core.KtClass[]"] },
{ "name" : "registerManagedEngineTypes", "parameterTypes" : ["java.lang.String[]", "java.lang.String[]"] },
{ "name" : "init", "parameterTypes": ["java.lang.String", "java.lang.String", "java.lang.ClassLoader"]},
{ "name" : "initJar", "parameterTypes": ["java.lang.ClassLoader"]},
{ "name" : "initNativeImage", "parameterTypes": []},
{ "name" : "getVersion", "parameterTypes": []},
{ "name" : "finish", "parameterTypes" : [] }
]
},
Expand Down Expand Up @@ -716,7 +742,6 @@
{"name":"invokeNoReturn","parameterTypes":[] },
{"name":"invokeWithReturn","parameterTypes":[] },
{"name":"getReturnVariantType","parameterTypes":[] },
{"name":"hashCode","parameterTypes":[] },
{"name":"onCancel","parameterTypes":[] }
]
},
Expand Down
2 changes: 0 additions & 2 deletions src/jvm_wrapper/kotlin_callable_custom.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,12 @@ JVM_INSTANCE_WRAPPER(LambdaCallable, "godot.core.LambdaCallable") {
JNI_VOID_METHOD(INVOKE_NO_RETURN)
JNI_OBJECT_METHOD(INVOKE_WITH_RETURN)
JNI_INT_METHOD(GET_RETURN_VARIANT_TYPE)
JNI_INT_METHOD(HASH_CODE)
JNI_VOID_METHOD(ON_CANCEL)

INIT_JNI_BINDINGS(
INIT_JNI_METHOD(INVOKE_NO_RETURN, "invokeNoReturn", "()V")
INIT_JNI_METHOD(INVOKE_WITH_RETURN, "invokeWithReturn", "()Ljava/lang/Object;")
INIT_JNI_METHOD(GET_RETURN_VARIANT_TYPE, "getReturnVariantType", "()I")
INIT_JNI_METHOD(HASH_CODE, "hashCode", "()I")
INIT_JNI_METHOD(ON_CANCEL, "onCancel", "()V")
)

Expand Down
2 changes: 1 addition & 1 deletion src/lifecycle/paths.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ static constexpr const char* ANDROID_RELATIVE_JVM_LIB_PATH {""};

static constexpr const char* IOS_BOOTSTRAP_FILE {""};
static constexpr const char* IOS_USER_CODE_FILE {""};
static constexpr const char* IOS_GRAAL_NATIVE_IMAGE_FILE {JVM_DIRECTORY "usercode.a"};
static constexpr const char* IOS_GRAAL_NATIVE_IMAGE_FILE {"usercode.a"};
static constexpr const char* IOS_RELATIVE_JVM_LIB_PATH {""};

#ifdef X11_ENABLED
Expand Down
1 change: 1 addition & 0 deletions versionBumpGuide.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
When updating this project version, here the list of strings to changes:
- src/version.h: GODOT_KOTLIN_VERSION.
- kt/common/src/main/kotlin/Version.kt: GODOT_KOTLIN_VERSION.
- kt/gradle/libs.versions.toml: godotKotlinJvm, kotlin and godot variables.
- docs/src/index.md: kotlin version, Full version, Module Version and Supported Godot Version fields in "Versioning" block.
- config.py: Change the String to "jvm-x.x.x".
Expand Down
Loading