Skip to content

Commit 687ac7b

Browse files
committed
Update Gradle, Kotlin and KSP
1 parent 640fc37 commit 687ac7b

File tree

10 files changed

+27
-19
lines changed

10 files changed

+27
-19
lines changed

build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ dependencies {
3333
implementation(libs.kotlin.dev.scriptingCompilerEmbeddable)
3434
implementation(libs.kotlin.dev.scriptingIdeServices)
3535
implementation(libs.kotlin.dev.scriptingDependenciesMavenAll)
36-
implementation(libs.kotlin.dev.scriptUtil)
3736
implementation(libs.kotlin.dev.scriptingCommon)
37+
implementation(libs.kotlin.dev.scriptingJvm)
3838

3939
// Embedded version of serialization plugin for notebook code
40-
implementation(libs.serialization.dev.embedded)
40+
implementation(libs.serialization.dev.embeddedPlugin)
4141

4242
// Logging
4343
implementation(libs.logging.slf4j.api)

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
# Kotlin Kernel for IPython/Jupyter
1111

12-
[Kotlin](https://kotlinlang.org/) (1.8.20) [kernel](https://docs.jupyter.org/en/latest/projects/kernels.html) for [Jupyter](https://jupyter.org).
12+
[Kotlin](https://kotlinlang.org/) (1.9.0) [kernel](https://docs.jupyter.org/en/latest/projects/kernels.html) for [Jupyter](https://jupyter.org).
1313

1414
The kernel is a powerful engine designed to enhance your Kotlin REPL experience. It offers support for executing code cells,
1515
providing basic code completion, and analyzing errors. With the Kotlin kernel, you gain access to a range of features,

gradle.properties

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
baseVersion=0.12.0
22

3-
kotlinLanguageLevel=1.8
4-
stableKotlinLanguageLevel=1.8
3+
# kotlin.experimental.tryK2=true
4+
kotlinLanguageLevel=1.9
5+
stableKotlinLanguageLevel=1.9
56

67
kotlin.jupyter.add.api=false
78
kotlin.jupyter.add.scanner=false

gradle/libs.versions.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[versions]
22
jvmTarget = "1.8"
33

4-
kotlin = "1.8.20"
5-
stableKotlin = "1.8.20"
6-
gradleKotlin = "1.8.20"
7-
ksp = "1.8.20-1.0.10"
4+
kotlin = "1.9.0"
5+
stableKotlin = "1.9.0"
6+
gradleKotlin = "1.9.0"
7+
ksp = "1.9.0-1.0.12"
88
shadowJar = "7.1.2"
99
changelogPlugin = "1.12.1"
1010
kotlinxSerialization = "1.4.1"
@@ -51,7 +51,6 @@ kotlin-dev-scriptingCompilerEmbeddable = { group = "org.jetbrains.kotlin", name
5151
kotlin-dev-scriptingIdeServices = { group = "org.jetbrains.kotlin", name = "kotlin-scripting-ide-services", version.ref = "kotlin" }
5252
kotlin-dev-scriptingDependencies = { group = "org.jetbrains.kotlin", name = "kotlin-scripting-dependencies", version.ref = "kotlin" }
5353
kotlin-dev-scriptingDependenciesMavenAll = { group = "org.jetbrains.kotlin", name = "kotlin-scripting-dependencies-maven-all", version.ref = "kotlin" }
54-
kotlin-dev-scriptUtil = { group = "org.jetbrains.kotlin", name = "kotlin-script-util", version.ref = "kotlin" }
5554
kotlin-dev-scriptingCommon = { group = "org.jetbrains.kotlin", name = "kotlin-scripting-common", version.ref = "kotlin" }
5655
kotlin-dev-scriptingJvm = { group = "org.jetbrains.kotlin", name = "kotlin-scripting-jvm", version.ref = "kotlin" }
5756
kotlin-dev-scriptRuntime = { group = "org.jetbrains.kotlin", name = "kotlin-script-runtime", version.ref = "kotlin" }
@@ -75,6 +74,7 @@ plugin-ksp = { group="com.google.devtools.ksp", name="com.google.devtools.ksp.gr
7574

7675
# Serialization compiler plugin (for Dev Kotlin)
7776
serialization-dev-embedded = { group = "org.jetbrains.kotlin", name = "kotlin-serialization", version.ref = "kotlin" }
77+
serialization-dev-embeddedPlugin = { group = "org.jetbrains.kotlin", name = "kotlin-serialization-compiler-plugin-embeddable", version.ref = "kotlin" }
7878
serialization-dev-unshaded = { group = "org.jetbrains.kotlin", name = "kotlin-serialization-unshaded", version.ref = "kotlin" }
7979

8080
# Serialization runtime

gradle/wrapper/gradle-wrapper.jar

2.06 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.0.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-rc-2-bin.zip
44
networkTimeout=10000
5+
validateDistributionUrl=true
56
zipStoreBase=GRADLE_USER_HOME
67
zipStorePath=wrapper/dists

gradlew

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +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
87-
88-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
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
9088

9189
# Use the maximum available, or set MAX_FD != -1 to use that value.
9290
MAX_FD=maximum
@@ -133,10 +131,13 @@ location of your Java installation."
133131
fi
134132
else
135133
JAVACMD=java
136-
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.
137137
138138
Please set the JAVA_HOME variable in your environment to match the
139139
location of your Java installation."
140+
fi
140141
fi
141142

142143
# Increase the maximum file descriptors if we can.
@@ -197,6 +198,10 @@ if "$cygwin" || "$msys" ; then
197198
done
198199
fi
199200

201+
202+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
203+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
204+
200205
# Collect all arguments for the java command;
201206
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
202207
# shell script including quotes and variable substitutions, so put them in

jupyter-lib/api/src/main/kotlin/org/jetbrains/kotlinx/jupyter/api/libraries/connection.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import kotlinx.serialization.json.decodeFromJsonElement
88
import kotlinx.serialization.json.encodeToJsonElement
99
import kotlinx.serialization.json.jsonObject
1010
import org.jetbrains.kotlinx.jupyter.util.EMPTY
11+
import java.util.Locale
1112

1213
/**
1314
* Jupyter connection socket types
@@ -24,7 +25,7 @@ enum class JupyterSocketType {
2425
IOPUB;
2526
}
2627

27-
val JupyterSocketType.nameForUser get() = name.toLowerCase()
28+
val JupyterSocketType.nameForUser get() = name.lowercase(Locale.getDefault())
2829
val JupyterSocketType.portField get() = "${nameForUser}_port"
2930

3031
/**

jupyter-lib/kotlin-jupyter-api-gradle-plugin/src/main/kotlin/org/jetbrains/kotlinx/jupyter/api/plugin/util/domainCollectionUtil.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package org.jetbrains.kotlinx.jupyter.api.plugin.util
22

33
import org.gradle.api.NamedDomainObjectCollection
44

5-
internal fun <T> NamedDomainObjectCollection<T>.whenAdded(condition: (T) -> Boolean, action: (T) -> Unit) {
5+
internal fun <T : Any> NamedDomainObjectCollection<T>.whenAdded(condition: (T) -> Boolean, action: (T) -> Unit) {
66
val element = find(condition)
77
if (element != null) {
88
action(element)

jupyter-lib/shared-compiler/src/main/kotlin/org/jetbrains/kotlinx/jupyter/util/memoization.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ fun <A, V> createCachedFun(calculate: (A) -> V): (A) -> V {
1010
fun <A, K, V> createCachedFun(calculateKey: (A) -> K, calculate: (A) -> V): (A) -> V {
1111
val cache = ConcurrentHashMap<Optional<K>, Optional<V>>()
1212

13-
@Suppress("USELESS_CAST")
13+
@Suppress("UNCHECKED_CAST")
1414
return { argument ->
1515
val key = Optional.ofNullable(calculateKey(argument)) as Optional<K>
1616
cache.getOrPut(key) {

0 commit comments

Comments
 (0)