From 0d7c35a40fe67931dafb024897a51bc843fd4c65 Mon Sep 17 00:00:00 2001 From: Nikita Klimenko Date: Thu, 4 Sep 2025 14:58:37 +0300 Subject: [PATCH 1/2] Update Gradle to 9.0 Our old Gradle plugin requires Kotlin 2.2.0 in Gradle runtime to work, because ParseKt refers to the new kotlin.time.Instant class Removing SimpleGit because it's for now incompatible with 9.0 --- core/api/core.api | 4 --- core/build.gradle.kts | 12 -------- .../build.gradle.kts | 4 +-- gradle/libs.versions.toml | 8 ++--- gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/SourceSetsExpectationsTest.kt | 16 ---------- .../TaskDataSchemaPropertyTest.kt | 29 ------------------- .../TaskPackageNamePropertyTest.kt | 22 -------------- 8 files changed, 7 insertions(+), 90 deletions(-) diff --git a/core/api/core.api b/core/api/core.api index 7d1a0b3d47..6d8af6928d 100644 --- a/core/api/core.api +++ b/core/api/core.api @@ -6581,8 +6581,6 @@ public final class org/jetbrains/kotlinx/dataframe/keywords/ModifierKeywords : j public static final field EXTERNAL Lorg/jetbrains/kotlinx/dataframe/keywords/ModifierKeywords; public static final field FINAL Lorg/jetbrains/kotlinx/dataframe/keywords/ModifierKeywords; public static final field FUN Lorg/jetbrains/kotlinx/dataframe/keywords/ModifierKeywords; - public static final field HEADER Lorg/jetbrains/kotlinx/dataframe/keywords/ModifierKeywords; - public static final field IMPL Lorg/jetbrains/kotlinx/dataframe/keywords/ModifierKeywords; public static final field IN Lorg/jetbrains/kotlinx/dataframe/keywords/ModifierKeywords; public static final field INFIX Lorg/jetbrains/kotlinx/dataframe/keywords/ModifierKeywords; public static final field INLINE Lorg/jetbrains/kotlinx/dataframe/keywords/ModifierKeywords; @@ -6636,8 +6634,6 @@ public final class org/jetbrains/kotlinx/dataframe/keywords/SoftKeywords : java/ public static final field FINAL Lorg/jetbrains/kotlinx/dataframe/keywords/SoftKeywords; public static final field FINALLY Lorg/jetbrains/kotlinx/dataframe/keywords/SoftKeywords; public static final field GET Lorg/jetbrains/kotlinx/dataframe/keywords/SoftKeywords; - public static final field HEADER Lorg/jetbrains/kotlinx/dataframe/keywords/SoftKeywords; - public static final field IMPL Lorg/jetbrains/kotlinx/dataframe/keywords/SoftKeywords; public static final field IMPORT Lorg/jetbrains/kotlinx/dataframe/keywords/SoftKeywords; public static final field INFIX Lorg/jetbrains/kotlinx/dataframe/keywords/SoftKeywords; public static final field INIT Lorg/jetbrains/kotlinx/dataframe/keywords/SoftKeywords; diff --git a/core/build.gradle.kts b/core/build.gradle.kts index f3de79f226..f47415e438 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -5,7 +5,6 @@ import nl.jolanrensen.kodex.gradle.creatingRunKodexTask import org.gradle.jvm.tasks.Jar import org.gradle.kotlin.dsl.withType import org.jetbrains.kotlin.gradle.tasks.KotlinCompile -import xyz.ronella.gradle.plugin.simple.git.task.GitTask plugins { with(libs.plugins) { @@ -16,7 +15,6 @@ plugins { // alias(kover) alias(ktlint) alias(kodex) - alias(simpleGit) alias(buildconfig) alias(binary.compatibility.validator) @@ -152,12 +150,6 @@ val clearSamplesOutputs by tasks.registering { } } -val addSamplesToGit by tasks.registering(GitTask::class, fun GitTask.() { - directory = file(".") - command = "add" - args = listOf("-A", "../docs/StardustDocs/resources/snippets") -}) - val copySamplesOutputs = tasks.register("copySamplesOutputs") { group = "documentation" mainClass = "org.jetbrains.kotlinx.dataframe.explainer.SampleAggregatorKt" @@ -165,10 +157,6 @@ val copySamplesOutputs = tasks.register("copySamplesOutputs") { dependsOn(clearSamplesOutputs) dependsOn(samplesTest) classpath = sourceSets.test.get().runtimeClasspath - - doLast { - addSamplesToGit.get().executeCommand() - } } tasks.withType { diff --git a/examples/kotlin-dataframe-plugin-example/build.gradle.kts b/examples/kotlin-dataframe-plugin-example/build.gradle.kts index eea5d86ac8..7f3b4df46d 100644 --- a/examples/kotlin-dataframe-plugin-example/build.gradle.kts +++ b/examples/kotlin-dataframe-plugin-example/build.gradle.kts @@ -2,8 +2,8 @@ import org.jlleitschuh.gradle.ktlint.KtlintExtension plugins { id("org.jlleitschuh.gradle.ktlint") version "12.3.0" - kotlin("jvm") version "2.2.20-dev-3524" - kotlin("plugin.dataframe") version "2.2.20-dev-3524" + kotlin("jvm") version "2.2.20-Beta2" + kotlin("plugin.dataframe") version "2.2.20-Beta2" } group = "org.example" diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b39bd67402..aadccf223a 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,11 +1,11 @@ [versions] -ksp = "2.2.0-2.0.2" +ksp = "2.2.20-Beta2-2.0.2" kotlinJupyter = "0.15.0-587" ktlint = "12.3.0" -# make sure to sync both manually with :generator module -kotlin = "2.2.0" # needs jupyter compatibility with Kotlin 2.1 to update +kotlin = "2.2.20-Beta2" +# make sure to sync manually with :generator module kotlinpoet = "2.2.0" dokka = "2.0.0" @@ -13,7 +13,7 @@ libsPublisher = "2.2.0-dev-61" # "Bootstrap" version of the dataframe, used in the build itself to generate @DataSchema APIs, # dogfood Gradle / KSP plugins in tests and idea-examples modules -dataframe = "1.0.0-dev-6538" +dataframe = "1.0.0-dev-8314" korro = "0.1.6" binaryCompatibilityValidator = "0.17.0" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ff23a68d70..2a84e188b8 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/plugins/dataframe-gradle-plugin/src/test/kotlin/org/jetbrains/dataframe/gradle/SourceSetsExpectationsTest.kt b/plugins/dataframe-gradle-plugin/src/test/kotlin/org/jetbrains/dataframe/gradle/SourceSetsExpectationsTest.kt index d2330fd905..eb08968465 100644 --- a/plugins/dataframe-gradle-plugin/src/test/kotlin/org/jetbrains/dataframe/gradle/SourceSetsExpectationsTest.kt +++ b/plugins/dataframe-gradle-plugin/src/test/kotlin/org/jetbrains/dataframe/gradle/SourceSetsExpectationsTest.kt @@ -1,9 +1,7 @@ package org.jetbrains.dataframe.gradle -import io.kotest.assertions.asClue import io.kotest.inspectors.forAny import io.kotest.matchers.shouldBe -import org.jetbrains.kotlin.gradle.dsl.KotlinAndroidProjectExtension import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension import org.junit.Test @@ -29,18 +27,4 @@ class SourceSetsExpectationsTest { it.sourceSets.findByName("jvmMain") shouldBe null } } - - @Test - fun `there is main in android project`() { - val project = makeProject() - project.plugins.apply("com.android.application") - project.plugins.apply("org.jetbrains.kotlin.android") - project.extensions.getByType(KotlinAndroidProjectExtension::class.java).let { extension -> - val main = extension.sourceSets.getByName("main") - main.kotlin.sourceDirectories.toList().asClue { files -> - files.forAny { it.shouldEndWith("src", "main", "java") } - files.forAny { it.shouldEndWith("src", "main", "kotlin") } - } - } - } } diff --git a/plugins/dataframe-gradle-plugin/src/test/kotlin/org/jetbrains/dataframe/gradle/taskProperties/TaskDataSchemaPropertyTest.kt b/plugins/dataframe-gradle-plugin/src/test/kotlin/org/jetbrains/dataframe/gradle/taskProperties/TaskDataSchemaPropertyTest.kt index ea87f0dd7d..1256bb3e76 100644 --- a/plugins/dataframe-gradle-plugin/src/test/kotlin/org/jetbrains/dataframe/gradle/taskProperties/TaskDataSchemaPropertyTest.kt +++ b/plugins/dataframe-gradle-plugin/src/test/kotlin/org/jetbrains/dataframe/gradle/taskProperties/TaskDataSchemaPropertyTest.kt @@ -1,6 +1,5 @@ package org.jetbrains.dataframe.gradle.taskProperties -import com.android.build.gradle.internal.dsl.BaseAppModuleExtension import io.kotest.assertions.throwables.shouldNotThrow import io.kotest.matchers.shouldBe import org.gradle.api.ProjectConfigurationException @@ -8,7 +7,6 @@ import org.jetbrains.dataframe.gradle.GenerateDataSchemaTask import org.jetbrains.dataframe.gradle.SchemaGeneratorExtension import org.jetbrains.dataframe.gradle.SchemaGeneratorPlugin import org.jetbrains.dataframe.gradle.makeProject -import org.jetbrains.kotlin.gradle.dsl.KotlinAndroidProjectExtension import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension import org.junit.Test @@ -35,31 +33,4 @@ class TaskDataSchemaPropertyTest { .dataSchema.get() .shouldBe(project.file("build/generated/dataframe/main1/kotlin/org/example/my/321.Generated.kt")) } - - @Test - fun `extension sourceSet present in android project`() { - val project = makeProject() - project.plugins.apply(SchemaGeneratorPlugin::class.java) - project.plugins.apply("com.android.application") - project.plugins.apply("org.jetbrains.kotlin.android") - (project.extensions.getByName("android") as BaseAppModuleExtension).let { - it.compileSdk = 30 - } - project.extensions.getByType(KotlinAndroidProjectExtension::class.java).apply { - sourceSets.create("main1") - } - project.extensions.getByType(SchemaGeneratorExtension::class.java).apply { - sourceSet = "main1" - schema { - data = "123" - name = "org.example.my.321" - } - } - shouldNotThrow { - project.evaluate() - } - (project.tasks.getByName("generateDataFrame321") as GenerateDataSchemaTask) - .dataSchema.get() - .shouldBe(project.file("build/generated/dataframe/main1/kotlin/org/example/my/321.Generated.kt")) - } } diff --git a/plugins/dataframe-gradle-plugin/src/test/kotlin/org/jetbrains/dataframe/gradle/taskProperties/TaskPackageNamePropertyTest.kt b/plugins/dataframe-gradle-plugin/src/test/kotlin/org/jetbrains/dataframe/gradle/taskProperties/TaskPackageNamePropertyTest.kt index 5becda95fd..66ef7f1eaf 100644 --- a/plugins/dataframe-gradle-plugin/src/test/kotlin/org/jetbrains/dataframe/gradle/taskProperties/TaskPackageNamePropertyTest.kt +++ b/plugins/dataframe-gradle-plugin/src/test/kotlin/org/jetbrains/dataframe/gradle/taskProperties/TaskPackageNamePropertyTest.kt @@ -1,6 +1,5 @@ package org.jetbrains.dataframe.gradle.taskProperties -import com.android.build.gradle.internal.dsl.BaseAppModuleExtension import io.kotest.assertions.throwables.shouldThrow import io.kotest.matchers.shouldBe import org.gradle.api.ProjectConfigurationException @@ -113,27 +112,6 @@ class TaskPackageNamePropertyTest { .packageName.get() shouldBe "org.test.dataframe" } - @Test - fun `task infers packageName from directory structure on android`() { - val project = makeProject() - project.plugins.apply(SchemaGeneratorPlugin::class.java) - project.plugins.apply("com.android.application") - project.plugins.apply("org.jetbrains.kotlin.android") - (project.extensions.getByName("android") as BaseAppModuleExtension).let { - it.compileSdk = 30 - } - File(project.projectDir, "/src/main/kotlin/org/test/").also { it.mkdirs() } - project.extensions.getByType(SchemaGeneratorExtension::class.java).apply { - schema { - data = "123" - name = "321" - } - } - project.evaluate() - (project.tasks.getByName("generateDataFrame321") as GenerateDataSchemaTask) - .packageName.get() shouldBe "org.test.dataframe" - } - @Test fun `task will not add _dataframe_ if inferred package ends with _dataframe_`() { val project = makeProject() From f1659ff4097ad5f7b3929612690e81d707b27e94 Mon Sep 17 00:00:00 2001 From: Nikita Klimenko Date: Tue, 9 Sep 2025 14:38:55 +0300 Subject: [PATCH 2/2] Disable publishing of module that was moved to Kotlin --- plugins/kotlin-dataframe/README.md | 10 ++-------- plugins/kotlin-dataframe/build.gradle.kts | 12 ------------ 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/plugins/kotlin-dataframe/README.md b/plugins/kotlin-dataframe/README.md index 7fbb5a6d2d..94a8e247fb 100644 --- a/plugins/kotlin-dataframe/README.md +++ b/plugins/kotlin-dataframe/README.md @@ -1,10 +1,4 @@ ## :plugins:kotlin-dataframe -This module, published as "compiler-plugin-all", holds the Kotlin 2.x Compiler plugin of DataFrame. - -A [work-in-progress](https://github.com/Kotlin/dataframe/issues/704) -plugin for your Kotlin project that can generate on-the-fly column accessors for the compiler and IDE even without -having to provide data schemas! - -Details of how to use this compiler plugin for your own project will follow, but there is a -[demo project](https://github.com/koperagen/df-plugin-demo) you can try already. +Development of this module was moved to the Kotlin repository: +https://github.com/JetBrains/kotlin/tree/master/plugins/kotlin-dataframe diff --git a/plugins/kotlin-dataframe/build.gradle.kts b/plugins/kotlin-dataframe/build.gradle.kts index f07cc7463b..8028d756f0 100644 --- a/plugins/kotlin-dataframe/build.gradle.kts +++ b/plugins/kotlin-dataframe/build.gradle.kts @@ -4,8 +4,6 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinVersion plugins { id("java") kotlin("jvm") - kotlin("libs.publisher") - id("com.github.johnrengelman.shadow") version "8.1.1" kotlin("plugin.serialization") } @@ -112,16 +110,6 @@ fun Test.setLibraryProperty(propName: String, jarName: String) { systemProperty(propName, path) } -kotlinPublications { - fairDokkaJars = false - publication { - publicationName = "api" - artifactId = "compiler-plugin-all" - description = "Data processing in Kotlin" - packageName = artifactId - } -} - // Disabling all tests before removing the compiler plugin here // because we're moving to the Kotlin repo: #1290 tasks.filter {