Skip to content

Commit 56838dd

Browse files
authored
Remove Kotlin/Jupyter Gradle plugin (#447)
Remove Kotlin Jupyter Gradle plugin in order to avoid its reliance on dev versions of the Kotlin Gradle plugin (and the Kotlin compiler). The original motivation for this was one Kotlin/Jupyter version that was relying on an unpublished KGP version, [failing builds][1] on #424. <img width="1090" height="212" alt="Screenshot 2025-08-14 at 20 25 41" src="https://github.com/user-attachments/assets/8df3fee4-a2e6-4053-b323-1244daa6459e" /> That's since been resolved, but beta versions of KGP keep being used and I'd rather avoid publishing a library built with pre-release versions of KGP. <img width="781" height="518" alt="Screenshot 2025-08-14 at 20 25 01" src="https://github.com/user-attachments/assets/062f3c7d-759f-487e-8d60-62eafed8ce71" /> The integration that was previously facilitated by the plugin is now done manually. `examplesTest` guarantees this is functional. [1]: https://scans.gradle.com/s/vy3gdlvqaolni
1 parent 8335709 commit 56838dd

File tree

5 files changed

+46
-25
lines changed

5 files changed

+46
-25
lines changed

gradle/libs.versions.toml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
kotlin = "2.2.0"
33
dokka = "2.0.0"
44
openapi-generator = "7.14.0"
5-
jupyter-api = "0.12.0-398"
6-
jupyter-testkit = "0.12.0-398"
7-
jupyter-plugin = "0.12.0-398"
5+
jupyter = "0.12.0-398"
86
okio = "3.16.0"
97
moshi = "1.15.2"
108
okhttp = "5.1.0"
@@ -26,15 +24,12 @@ retrofit-converter-moshi = { module = "com.squareup.retrofit2:converter-moshi",
2624
retrofit-converter-scalars = { module = "com.squareup.retrofit2:converter-scalars", version.ref = "retrofit" }
2725
kotlin-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlin-coroutines" }
2826
kotlin-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlin-coroutines" }
29-
kotlin-jupyter-api = { module = "org.jetbrains.kotlinx:kotlin-jupyter-api", version.ref = "jupyter-api" }
30-
kotlin-jupyter-testkit = { module = "org.jetbrains.kotlinx:kotlin-jupyter-test-kit", version.ref = "jupyter-testkit" }
27+
kotlin-jupyter-api = { module = "org.jetbrains.kotlinx:kotlin-jupyter-api", version.ref = "jupyter" }
28+
kotlin-jupyter-testkit = { module = "org.jetbrains.kotlinx:kotlin-jupyter-test-kit", version.ref = "jupyter" }
3129
kotlin-binary-compatibility-validator-plugin = { module = "org.jetbrains.kotlinx:binary-compatibility-validator", version.ref = "kotlin-binary-compatibility-validator" }
3230
kotlin-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
3331
dokka-plugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "dokka" }
3432
openapi-generator-plugin = { module = "org.openapitools:openapi-generator-gradle-plugin", version.ref = "openapi-generator" }
3533
slf4j-api = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" }
3634
slf4j-simple = { module = "org.slf4j:slf4j-simple", version.ref = "slf4j" }
3735
guava = { module = "com.google.guava:guava", version.ref = "guava" }
38-
39-
[plugins]
40-
kotlin-jupyter = { id = "org.jetbrains.kotlin.jupyter.api", version.ref = "jupyter-plugin" }

library/api/library.api

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,9 +300,32 @@ public final class com/gabrielfeo/develocity/api/internal/infrastructure/UUIDAda
300300
public final fun toJson (Ljava/util/UUID;)Ljava/lang/String;
301301
}
302302

303-
public final class com/gabrielfeo/develocity/api/internal/jupyter/DevelocityApiJupyterIntegration : org/jetbrains/kotlinx/jupyter/api/libraries/JupyterIntegration {
303+
public final class com/gabrielfeo/develocity/api/internal/jupyter/DevelocityApiJupyterIntegration : org/jetbrains/kotlinx/jupyter/api/libraries/LibraryDefinition {
304304
public fun <init> ()V
305-
public fun onLoaded (Lorg/jetbrains/kotlinx/jupyter/api/libraries/JupyterIntegration$Builder;)V
305+
public fun getAfterCellExecution ()Ljava/util/List;
306+
public fun getClassAnnotations ()Ljava/util/List;
307+
public fun getCodePreprocessors ()Ljava/util/List;
308+
public fun getColorSchemeChangedCallbacks ()Ljava/util/List;
309+
public fun getConverters ()Ljava/util/List;
310+
public fun getDependencies ()Ljava/util/List;
311+
public fun getDescription ()Ljava/lang/String;
312+
public fun getFileAnnotations ()Ljava/util/List;
313+
public fun getImports ()Ljava/util/List;
314+
public fun getInit ()Ljava/util/List;
315+
public fun getInitCell ()Ljava/util/List;
316+
public fun getIntegrationTypeNameRules ()Ljava/util/List;
317+
public fun getInternalVariablesMarkers ()Ljava/util/List;
318+
public fun getInterruptionCallbacks ()Ljava/util/List;
319+
public fun getMinKernelVersion ()Lorg/jetbrains/kotlinx/jupyter/api/KotlinKernelVersion;
320+
public fun getOptions ()Ljava/util/Map;
321+
public fun getOriginalDescriptorText ()Ljava/lang/String;
322+
public fun getRenderers ()Ljava/util/List;
323+
public fun getRepositories ()Ljava/util/List;
324+
public fun getResources ()Ljava/util/List;
325+
public fun getShutdown ()Ljava/util/List;
326+
public fun getTextRenderers ()Ljava/util/List;
327+
public fun getThrowableRenderers ()Ljava/util/List;
328+
public fun getWebsite ()Ljava/lang/String;
306329
}
307330

308331
public final class com/gabrielfeo/develocity/api/model/ApiProblem {

library/build.gradle.kts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
21
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
32
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
43

@@ -7,13 +6,6 @@ plugins {
76
id("com.gabrielfeo.develocity-api-code-generation")
87
id("com.gabrielfeo.integration-test-suite")
98
id("com.gabrielfeo.examples-test-suite")
10-
alias(libs.plugins.kotlin.jupyter)
11-
}
12-
13-
tasks.processJupyterApiResources {
14-
libraryProducers = listOf(
15-
"com.gabrielfeo.develocity.api.internal.jupyter.DevelocityApiJupyterIntegration",
16-
)
179
}
1810

1911
// Order matters as this library is used as a Kotlin Jupyter kernel dependency (see #440)
Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
package com.gabrielfeo.develocity.api.internal.jupyter
22

3-
import org.jetbrains.kotlinx.jupyter.api.libraries.JupyterIntegration
3+
import org.jetbrains.kotlinx.jupyter.api.KotlinKernelVersion
4+
import org.jetbrains.kotlinx.jupyter.api.libraries.LibraryDefinition
45

56
@Suppress("unused")
6-
class DevelocityApiJupyterIntegration : JupyterIntegration() {
7+
class DevelocityApiJupyterIntegration : LibraryDefinition {
78

8-
override fun Builder.onLoaded() {
9-
import("com.gabrielfeo.develocity.api.*")
10-
import("com.gabrielfeo.develocity.api.model.*")
11-
import("com.gabrielfeo.develocity.api.extension.*")
12-
}
9+
override val minKernelVersion = KotlinKernelVersion.from("0.12.0.217")
10+
11+
override val imports = listOf(
12+
"com.gabrielfeo.develocity.api.*",
13+
"com.gabrielfeo.develocity.api.model.*",
14+
"com.gabrielfeo.develocity.api.extension.*",
15+
)
1316
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"producers": [],
3+
"definitions": [
4+
{
5+
"fqn": "com.gabrielfeo.develocity.api.internal.jupyter.DevelocityApiJupyterIntegration"
6+
}
7+
]
8+
}

0 commit comments

Comments
 (0)