@@ -10,6 +10,7 @@ import org.jetbrains.kotlinx.dataframe.io.readJson
1010import org.jetbrains.kotlinx.publisher.apache2
1111import org.jetbrains.kotlinx.publisher.developer
1212import org.jetbrains.kotlinx.publisher.githubRepo
13+ import org.jlleitschuh.gradle.ktlint.KtlintExtension
1314
1415plugins {
1516 with (libs.plugins) {
@@ -19,7 +20,7 @@ plugins {
1920 alias(jupyter.api) apply false
2021 alias(dokka)
2122 alias(kover)
22- alias(kotlinter )
23+ alias(ktlint )
2324 alias(korro) apply false
2425 alias(docProcessor) apply false
2526 alias(simpleGit) apply false
@@ -54,7 +55,12 @@ dependencies {
5455}
5556
5657enum class Version : Comparable <Version > {
57- SNAPSHOT , DEV , ALPHA , BETA , RC , STABLE ;
58+ SNAPSHOT ,
59+ DEV ,
60+ ALPHA ,
61+ BETA ,
62+ RC ,
63+ STABLE ,
5864}
5965
6066fun String.findVersion (): Version {
@@ -72,15 +78,19 @@ fun String.findVersion(): Version {
7278// these names of outdated dependencies will not show up in the table output
7379val dependencyUpdateExclusions = listOf (
7480 // 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,
81+ libs.plugins.kover
82+ .get()
83+ .pluginId,
7884 // TODO 5.8.0 is not possible due to https://github.com/Kotlin/dataframe/issues/595
7985 libs.kotestAssertions.get().name,
8086 // Can't be updated to 7.4.0+ due to Java 8 compatibility
81- libs.android.gradle.api.get().group,
82- // TODO 0.1.6 breaks ktlint, https://github.com/Kotlin/dataframe/issues/598
83- libs.plugins.korro.get().pluginId,
87+ libs.android.gradle.api
88+ .get()
89+ .group,
90+ // TODO 0.1.6 broke kotlinter, https://github.com/Kotlin/dataframe/issues/598
91+ libs.plugins.korro
92+ .get()
93+ .pluginId,
8494 // Directly dependent on the Gradle version
8595 " org.gradle.kotlin.kotlin-dsl" ,
8696)
@@ -100,14 +110,16 @@ tasks.named<DependencyUpdatesTask>("dependencyUpdates").configure {
100110 doLast {
101111 val outputFile = layout.buildDirectory
102112 .file(" ../$outputDir /$reportfileName .json" )
103- .get().asFile
113+ .get()
114+ .asFile
104115 when (val outDatedDependencies = DataFrame .readJson(outputFile)[" outdated" ][" dependencies" ][0 ]) {
105116 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 }
117+ val df = outDatedDependencies
118+ .select {
119+ cols(" group" , " name" , " version" ) and {
120+ " available" [" milestone" ] named " newVersion"
121+ }
122+ }.filter { " name" () !in dependencyUpdateExclusions && " group" () !in dependencyUpdateExclusions }
111123 logger.warn(" Outdated dependencies found:" )
112124 df.print (
113125 rowsLimit = Int .MAX_VALUE ,
@@ -137,29 +149,15 @@ allprojects {
137149 targetCompatibility = JavaVersion .VERSION_1_8 .toString()
138150 }
139151
140- // Attempts to configure kotlinter for each sub-project that uses the plugin
152+ // Attempts to configure ktlint for each sub-project that uses the plugin
141153 afterEvaluate {
142154 try {
143- kotlinter {
144- ignoreFailures = false
145- reporters = arrayOf(" checkstyle" , " plain" )
146- experimentalRules = true
147- disabledRules = arrayOf(
148- " no-wildcard-imports" ,
149- " experimental:spacing-between-declarations-with-annotations" ,
150- " experimental:enum-entry-name-case" ,
151- " experimental:argument-list-wrapping" ,
152- " experimental:annotation" ,
153- " max-line-length" ,
154- " filename" ,
155- " comment-spacing" ,
156- " curly-spacing" ,
157- " experimental:annotation-spacing" ,
158- " no-unused-imports" , // broken
159- )
155+ configure<KtlintExtension > {
156+ version = " 1.3.0"
157+ // rules are set up through .editorconfig
160158 }
161159 } catch (_: UnknownDomainObjectException ) {
162- logger.warn(" Could not set kotlinter config on :${this .name} " )
160+ logger.warn(" Could not set ktlint config on :${this .name} " )
163161 }
164162
165163 // set the java toolchain version to 11 for all subprojects for CI stability
@@ -223,13 +221,13 @@ kotlinPublications {
223221 sonatypeSettings(
224222 project.findProperty(" kds.sonatype.user" ) as String? ,
225223 project.findProperty(" kds.sonatype.password" ) as String? ,
226- " dataframe project, v. ${project.version} "
224+ " dataframe project, v. ${project.version} " ,
227225 )
228226
229227 signingCredentials(
230228 project.findProperty(" kds.sign.key.id" ) as String? ,
231229 project.findProperty(" kds.sign.key.private" ) as String? ,
232- project.findProperty(" kds.sign.key.passphrase" ) as String?
230+ project.findProperty(" kds.sign.key.passphrase" ) as String? ,
233231 )
234232
235233 pom {
0 commit comments