Skip to content

Commit

Permalink
Update dependencies and IDE plugin (#758)
Browse files Browse the repository at this point in the history
* Update gradle to 8.13

* Fix deprecation

* Update dependencies and remove dead code

* Remove deprecated and now not necessary configuration call

* Update target ide plugin version and fix deprecations

* Fix plugin not compatible and older plugin version suggested

See: #755

* Update gradle of harness projects to `8.13` as well

* Update foojay resolver convention to `0.9.0`

* Replace deprecated task creations with task registrations

* Set from version correctly

* Remove now needless suppressions

* Fix export type check

---------

Co-authored-by: chippmann <[email protected]>
  • Loading branch information
chippmann and chippmann authored Mar 1, 2025
1 parent 4d3ea1c commit fce31d9
Show file tree
Hide file tree
Showing 50 changed files with 197 additions and 140 deletions.
Binary file modified harness/bunnymark/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion harness/bunnymark/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
8 changes: 5 additions & 3 deletions harness/bunnymark/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -84,7 +86,7 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -203,7 +205,7 @@ fi
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
Expand Down
2 changes: 2 additions & 0 deletions harness/bunnymark/gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down
Binary file modified harness/flattened-library-tests/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
7 changes: 5 additions & 2 deletions harness/flattened-library-tests/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
2 changes: 2 additions & 0 deletions harness/flattened-library-tests/gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down
Binary file modified harness/fqname-library-tests/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
7 changes: 5 additions & 2 deletions harness/fqname-library-tests/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
2 changes: 2 additions & 0 deletions harness/fqname-library-tests/gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
7 changes: 5 additions & 2 deletions harness/hierarchical-library-tests/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
2 changes: 2 additions & 0 deletions harness/hierarchical-library-tests/gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down
Binary file modified harness/tests/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion harness/tests/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
8 changes: 5 additions & 3 deletions harness/tests/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -84,7 +86,7 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -203,7 +205,7 @@ fi
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
Expand Down
2 changes: 2 additions & 0 deletions harness/tests/gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down
2 changes: 1 addition & 1 deletion kt/api-generator/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
}

kotlin {
jvmToolchain(11)
jvmToolchain(libs.versions.toolchain.jvm.get().toInt())
}

gradlePlugin {
Expand Down
2 changes: 1 addition & 1 deletion kt/api-generator/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dependencyResolutionManagement {

plugins {
// to automatically download the toolchain jdk if missing
id("org.gradle.toolchains.foojay-resolver-convention") version "0.6.0"
id("org.gradle.toolchains.foojay-resolver-convention") version "0.9.0" // https://plugins.gradle.org/plugin/org.gradle.toolchains.foojay-resolver-convention
}

includeBuild("../tools-common") {
Expand Down
2 changes: 1 addition & 1 deletion kt/build-logic/convention/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
}

kotlin {
jvmToolchain(11)
jvmToolchain(libs.versions.toolchain.jvm.get().toInt())
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion kt/build-logic/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dependencyResolutionManagement {

plugins {
// to automatically download the toolchain jdk if missing
id("org.gradle.toolchains.foojay-resolver-convention") version "0.6.0"
id("org.gradle.toolchains.foojay-resolver-convention") version "0.9.0" // https://plugins.gradle.org/plugin/org.gradle.toolchains.foojay-resolver-convention
}

rootProject.name = "build-logic"
Expand Down
14 changes: 7 additions & 7 deletions kt/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ subprojects {

tasks {
@Suppress("UNUSED_VARIABLE")
val generateChangelog by creating {
val generateChangelog by registering {
group = "godot-kotlin-jvm"

doLast {
Expand Down Expand Up @@ -52,7 +52,7 @@ tasks {
}.writeText(changelogString)
}
}
val buildEngineDebug by creating(Exec::class) {
val buildEngineDebug by registering(Exec::class) {
group = "godot-kotlin-jvm"

workingDir = File(rootProject.projectDir, "../../..")
Expand All @@ -72,7 +72,7 @@ tasks {
commandLine("scons", "p=$platform", "-j$coresAvailable")
}
}
val buildEngineReleaseDebug by creating(Exec::class) {
val buildEngineReleaseDebug by registering(Exec::class) {
group = "godot-kotlin-jvm"

workingDir = File(rootProject.projectDir, "../../..")
Expand All @@ -92,7 +92,7 @@ tasks {
commandLine("scons", "p=$platform", "target=template_debug", "-j$coresAvailable")
}
}
val runEngineDebug by creating(Exec::class) {
val runEngineDebug by registering(Exec::class) {
group = "godot-kotlin-jvm"

workingDir = File(rootProject.projectDir, "../../../bin")
Expand All @@ -112,7 +112,7 @@ tasks {
commandLine("${workingDir.absolutePath}/godot.x11.tools.64", "-v")
}
}
val runEngineReleaseDebug by creating(Exec::class) {
val runEngineReleaseDebug by registering(Exec::class) {
group = "godot-kotlin-jvm"

workingDir = File(rootProject.projectDir, "../../../bin")
Expand All @@ -133,13 +133,13 @@ tasks {
}
}
@Suppress("UNUSED_VARIABLE")
val buildAndRunEngineDebug by creating {
val buildAndRunEngineDebug by registering {
group = "godot-kotlin-jvm"
dependsOn(buildEngineDebug, getTasksByName("copyBootstrapJar", true).first())
finalizedBy(runEngineDebug)
}
@Suppress("UNUSED_VARIABLE")
val buildAndRunEngineReleaseDebug by creating {
val buildAndRunEngineReleaseDebug by registering {
group = "godot-kotlin-jvm"
dependsOn(buildEngineReleaseDebug, getTasksByName("copyBootstrapJar", true).first())
finalizedBy(runEngineReleaseDebug)
Expand Down
4 changes: 2 additions & 2 deletions kt/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ version = fullGodotKotlinJvmVersion
group = "com.utopia-rise"

kotlin {
jvmToolchain(11)
jvmToolchain(libs.versions.toolchain.jvm.get().toInt())
}

publishing {
publications {
@Suppress("UNUSED_VARIABLE")
val godotCommonGenerator by creating(MavenPublication::class) {
val godotCommonGenerator by registering(MavenPublication::class) {
pom {
name.set(project.name)
description.set("Godot common module other libraries.")
Expand Down
2 changes: 1 addition & 1 deletion kt/common/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ dependencyResolutionManagement {

plugins {
// to automatically download the toolchain jdk if missing
id("org.gradle.toolchains.foojay-resolver-convention") version "0.6.0"
id("org.gradle.toolchains.foojay-resolver-convention") version "0.9.0" // https://plugins.gradle.org/plugin/org.gradle.toolchains.foojay-resolver-convention
}
2 changes: 1 addition & 1 deletion kt/entry-generation/godot-entry-generator/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
}

kotlin {
jvmToolchain(11)
jvmToolchain(libs.versions.toolchain.jvm.get().toInt())
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
}

kotlin {
jvmToolchain(11)
jvmToolchain(libs.versions.toolchain.jvm.get().toInt())
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import com.google.devtools.ksp.processing.KSPLogger
import com.google.devtools.ksp.processing.Resolver
import com.google.devtools.ksp.processing.SymbolProcessor
import com.google.devtools.ksp.symbol.KSAnnotated
import godot.annotation.processor.compiler.CompilerDataProvider
import godot.annotation.processor.processing.ProcessingRound
import godot.annotation.processor.processing.ProcessingRoundsBlackboard
import godot.annotation.processor.processing.RoundGenerateRegistrarsForCurrentProjectAndDependencyRegistrationFiles
Expand Down Expand Up @@ -44,12 +43,6 @@ class GodotKotlinSymbolProcessor(
override fun process(resolver: Resolver): List<KSAnnotated> {
processingRound++
if (processingRound == 0) {
CompilerDataProvider.init(
resolver,
options["srcDirs"]
?.split(File.pathSeparator)
?: throw IllegalStateException("No srcDirs option provided")
)
settings = provideSettingsFromArguments()
}

Expand Down
Loading

0 comments on commit fce31d9

Please sign in to comment.