Skip to content

Commit

Permalink
Update kotlin to 2.0.10 and update other dependencies
Browse files Browse the repository at this point in the history
This also prepares the api-gen for a kotlin poet update to the latest version. But because of square/kotlinpoet#1759 the update cannot be performed yet.
  • Loading branch information
chippmann committed Aug 21, 2024
1 parent 5704634 commit c43a4b3
Show file tree
Hide file tree
Showing 245 changed files with 668 additions and 638 deletions.
2 changes: 1 addition & 1 deletion docs/src/doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ The main language supported is Kotlin. We do however support Java experimentally

This module relies on a Kotlin *compiler plugin* for registering your classes and members to Godot. As the compiler API from Kotlin is not stable yet, at the moment we can only support specific Kotlin version per release.

The current latest release is compatible with Kotlin version `2.0.0`.
The current latest release is compatible with Kotlin version `2.0.10`.

!!! info
It is possible to use this module with other Kotlin versions as well but we do not provide any guarantees for it. You find more infos in the [Gradle Plugin configuration](user-guide/advanced/gradle-plugin-configuration.md#disable-build-failure-on-kotlin-version-mismatch) section.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,14 @@ import godot.codegen.services.IEnumService
import godot.codegen.services.IGenerationService
import godot.codegen.traits.CallableTrait
import godot.codegen.traits.addKdoc
import godot.codegen.workarounds.sanitizeApiType
import godot.tools.common.constants.AS_STRING_NAME_UTIL_FUNCTION
import godot.tools.common.constants.CAMEL_TO_SNAKE_CASE_UTIL_FUNCTION
import godot.tools.common.constants.CORE_TYPE_HELPER
import godot.tools.common.constants.CORE_TYPE_LOCAL_COPY
import godot.tools.common.constants.GENERATED_COMMENT
import godot.tools.common.constants.GODOT_BASE_TYPE
import godot.tools.common.constants.GODOT_ERROR
import godot.tools.common.constants.GodotKotlinJvmTypes
import godot.tools.common.constants.GodotTypes
import godot.tools.common.constants.KT_OBJECT
Expand Down Expand Up @@ -340,8 +342,9 @@ class GenerationService(
val companion = TypeSpec.companionObjectBuilder()
.addFunction(
FunSpec.builder("from")
.returns(ClassName("${godotApiPackage}.${containingClassName ?: ""}", enum.name))
.addParameter("value", Long::class)
.addStatement("return entries.single { it.%N == %N }", "id", "value")
.addStatement("return·entries.single·{·it.%N·==·%N·}", "id", "value")
.build()
)
.build()
Expand Down Expand Up @@ -715,9 +718,10 @@ class GenerationService(
val kFunctionClassName = ClassName("kotlin.reflect", "KFunction$i")
.parameterizedBy(*kFunctionTypeParameters.toTypedArray(), TypeVariableName.invoke("*"))

RpcFunctionMode.values().forEach { rpcFunctionMode ->
RpcFunctionMode.entries.forEach { rpcFunctionMode ->
val rpcFunSpec = FunSpec
.builder(rpcFunctionMode.functionName)
.returns(GODOT_ERROR)
.addModifiers(KModifier.INLINE)

if (rpcFunctionMode.hasId) {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions kt/godot-library/src/main/kotlin/godot/gen/godot/Animation.kt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion kt/godot-library/src/main/kotlin/godot/gen/godot/Area2D.kt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion kt/godot-library/src/main/kotlin/godot/gen/godot/Area3D.kt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c43a4b3

Please sign in to comment.