Skip to content

Commit aaf5e88

Browse files
authored
Merge pull request #493 from chenrui333/gradle-8.3
chore: Bump Gradle to 8.3 and Kotlin to 1.9.10
2 parents 4150e44 + 82dcb55 commit aaf5e88

File tree

9 files changed

+23
-8
lines changed

9 files changed

+23
-8
lines changed

gradle/wrapper/gradle-wrapper.jar

1.61 KB
Binary file not shown.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
44
networkTimeout=10000
5+
validateDistributionUrl=true
56
zipStoreBase=GRADLE_USER_HOME
67
zipStorePath=wrapper/dists

gradlew

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ done
8383
# This is normally unused
8484
# shellcheck disable=SC2034
8585
APP_BASE_NAME=${0##*/}
86-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
86+
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87+
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
8788

8889
# Use the maximum available, or set MAX_FD != -1 to use that value.
8990
MAX_FD=maximum
@@ -130,10 +131,13 @@ location of your Java installation."
130131
fi
131132
else
132133
JAVACMD=java
133-
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
134+
if ! command -v java >/dev/null 2>&1
135+
then
136+
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
134137
135138
Please set the JAVA_HOME variable in your environment to match the
136139
location of your Java installation."
140+
fi
137141
fi
138142

139143
# Increase the maximum file descriptors if we can.

platform/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ javaPlatform {
66
allowDependencies()
77
}
88

9-
val kotlinVersion = "1.8.10"
9+
val kotlinVersion = "1.9.10"
1010
val exposedVersion = "0.37.3"
1111
val lsp4jVersion = "0.15.0"
1212

server/src/main/kotlin/org/javacs/kt/compiler/Compiler.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ private class CompilationEnvironment(
119119
// configure jvm runtime classpaths
120120
configureJdkClasspathRoots()
121121

122+
// Kotlin 1.8.20 requires us to specify the JDK home, otherwise java.* classes won't resolve
123+
// See https://github.com/JetBrains/kotlin-compiler-server/pull/626
124+
val jdkHome = File(System.getProperty("java.home"))
125+
put(JVMConfigurationKeys.JDK_HOME, jdkHome)
126+
122127
addJvmClasspathRoots(classPath.map { it.toFile() })
123128
addJavaSourceRoots(javaSourcePath.map { it.toFile() })
124129

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
kotlinVersion=1.8.10
1+
kotlinVersion=1.9.10
Binary file not shown.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
44
networkTimeout=10000
5+
validateDistributionUrl=true
56
zipStoreBase=GRADLE_USER_HOME
67
zipStorePath=wrapper/dists

server/src/test/resources/additionalWorkspace/gradlew

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ done
8383
# This is normally unused
8484
# shellcheck disable=SC2034
8585
APP_BASE_NAME=${0##*/}
86-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
86+
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87+
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
8788

8889
# Use the maximum available, or set MAX_FD != -1 to use that value.
8990
MAX_FD=maximum
@@ -130,10 +131,13 @@ location of your Java installation."
130131
fi
131132
else
132133
JAVACMD=java
133-
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
134+
if ! command -v java >/dev/null 2>&1
135+
then
136+
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
134137
135138
Please set the JAVA_HOME variable in your environment to match the
136139
location of your Java installation."
140+
fi
137141
fi
138142

139143
# Increase the maximum file descriptors if we can.

0 commit comments

Comments
 (0)