Skip to content

Commit 4e5625c

Browse files
authored
Merge pull request #590 from Kotlin/version-bumps
Version bumps
2 parents 3091224 + 12afbc2 commit 4e5625c

File tree

39 files changed

+421
-253
lines changed

39 files changed

+421
-253
lines changed

RELEASE_CHECK_LIST.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
**Release activities check-list for releases:**
22

3-
0. Run code inspections (fix typos, Kotlin issues, fix code formatting, linter)
4-
1. Write missed KDocs for new APIs
5-
2. Update tutorials according to last code changes
6-
3. Update README.MD according last code changes
3+
1. Run code inspections (fix typos, Kotlin issues, fix code formatting, linter)
4+
2. Write missed KDocs for new APIs
5+
3. Update tutorials according to last code changes
6+
4. Update README.MD according last code changes
77
- update an artifact version
88
- update a Kotlin version
99
- update the [section](README.md#kotlin-kotlin-jupyter-openapi-arrow-and-jdk-versions) about library versions
10-
4. Update a project version in the file `gradle.properties` (i.e. 0.9.0 -> 0.10.0)
10+
5. Update a project version in the file `gradle.properties` (i.e. 0.9.0 -> 0.10.0)
1111
- For major releases: update a project version in the file [`v.list`](https://github.com/Kotlin/dataframe/blame/master/docs/StardustDocs/v.list)
1212
- For major releases: update a project version in the file [`main.yml`](https://github.com/Kotlin/dataframe/blob/master/.github/workflows/main.yml)
1313
- For major releases: update a project version in the file [`project.ihp`](https://github.com/Kotlin/dataframe/blob/master/docs/StardustDocs/project.ihp)
14-
5. Update `libs.versions.toml` file if required
15-
6. Create and checkout the release branch
16-
7. Make last commit with release tag (_v0.1.1_ for example) to the release branch
17-
8. Run tests and build artifacts on TC for the commit with the release tag
18-
9. Deploy artifacts on MavenCentral via `Publish` task running on TC based on the commit with the release tag
19-
10. Check artifacts' availability on [MavenCentral](https://mvnrepository.com/artifact/org.jetbrains.kotlinx/dataframe)
20-
11. Check [Gradle Plugin portal availability](https://plugins.gradle.org/plugin/org.jetbrains.kotlinx.dataframe/) (usually it takes 12 hours)
21-
12. Update a bootstrap dependency version in the `libs.versions.toml` file (only after the plugin's publication)
22-
13. Make final testing
14+
6. Update `libs.versions.toml` file if required, run `./gradlew dependencyUpdates` to check for updates
15+
7. Create and checkout the release branch
16+
8. Make last commit with release tag (_v0.1.1_ for example) to the release branch
17+
9. Run tests and build artifacts on TC for the commit with the release tag
18+
10. Deploy artifacts on MavenCentral via `Publish` task running on TC based on the commit with the release tag
19+
11. Check artifacts' availability on [MavenCentral](https://mvnrepository.com/artifact/org.jetbrains.kotlinx/dataframe)
20+
12. Check [Gradle Plugin portal availability](https://plugins.gradle.org/plugin/org.jetbrains.kotlinx.dataframe/) (usually it takes 12 hours)
21+
13. Update a bootstrap dependency version in the `libs.versions.toml` file (only after the plugin's publication)
22+
14. Make final testing
2323
- Check on Datalore with a test project (TODO: add link)
2424
- Check for Android with a test project (TODO: add link)
2525
- Check for ServerSide with a test project (TODO: add link)
26-
14. Publish Documentation from [GitHub Action](https://github.com/Kotlin/dataframe/actions/workflows/main.yml)
27-
15. Prepare and publish the Release Notes
28-
16. Create Release from the release tag on GitHub
29-
17. Update a KDF version in the [Kotlin Jupyter Descriptor](https://github.com/Kotlin/kotlin-jupyter-libraries/blob/master/dataframe.json). Now the Renovate bot doing this
30-
18. Update DataFrame version in the `gradle.properties` file for the next release cycle (i.e. 0.10.0 -> 0.11.0)
31-
19. Update deprecated functions in [deprecationMessages.kt](/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/util/deprecationMessages.kt)
26+
15. Publish Documentation from [GitHub Action](https://github.com/Kotlin/dataframe/actions/workflows/main.yml)
27+
16. Prepare and publish the Release Notes
28+
17. Create Release from the release tag on GitHub
29+
18. Update a KDF version in the [Kotlin Jupyter Descriptor](https://github.com/Kotlin/kotlin-jupyter-libraries/blob/master/dataframe.json). Now the Renovate bot doing this
30+
19. Update DataFrame version in the `gradle.properties` file for the next release cycle (i.e. 0.10.0 -> 0.11.0)
31+
20. Update deprecated functions in [deprecationMessages.kt](/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/util/deprecationMessages.kt)
3232
such that
3333
- `Level.WARNING` messages are changed to `Level.ERROR`
3434
- `Level.ERROR` messages and their functions are removed.
3535
- Update regions in the file accordingly.
36-
20. Update Notebook examples, both in the project and on Datalore.
36+
21. Update Notebook examples, both in the project and on Datalore.

build.gradle.kts

Lines changed: 95 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,32 @@
1+
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
12
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2-
import org.jetbrains.kotlin.tooling.core.closure
3+
import org.jetbrains.kotlinx.dataframe.AnyFrame
4+
import org.jetbrains.kotlinx.dataframe.DataFrame
5+
import org.jetbrains.kotlinx.dataframe.api.filter
6+
import org.jetbrains.kotlinx.dataframe.api.print
7+
import org.jetbrains.kotlinx.dataframe.api.select
8+
import org.jetbrains.kotlinx.dataframe.io.readJson
39
import org.jetbrains.kotlinx.publisher.apache2
410
import org.jetbrains.kotlinx.publisher.developer
511
import org.jetbrains.kotlinx.publisher.githubRepo
6-
import org.jmailen.gradle.kotlinter.KotlinterExtension
712

8-
@Suppress("DSL_SCOPE_VIOLATION", "UnstableApiUsage")
913
plugins {
10-
kotlin("jvm") version libs.versions.kotlin
11-
kotlin("libs.publisher") version libs.versions.libsPublisher
12-
kotlin("plugin.serialization") version libs.versions.kotlin
13-
id("org.jetbrains.kotlinx.dataframe") version libs.versions.dataframe apply false
14-
kotlin("jupyter.api") version libs.versions.kotlinJupyter apply false
15-
16-
id("org.jetbrains.dokka") version libs.versions.dokka
17-
id("org.jetbrains.kotlinx.kover") version libs.versions.kover
18-
id("org.jmailen.kotlinter") version libs.versions.ktlint
19-
id("nl.jolanrensen.docProcessor") version libs.versions.docProcessor apply false
20-
id("xyz.ronella.simple-git") version libs.versions.simpleGit apply false
14+
with(libs.plugins) {
15+
alias(kotlin.jvm)
16+
alias(publisher)
17+
alias(serialization)
18+
alias(jupyter.api) apply false
19+
alias(dokka)
20+
alias(kover)
21+
alias(kotlinter)
22+
alias(docProcessor) apply false
23+
alias(simpleGit) apply false
24+
alias(dependencyVersions)
25+
26+
// dependence on our own plugin
27+
alias(dataframe) apply false
28+
alias(ksp) apply false
29+
}
2130
}
2231

2332
val jupyterApiTCRepo: String by project
@@ -42,6 +51,78 @@ dependencies {
4251
api(project(":dataframe-jdbc"))
4352
}
4453

54+
private enum class Version : Comparable<Version> {
55+
SNAPSHOT, DEV, ALPHA, BETA, RC, STABLE;
56+
}
57+
58+
private fun String.findVersion(): Version {
59+
val version = this.lowercase()
60+
return when {
61+
"snapshot" in version -> Version.SNAPSHOT
62+
"dev" in version -> Version.DEV
63+
"alpha" in version -> Version.ALPHA
64+
"beta" in version -> Version.BETA
65+
"rc" in version -> Version.RC
66+
else -> Version.STABLE
67+
}
68+
}
69+
70+
// these names of outdated dependencies will not show up in the table output
71+
val dependencyUpdateExclusions = listOf(
72+
// 5.6 requires Java 11
73+
libs.klaxon.get().name,
74+
// TODO Requires more work to be updated to 1.7.0+, https://github.com/Kotlin/dataframe/issues/594
75+
libs.plugins.kover.get().pluginId,
76+
// TODO Updating requires major changes all across the project, https://github.com/Kotlin/dataframe/issues/364
77+
libs.plugins.kotlinter.get().pluginId,
78+
// TODO 5.8.0 is not possible due to https://github.com/Kotlin/dataframe/issues/595
79+
libs.kotestAssertions.get().name,
80+
// Can't be updated to 7.4.0+ due to Java 8 compatibility
81+
libs.android.gradle.api.get().group,
82+
// TODO 1.9.10 requires korro and docProcessor to update, https://github.com/Kotlin/dataframe/issues/596
83+
libs.plugins.dokka.get().pluginId,
84+
// Directly dependent on the Gradle version
85+
"org.gradle.kotlin.kotlin-dsl",
86+
)
87+
88+
// run `./gradlew dependencyUpdates` to check for updates
89+
tasks.named<DependencyUpdatesTask>("dependencyUpdates").configure {
90+
checkForGradleUpdate = true
91+
outputFormatter = "json,html"
92+
revision = "milestone"
93+
94+
rejectVersionIf {
95+
val current = currentVersion.findVersion()
96+
val candidate = candidate.version.findVersion()
97+
candidate < current
98+
}
99+
100+
doLast {
101+
val outputFile = layout.buildDirectory
102+
.file("../$outputDir/$reportfileName.json")
103+
.get().asFile
104+
when (val outDatedDependencies = DataFrame.readJson(outputFile)["outdated"]["dependencies"][0]) {
105+
is AnyFrame -> {
106+
val df = outDatedDependencies.select {
107+
cols("group", "name", "version") and {
108+
"available"["milestone"] named "newVersion"
109+
}
110+
}.filter { "name"() !in dependencyUpdateExclusions && "group"() !in dependencyUpdateExclusions }
111+
logger.warn("Outdated dependencies found:")
112+
df.print(
113+
rowsLimit = Int.MAX_VALUE,
114+
valueLimit = Int.MAX_VALUE,
115+
borders = true,
116+
title = true,
117+
alignLeft = true,
118+
)
119+
}
120+
121+
else -> logger.info("No outdated dependencies found")
122+
}
123+
}
124+
}
125+
45126
allprojects {
46127
tasks.withType<KotlinCompile> {
47128
kotlinOptions {

core/build.gradle.kts

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,32 @@
1-
import com.google.devtools.ksp.gradle.KspTaskJvm
21
import com.google.devtools.ksp.gradle.KspTask
2+
import com.google.devtools.ksp.gradle.KspTaskJvm
33
import io.github.devcrocod.korro.KorroTask
4-
import nl.jolanrensen.docProcessor.defaultProcessors.*
4+
import nl.jolanrensen.docProcessor.defaultProcessors.ARG_DOC_PROCESSOR_LOG_NOT_FOUND
55
import nl.jolanrensen.docProcessor.gradle.creatingProcessDocTask
66
import org.gradle.jvm.tasks.Jar
77
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
88
import org.jmailen.gradle.kotlinter.tasks.LintTask
99
import xyz.ronella.gradle.plugin.simple.git.task.GitTask
1010

11-
@Suppress("DSL_SCOPE_VIOLATION", "UnstableApiUsage")
1211
plugins {
13-
kotlin("jvm")
14-
kotlin("libs.publisher")
15-
kotlin("plugin.serialization")
16-
kotlin("jupyter.api")
17-
18-
id("io.github.devcrocod.korro") version libs.versions.korro
19-
id("org.jetbrains.dataframe.generator")
20-
id("org.jetbrains.kotlinx.kover")
21-
id("org.jmailen.kotlinter")
22-
id("org.jetbrains.kotlinx.dataframe")
23-
id("nl.jolanrensen.docProcessor")
24-
id("xyz.ronella.simple-git")
12+
with(libs.plugins) {
13+
alias(kotlin.jvm)
14+
alias(publisher)
15+
alias(serialization)
16+
alias(jupyter.api)
17+
alias(korro)
18+
alias(keywordGenerator)
19+
alias(kover)
20+
alias(kotlinter)
21+
alias(docProcessor)
22+
alias(simpleGit)
23+
24+
// dependence on our own plugin
25+
alias(dataframe)
26+
27+
// only mandatory if `kotlin.dataframe.add.ksp=false` in gradle.properties
28+
alias(ksp)
29+
}
2530
idea
2631
}
2732

@@ -221,6 +226,7 @@ idea {
221226
// the target of processKdocMain and they are returned back to normal afterwards.
222227
tasks.withType<Jar> {
223228
dependsOn(processKDocsMain)
229+
mustRunAfter(tasks.generateKeywordsSrc)
224230
outputs.upToDateWhen { false }
225231

226232
doFirst {

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/DataColumn.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import org.jetbrains.kotlinx.dataframe.api.filter
88
import org.jetbrains.kotlinx.dataframe.api.map
99
import org.jetbrains.kotlinx.dataframe.api.schema
1010
import org.jetbrains.kotlinx.dataframe.api.take
11-
import org.jetbrains.kotlinx.dataframe.api.type
1211
import org.jetbrains.kotlinx.dataframe.columns.BaseColumn
1312
import org.jetbrains.kotlinx.dataframe.columns.ColumnGroup
1413
import org.jetbrains.kotlinx.dataframe.columns.ColumnKind

core/generated-sources/src/test/kotlin/org/jetbrains/kotlinx/dataframe/jupyter/CodeGenerationTests.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class CodeGenerationTests : DataFrameJupyterTest() {
88

99
private fun Code.checkCompilation() {
1010
lines().forEach {
11-
exec(it)
11+
execRendered(it)
1212
}
1313
}
1414

0 commit comments

Comments
 (0)