Skip to content

Commit

Permalink
version bumping kotlinpoet (:generator one behind), sl4j, junit, kote…
Browse files Browse the repository at this point in the history
…st, converting more string->toml.accessors
  • Loading branch information
Jolanrensen committed Feb 14, 2024
1 parent 8b5964b commit c1f65f8
Show file tree
Hide file tree
Showing 9 changed files with 75 additions and 43 deletions.
1 change: 1 addition & 0 deletions generator/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ gradlePlugin {
plugins {
create("dependencies") {
id = "org.jetbrains.dataframe.generator"
version = "1.0"
implementationClass = "org.jetbrains.dataframe.keywords.KeywordsGeneratorPlugin"
}
}
Expand Down
6 changes: 4 additions & 2 deletions generator/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
kotlinCompilerVersion=1.6.0
kotlinPoetVersion=1.7.2
kotlinCompilerVersion=1.9.22

# 1.15.0+ breaks with NoSuchMethodException: 'java.io.File com.squareup.kotlinpoet.FileSpec.writeTo(java.io.File)'
kotlinPoetVersion=1.14.2
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ open class GeneratorTask : DefaultTask() {
}

private fun getKeywords(tokenSet: TokenSet): List<EnumEntry> {
fun id(value: String) = value.toUpperCase().replace("!", "NOT_")
fun id(value: String) = value.uppercase().replace("!", "NOT_")

return tokenSet.types.map { t ->
t as KtKeywordToken
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import java.io.File

class KeywordsGeneratorPlugin: Plugin<Project> {
override fun apply(target: Project): Unit = with(target){
val genSrcDir = buildDir.resolve("generatedSrc")
val genSrcDir = layout.buildDirectory.asFile.get().resolve("generatedSrc")
val sourceSets = project.extensions.getByName("sourceSets") as SourceSetContainer
val mainSourceSet: SourceSet = sourceSets.named("main").get()
mainSourceSet.addDir(genSrcDir)
Expand Down
58 changes: 41 additions & 17 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
ksp = "1.9.21-1.0.15"
kotlinJupyter = "0.11.0-358"
ktlint = "3.4.5"

# make sure to sync with :generator module
kotlin = "1.9.0"
kotlinpoet = "1.16.0"

dokka = "1.8.10"
libsPublisher = "0.0.60-dev-30"
# "Bootstrap" version of the dataframe, used in the build itself to generate @DataSchema APIs,
Expand All @@ -22,13 +26,14 @@ mysql = "8.0.33"
postgresql = "42.6.0"
sqlite = "3.42.0.1"
kotlinDatetime = "0.4.0"
kotlinpoet = "1.16.0"
openapi = "2.1.20"
kotlinLogging = "5.0.1"
sl4j = "2.0.7"
kotlinLogging = "6.0.3"
sl4j = "2.0.12"

junit = "4.13.2"
kotestAsserions = "4.6.3"
junit-jupiter = "5.10.2"
junit-platform = "1.10.2"
kotestAsserions = "5.8.0"
jsoup = "1.14.3"
arrow = "11.0.0"
docProcessor = "0.3.2"
Expand All @@ -38,34 +43,44 @@ plugin-publish = "0.15.0"
shadow = "8.1.1"
android-gradle-api = "7.3.1"
ktor-server-netty = "2.3.8"
kotlin-compile-testing = "1.5.0"

[libraries]
ksp-gradle = { group = "com.google.devtools.ksp", name = "symbol-processing-gradle-plugin", version.ref = "ksp" }
ksp-api = { group = "com.google.devtools.ksp", name = "symbol-processing-api", version.ref = "ksp" }
jupyter-api = { module = "org.jetbrains.kotlinx:kotlin-jupyter-kernel", version.ref = "kotlinJupyter" }
jupyter-api = { group = "org.jetbrains.kotlinx", name = "kotlin-jupyter-kernel", version.ref = "kotlinJupyter" }

kotlin-stdlib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib", version.ref = "kotlin" }
kotlin-stdlib-jdk8 = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib-jdk8", version.ref = "kotlin" }

kotlin-reflect = { group = "org.jetbrains.kotlin", name = "kotlin-reflect", version.ref = "kotlin" }
kotlin-scriptingJvm = { group = "org.jetbrains.kotlin", name = "kotlin-scripting-jvm", version.ref = "kotlin" }
commonsCsv = { module = "org.apache.commons:commons-csv", version.ref = "commonsCsv" }
commonsCompress = { module = "org.apache.commons:commons-compress", version.ref = "commonsCompress" }
klaxon = { module = "com.beust:klaxon", version.ref = "klaxon" }
fuel = { module = "com.github.kittinunf.fuel:fuel", version.ref = "fuel" }
poi = { module = "org.apache.poi:poi", version.ref = "poi" }
commonsCsv = { group = "org.apache.commons", name = "commons-csv", version.ref = "commonsCsv" }
commonsCompress = { group = "org.apache.commons", name = "commons-compress", version.ref = "commonsCompress" }
klaxon = { group = "com.beust", name = "klaxon", version.ref = "klaxon" }
fuel = { group = "com.github.kittinunf.fuel", name = "fuel", version.ref = "fuel" }
poi = { group = "org.apache.poi", name = "poi", version.ref = "poi" }
mariadb = { group = "org.mariadb.jdbc", name = "mariadb-java-client", version.ref = "mariadb" }
h2db = { group = "com.h2database", name = "h2", version.ref = "h2db" }
mysql = { group = "mysql", name = "mysql-connector-java", version.ref = "mysql" }
postgresql = { group = "org.postgresql", name = "postgresql", version.ref = "postgresql" }
sqlite = { group = "org.xerial", name = "sqlite-jdbc", version.ref = "sqlite" }

poi-ooxml = { module = "org.apache.poi:poi-ooxml", version.ref = "poi" }
kotlin-datetimeJvm = { module = "org.jetbrains.kotlinx:kotlinx-datetime-jvm", version.ref = "kotlinDatetime" }
poi-ooxml = { group = "org.apache.poi", name = "poi-ooxml", version.ref = "poi" }
kotlin-datetimeJvm = { group = "org.jetbrains.kotlinx", name = "kotlinx-datetime-jvm", version.ref = "kotlinDatetime" }

junit = { module = "junit:junit", version.ref = "junit" }
kotestAssertions = { module = "io.kotest:kotest-assertions-core", version.ref = "kotestAsserions" }
jsoup = { module = "org.jsoup:jsoup", version.ref = "jsoup" }
junit = { group = "junit", name = "junit", version.ref = "junit" }

junit-bom = { group = "org.junit", name = "junit-bom", version.ref = "junit-jupiter" }
junit-jupiter = { group = "org.junit.jupiter", name = "junit-jupiter", version.ref = "junit-jupiter" }
junit-jupiter-engine = { group = "org.junit.jupiter", name = "junit-jupiter-engine", version.ref = "junit-jupiter" }
junit-platform-commons = { group = "org.junit.platform", name = "junit-platform-commons", version.ref = "junit-platform" }
junit-platform-launcher = { group = "org.junit.platform", name = "junit-platform-launcher", version.ref = "junit-platform" }
junit-platform-runner = { group = "org.junit.platform", name = "junit-platform-runner", version.ref = "junit-platform" }
junit-platform-suite-api = { group = "org.junit.platform", name = "junit-platform-suite-api", version.ref = "junit-platform" }

kotestAssertions = { group = "io.kotest", name = "kotest-assertions-core", version.ref = "kotestAsserions" }
jsoup = { group = "org.jsoup", name = "jsoup", version.ref = "jsoup" }

arrow-format = { group = "org.apache.arrow", name = "arrow-format", version.ref = "arrow" }
arrow-vector = { group = "org.apache.arrow", name = "arrow-vector", version.ref = "arrow" }
Expand All @@ -78,7 +93,17 @@ kotlinLogging = { group = "io.github.oshai", name = "kotlin-logging", version.re
sl4j = { group = "org.slf4j", name = "slf4j-simple", version.ref = "sl4j" }
android-gradle-api = { group = "com.android.tools.build", name = "gradle-api", version.ref = "android-gradle-api" }
android-gradle = { group = "com.android.tools.build", name = "gradle", version.ref = "android-gradle-api" }
kotlin-gradle-plugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin" }
kotlin-gradle-plugin-api = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin-api" }
ktor-server-netty = { group = "io.ktor", name = "ktor-server-netty", version.ref = "ktor-server-netty" }
kotlin-compile-testing = { group = "com.github.tschuchortdev", name = "kotlin-compile-testing", version.ref = "kotlin-compile-testing" }
kotlin-compile-testing-ksp = { group = "com.github.tschuchortdev", name = "kotlin-compile-testing-ksp", version.ref = "kotlin-compile-testing" }
kotlin-compiler = { group = "org.jetbrains.kotlin", name = "kotlin-compiler", version.ref = "kotlin" }
kotlin-compiler-embeddable = { group = "org.jetbrains.kotlin", name = "kotlin-compiler-embeddable", version.ref = "kotlin" }
kotlin-compiler-internal-test-framework = { group = "org.jetbrains.kotlin", name = "kotlin-compiler-internal-test-framework", version.ref = "kotlin" }
kotlin-test = { group = "org.jetbrains.kotlin", name = "kotlin-test", version.ref = "kotlin" }
kotlin-script-runtime = { group = "org.jetbrains.kotlin", name = "kotlin-script-runtime", version.ref = "kotlin" }
kotlin-annotations-jvm = { group = "org.jetbrains.kotlin", name = "kotlin-annotations-jvm", version.ref = "kotlin" }

[plugins]
jupyter-api = { id = "org.jetbrains.kotlin.jupyter.api", version.ref = "kotlinJupyter" }
Expand All @@ -92,10 +117,9 @@ kotlinter = { id = "org.jmailen.kotlinter", version.ref = "ktlint" }
dataframe = { id = "org.jetbrains.kotlinx.dataframe", version.ref = "dataframe" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
docProcessor = { id = "nl.jolanrensen.docProcessor", version.ref = "docProcessor" }
simpleGit = { id = "xyz.ronella.simple-git", version.ref = "simpleGit"}
simpleGit = { id = "xyz.ronella.simple-git", version.ref = "simpleGit" }
serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
dependencyVersions = { id = "com.github.ben-manes.versions", version.ref = "dependencyVersions" }
plugin-publish = { id = "com.gradle.plugin-publish", version.ref = "plugin-publish" }
shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadow" }

6 changes: 4 additions & 2 deletions plugins/dataframe-gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ dependencies {
implementation(project(":dataframe-openapi"))
implementation(project(":dataframe-excel"))
implementation(project(":dataframe-jdbc"))
implementation(kotlin("gradle-plugin-api"))
implementation(kotlin("gradle-plugin"))

implementation(libs.kotlin.gradle.plugin.api)
implementation(libs.kotlin.gradle.plugin)
implementation(libs.klaxon)
implementation(libs.ksp.gradle)
implementation(libs.ksp.api)
Expand Down Expand Up @@ -71,6 +72,7 @@ gradlePlugin {
}
}


pluginBundle {
// These settings are set for the whole plugin bundle
website = "https://github.com/Kotlin/dataframe"
Expand Down
29 changes: 14 additions & 15 deletions plugins/expressions-converter/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,25 @@ repositories {
}

dependencies {
val kotlinVersion = libs.versions.kotlin.get()
val compiler = "org.jetbrains.kotlin:kotlin-compiler:$kotlinVersion"
compileOnly(compiler)
compileOnly(libs.kotlin.compiler)

testImplementation(compiler)
testImplementation("org.jetbrains.kotlin:kotlin-compiler-internal-test-framework:$kotlinVersion")
testImplementation(libs.kotlin.compiler)
testImplementation(libs.kotlin.compiler.internal.test.framework)

testRuntimeOnly(project(":core"))

testRuntimeOnly("org.jetbrains.kotlin:kotlin-test:$kotlinVersion")
testRuntimeOnly("org.jetbrains.kotlin:kotlin-script-runtime:$kotlinVersion")
testRuntimeOnly("org.jetbrains.kotlin:kotlin-annotations-jvm:$kotlinVersion")
testRuntimeOnly(libs.kotlin.test)
testRuntimeOnly(libs.kotlin.script.runtime)
testRuntimeOnly(libs.kotlin.annotations.jvm)

testImplementation(platform("org.junit:junit-bom:5.8.0"))
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("org.junit.platform:junit-platform-commons")
testImplementation("org.junit.platform:junit-platform-launcher")
testImplementation("org.junit.platform:junit-platform-runner")
testImplementation("org.junit.platform:junit-platform-suite-api")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.1")
testImplementation(platform(libs.junit.bom))
testImplementation(libs.junit.jupiter)
testImplementation(libs.junit.platform.commons)
testImplementation(libs.junit.platform.launcher)
testImplementation(libs.junit.platform.runner)
testImplementation(libs.junit.platform.suite.api)

testRuntimeOnly(libs.junit.jupiter.engine)
}

tasks.test {
Expand Down
12 changes: 7 additions & 5 deletions plugins/symbol-processor/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlinx.publisher.PomUtilKt

plugins {
alias(libs.plugins.shadow)
alias(libs.plugins.kotlin.jvm)
Expand All @@ -24,15 +26,15 @@ dependencies {
implementation(libs.h2db)
testImplementation(libs.h2db)
testImplementation("org.jetbrains.kotlin:kotlin-test")
testImplementation("com.github.tschuchortdev:kotlin-compile-testing:1.5.0")
testImplementation("com.github.tschuchortdev:kotlin-compile-testing-ksp:1.5.0")
testImplementation("io.ktor:ktor-server-netty:1.6.7")
testImplementation("io.kotest:kotest-assertions-core:4.6.0")
testImplementation(libs.kotlin.compile.testing)
testImplementation(libs.kotlin.compile.testing.ksp)
testImplementation(libs.ktor.server.netty)
testImplementation(libs.kotestAssertions)
}

kotlinPublications {
pom {
use(org.jetbrains.kotlinx.publisher.PomUtilKt) {
use(PomUtilKt) {
githubRepo("Kotlin", "dataframe")
inceptionYear.set("2021")
licenses {
Expand Down
2 changes: 2 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

rootProject.name = "dataframe"

// treated as a separate project with its own Kotlin version etc.
includeBuild("generator")

include("plugins:dataframe-gradle-plugin")
include("plugins:symbol-processor")
include("plugins:expressions-converter")
Expand Down

0 comments on commit c1f65f8

Please sign in to comment.