Skip to content

Commit fa70ab2

Browse files
authored
Merge pull request #846 from Kotlin/gradle-bump
Gradle bump to 8.10 and housekeeping
2 parents fdec9a1 + 5be47cb commit fa70ab2

File tree

18 files changed

+108
-95
lines changed

18 files changed

+108
-95
lines changed

build.gradle.kts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
22
import com.github.gmazzo.buildconfig.BuildConfigExtension
3+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
34
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension
45
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
56
import org.jetbrains.kotlinx.dataframe.AnyFrame
@@ -133,8 +134,8 @@ kotlin.jvmToolchain(11)
133134

134135
allprojects {
135136
tasks.withType<KotlinCompile> {
136-
kotlinOptions {
137-
jvmTarget = "1.8"
137+
compilerOptions {
138+
jvmTarget = JvmTarget.JVM_1_8
138139
}
139140
}
140141

@@ -222,7 +223,7 @@ subprojects {
222223
}
223224

224225
kotlinPublications {
225-
fairDokkaJars.set(false)
226+
fairDokkaJars = false
226227

227228
sonatypeSettings(
228229
project.findProperty("kds.sonatype.user") as String?,
@@ -238,7 +239,7 @@ kotlinPublications {
238239

239240
pom {
240241
githubRepo("Kotlin", "dataframe")
241-
inceptionYear.set("2021")
242+
inceptionYear = "2021"
242243
licenses {
243244
apache2()
244245
}
@@ -252,10 +253,10 @@ kotlinPublications {
252253
}
253254

254255
publication {
255-
publicationName.set("api")
256-
artifactId.set(projectName)
257-
description.set("Data processing in Kotlin")
258-
packageName.set(artifactId)
256+
publicationName = "api"
257+
artifactId = projectName
258+
description = "Data processing in Kotlin"
259+
packageName = artifactId
259260
}
260261

261262
localRepositories {

core/build.gradle.kts

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ val compileSamplesKotlin = tasks.named<KotlinCompile>("compileSamplesKotlin") {
9595
libraries.from(it.libraries)
9696
}
9797
source(sourceSets["test"].kotlin)
98-
destinationDirectory.set(layout.buildDirectory.dir("classes/testWithOutputs/kotlin"))
98+
destinationDirectory = layout.buildDirectory.dir("classes/testWithOutputs/kotlin")
9999
}
100100

101101
tasks.withType<KspTask> {
@@ -147,14 +147,14 @@ val clearSamplesOutputs by tasks.creating {
147147
}
148148

149149
val addSamplesToGit by tasks.creating(GitTask::class) {
150-
directory.set(file("."))
151-
command.set("add")
152-
args.set(listOf("-A", "../docs/StardustDocs/snippets"))
150+
directory = file(".")
151+
command = "add"
152+
args = listOf("-A", "../docs/StardustDocs/snippets")
153153
}
154154

155155
val copySamplesOutputs = tasks.register<JavaExec>("copySamplesOutputs") {
156156
group = "documentation"
157-
mainClass.set("org.jetbrains.kotlinx.dataframe.explainer.SampleAggregatorKt")
157+
mainClass = "org.jetbrains.kotlinx.dataframe.explainer.SampleAggregatorKt"
158158

159159
dependsOn(clearSamplesOutputs)
160160
dependsOn(samplesTest)
@@ -305,8 +305,8 @@ korro {
305305

306306
groupSamples {
307307

308-
beforeSample.set("<tab title=\"NAME\">\n")
309-
afterSample.set("\n</tab>")
308+
beforeSample = "<tab title=\"NAME\">\n"
309+
afterSample = "\n</tab>"
310310

311311
funSuffix("_properties") {
312312
replaceText("NAME", "Properties")
@@ -317,8 +317,8 @@ korro {
317317
funSuffix("_strings") {
318318
replaceText("NAME", "Strings")
319319
}
320-
beforeGroup.set("<tabs>\n")
321-
afterGroup.set("</tabs>")
320+
beforeGroup = "<tabs>\n"
321+
afterGroup = "</tabs>"
322322
}
323323
}
324324

@@ -366,19 +366,18 @@ tasks.withType<JavaCompile> {
366366
}
367367

368368
tasks.withType<KotlinCompile> {
369-
kotlinOptions {
370-
freeCompilerArgs = freeCompilerArgs + listOf("-Xinline-classes", "-Xopt-in=kotlin.RequiresOptIn")
369+
compilerOptions {
370+
optIn.addAll("kotlin.RequiresOptIn")
371+
freeCompilerArgs.addAll("-Xinline-classes")
371372
}
372373
}
373374

374375
tasks.test {
375376
maxHeapSize = "2048m"
376377
extensions.configure(kotlinx.kover.api.KoverTaskExtension::class) {
377-
excludes.set(
378-
listOf(
379-
"org.jetbrains.kotlinx.dataframe.jupyter.*",
380-
"org.jetbrains.kotlinx.dataframe.jupyter.SampleNotebooksTests",
381-
),
378+
excludes = listOf(
379+
"org.jetbrains.kotlinx.dataframe.jupyter.*",
380+
"org.jetbrains.kotlinx.dataframe.jupyter.SampleNotebooksTests",
382381
)
383382
}
384383
}
@@ -389,10 +388,10 @@ tasks.processJupyterApiResources {
389388

390389
kotlinPublications {
391390
publication {
392-
publicationName.set("core")
393-
artifactId.set("dataframe-core")
394-
description.set("Dataframe core API")
395-
packageName.set(artifactId)
391+
publicationName = "core"
392+
artifactId = "dataframe-core"
393+
description = "Dataframe core API"
394+
packageName = artifactId
396395
}
397396
}
398397

dataframe-arrow/build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ dependencies {
3434

3535
kotlinPublications {
3636
publication {
37-
publicationName.set("dataframeArrow")
38-
artifactId.set(project.name)
39-
description.set("Apache Arrow support for Kotlin Dataframe")
40-
packageName.set(artifactId)
37+
publicationName = "dataframeArrow"
38+
artifactId = project.name
39+
description = "Apache Arrow support for Kotlin Dataframe"
40+
packageName = artifactId
4141
}
4242
}
4343

dataframe-excel/build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ dependencies {
2828

2929
kotlinPublications {
3030
publication {
31-
publicationName.set("dataframeExcel")
32-
artifactId.set(project.name)
33-
description.set("Excel support for Kotlin Dataframe")
34-
packageName.set(artifactId)
31+
publicationName = "dataframeExcel"
32+
artifactId = project.name
33+
description = "Excel support for Kotlin Dataframe"
34+
packageName = artifactId
3535
}
3636
}
3737

dataframe-jdbc/build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ dependencies {
3636

3737
kotlinPublications {
3838
publication {
39-
publicationName.set("dataframeJDBC")
40-
artifactId.set(project.name)
41-
description.set("JDBC support for Kotlin Dataframe")
42-
packageName.set(artifactId)
39+
publicationName = "dataframeJDBC"
40+
artifactId = project.name
41+
description = "JDBC support for Kotlin Dataframe"
42+
packageName = artifactId
4343
}
4444
}
4545

dataframe-openapi/build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ dependencies {
4040

4141
kotlinPublications {
4242
publication {
43-
publicationName.set("dataframeOpenApi")
44-
artifactId.set(project.name)
45-
description.set("OpenAPI support for Kotlin Dataframe")
46-
packageName.set(artifactId)
43+
publicationName = "dataframeOpenApi"
44+
artifactId = project.name
45+
description = "OpenAPI support for Kotlin Dataframe"
46+
packageName = artifactId
4747
}
4848
}
4949

examples/idea-examples/json/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
12
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
23
import org.jetbrains.kotlinx.dataframe.api.JsonPath
34

@@ -22,7 +23,7 @@ dependencies {
2223
}
2324

2425
tasks.withType<KotlinCompile> {
25-
kotlinOptions.jvmTarget = "1.8"
26+
compilerOptions.jvmTarget = JvmTarget.JVM_1_8
2627
}
2728

2829
dataframes {

examples/idea-examples/movies/build.gradle.kts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
12
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
23

34
plugins {
@@ -15,13 +16,13 @@ repositories {
1516
mavenLocal() // in case of local dataframe development
1617
}
1718

18-
application.mainClass.set("org.jetbrains.kotlinx.dataframe.examples.movies.MoviesWithDataClassKt")
19+
application.mainClass = "org.jetbrains.kotlinx.dataframe.examples.movies.MoviesWithDataClassKt"
1920

2021
dependencies {
2122
// implementation("org.jetbrains.kotlinx:dataframe:X.Y.Z")
2223
implementation(project(":"))
2324
}
2425

2526
tasks.withType<KotlinCompile> {
26-
kotlinOptions.jvmTarget = "1.8"
27+
compilerOptions.jvmTarget = JvmTarget.JVM_1_8
2728
}

examples/idea-examples/titanic/build.gradle.kts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2+
13
plugins {
24
application
35
kotlin("jvm")
@@ -13,7 +15,7 @@ repositories {
1315
mavenLocal() // in case of local dataframe development
1416
}
1517

16-
application.mainClass.set("org.jetbrains.kotlinx.dataframe.examples.titanic.ml.TitanicKt")
18+
application.mainClass = "org.jetbrains.kotlinx.dataframe.examples.titanic.ml.TitanicKt"
1719

1820
dependencies {
1921
// implementation("org.jetbrains.kotlinx:dataframe:X.Y.Z")
@@ -35,7 +37,7 @@ dataframes {
3537
}
3638

3739
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
38-
kotlinOptions.jvmTarget = "11"
40+
compilerOptions.jvmTarget = JvmTarget.JVM_11
3941
}
4042

4143
tasks.withType<JavaCompile> {

examples/idea-examples/youtube/build.gradle.kts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
12
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
23

34
plugins {
@@ -15,7 +16,7 @@ repositories {
1516
mavenLocal() // in case of local dataframe development
1617
}
1718

18-
application.mainClass.set("org.jetbrains.kotlinx.dataframe.examples.youtube.YoutubeKt")
19+
application.mainClass = "org.jetbrains.kotlinx.dataframe.examples.youtube.YoutubeKt"
1920

2021
dependencies {
2122
// implementation("org.jetbrains.kotlinx:dataframe:X.Y.Z")
@@ -24,6 +25,6 @@ dependencies {
2425
}
2526

2627
tasks.withType<KotlinCompile> {
27-
kotlinOptions.jvmTarget = "1.8"
28+
compilerOptions.jvmTarget = JvmTarget.JVM_1_8
2829
}
2930

0 commit comments

Comments
 (0)