Skip to content

Commit

Permalink
Merge pull request #493 from chenrui333/gradle-8.3
Browse files Browse the repository at this point in the history
chore: Bump Gradle to 8.3 and Kotlin to 1.9.10
  • Loading branch information
fwcd committed Oct 3, 2023
2 parents 4150e44 + 82dcb55 commit aaf5e88
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 8 deletions.
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
8 changes: 6 additions & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# 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

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -130,10 +131,13 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
Expand Down
2 changes: 1 addition & 1 deletion platform/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ javaPlatform {
allowDependencies()
}

val kotlinVersion = "1.8.10"
val kotlinVersion = "1.9.10"
val exposedVersion = "0.37.3"
val lsp4jVersion = "0.15.0"

Expand Down
5 changes: 5 additions & 0 deletions server/src/main/kotlin/org/javacs/kt/compiler/Compiler.kt
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ private class CompilationEnvironment(
// configure jvm runtime classpaths
configureJdkClasspathRoots()

// Kotlin 1.8.20 requires us to specify the JDK home, otherwise java.* classes won't resolve
// See https://github.com/JetBrains/kotlin-compiler-server/pull/626
val jdkHome = File(System.getProperty("java.home"))
put(JVMConfigurationKeys.JDK_HOME, jdkHome)

addJvmClasspathRoots(classPath.map { it.toFile() })
addJavaSourceRoots(javaSourcePath.map { it.toFile() })

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
kotlinVersion=1.8.10
kotlinVersion=1.9.10
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
8 changes: 6 additions & 2 deletions server/src/test/resources/additionalWorkspace/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# 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

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -130,10 +131,13 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
Expand Down

0 comments on commit aaf5e88

Please sign in to comment.