Skip to content

Publish compiler plugin :core subset from another module #1096

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 0 additions & 34 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import com.google.devtools.ksp.gradle.KspTask
import com.google.devtools.ksp.gradle.KspTaskJvm
import io.github.devcrocod.korro.KorroTask
Expand All @@ -21,7 +20,6 @@ plugins {
alias(simpleGit)
alias(buildconfig)
alias(binary.compatibility.validator)
alias(shadow)

// generates keywords using the :generator module
alias(keywordGenerator)
Expand Down Expand Up @@ -176,38 +174,6 @@ tasks.withType<KorroTask> {
dependsOn(copySamplesOutputs)
}

// region shadow

tasks.withType<ShadowJar> {
dependencies {
exclude(dependency("org.jetbrains.kotlin:kotlin-reflect:.*"))
exclude(dependency("org.jetbrains.kotlin:kotlin-stdlib:.*"))
exclude(dependency("org.jetbrains.kotlinx:kotlinx-datetime-jvm:.*"))
exclude(dependency("commons-io:commons-io:.*"))
exclude(dependency("commons-io:commons-csv:.*"))
exclude(dependency("org.apache.commons:commons-csv:.*"))
exclude(dependency("org.slf4j:slf4j-api:.*"))
exclude(dependency("io.github.microutils:kotlin-logging-jvm:.*"))
exclude(dependency("org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:.*"))
exclude(dependency("org.jetbrains.kotlinx:kotlinx-serialization-json-jvm:.*"))
exclude(dependency("commons-codec:commons-codec:.*"))
exclude(dependency("com.squareup:kotlinpoet-jvm:.*"))
exclude(dependency("ch.randelshofer:fastdoubleparser:.*"))
}
exclude("org/jetbrains/kotlinx/dataframe/jupyter/**")
exclude("org/jetbrains/kotlinx/dataframe/io/**")
exclude("org/jetbrains/kotlinx/dataframe/documentation/**")
exclude("org/jetbrains/kotlinx/dataframe/impl/io/**")
exclude("io/github/oshai/kotlinlogging/**")
exclude("apache/**")
exclude("**.html")
exclude("**.js")
exclude("**.css")
minimize()
}

// endregion

// region docPreprocessor

val generatedSourcesFolderName = "generated-sources"
Expand Down
4 changes: 4 additions & 0 deletions dataframe-compiler-plugin-core/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### :dataframe-compiler-plugin-core

Subset of :core used by [compiler plugin](https://github.com/JetBrains/kotlin/tree/master/plugins/kotlin-dataframe) to implement compile time interpreters of operations.
Bundled together with compiler plugin in Kotlin and by extension in IntelliJ. Should aim to include only necessary code
70 changes: 70 additions & 0 deletions dataframe-compiler-plugin-core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.gradle.kotlin.dsl.withType

plugins {
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.shadow)
alias(libs.plugins.publisher)
alias(libs.plugins.ktlint)
}

group = "org.jetbrains.kotlinx.dataframe"

repositories {
mavenCentral()
}

dependencies {
implementation(project(":core")) {
exclude(group = "org.jetbrains.kotlin", module = "kotlin-reflect")
exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib")
exclude(group = "org.jetbrains.kotlinx", module = "kotlinx-datetime-jvm")
exclude(group = "commons-io", module = "commons-io")
exclude(group = "commons-io", module = "commons-csv")
exclude(group = "org.apache.commons", module = "commons-csv")
exclude(group = "org.slf4j", module = "slf4j-api")
exclude(group = "io.github.microutils", module = "kotlin-logging-jvm")
exclude(group = "org.jetbrains.kotlinx", module = "kotlinx-serialization-core-jvm")
exclude(group = "org.jetbrains.kotlinx", module = "kotlinx-serialization-json-jvm")
exclude(group = "commons-codec", module = "commons-codec")
exclude(group = "com.squareup", module = "kotlinpoet-jvm")
exclude(group = "ch.randelshofer", module = "fastdoubleparser")
exclude(group = "io.github.oshai", module = "kotlin-logging-jvm")
}
}

tasks.withType<ShadowJar> {
dependencies {
exclude(dependency("org.jetbrains.kotlin:kotlin-reflect:.*"))
exclude(dependency("org.jetbrains.kotlin:kotlin-stdlib:.*"))
exclude(dependency("org.jetbrains.kotlinx:kotlinx-datetime-jvm:.*"))
exclude(dependency("commons-io:commons-io:.*"))
exclude(dependency("commons-io:commons-csv:.*"))
exclude(dependency("org.apache.commons:commons-csv:.*"))
exclude(dependency("org.slf4j:slf4j-api:.*"))
exclude(dependency("io.github.microutils:kotlin-logging-jvm:.*"))
exclude(dependency("org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:.*"))
exclude(dependency("org.jetbrains.kotlinx:kotlinx-serialization-json-jvm:.*"))
exclude(dependency("commons-codec:commons-codec:.*"))
exclude(dependency("com.squareup:kotlinpoet-jvm:.*"))
exclude(dependency("ch.randelshofer:fastdoubleparser:.*"))
exclude(dependency("io.github.oshai:kotlinlogging:.*"))
}
exclude("org/jetbrains/kotlinx/dataframe/jupyter/**")
exclude("org/jetbrains/kotlinx/dataframe/io/**")
exclude("org/jetbrains/kotlinx/dataframe/documentation/**")
exclude("org/jetbrains/kotlinx/dataframe/impl/io/**")
exclude("io/github/oshai/kotlinlogging/**")
exclude("apache/**")
exclude("**.html")
exclude("**.js")
exclude("**.css")
}

kotlinPublications {
publication {
publicationName = "shadowed"
artifactId = "dataframe-compiler-plugin-core"
packageName = artifactId
}
}
2 changes: 1 addition & 1 deletion plugins/kotlin-dataframe/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ dependencies {
testRuntimeOnly("org.jetbrains.kotlin:kotlin-script-runtime:$kotlinVersion")
testRuntimeOnly("org.jetbrains.kotlin:kotlin-annotations-jvm:$kotlinVersion")

implementation(project(":core", "shadow"))
implementation(project(":dataframe-compiler-plugin-core", "shadow"))
testRuntimeOnly(project(":core"))
testRuntimeOnly(project(":dataframe-csv"))
testImplementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion")
Expand Down
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ include("core")
include("dataframe-openapi-generator")
include("dataframe-geo")
include("plugins:public-api-modifier")
include("dataframe-compiler-plugin-core")