Skip to content

Commit 704200c

Browse files
committed
Move code from root to a new 'core' module so that 'dataframe' was the default artifact including all existing modules. And if you don't want some dependency, you can fall back to manually declaring needed modules yourself
1 parent 6ebd2a0 commit 704200c

File tree

331 files changed

+128
-93
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

331 files changed

+128
-93
lines changed

build.gradle.kts

+3-78
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,11 @@ plugins {
88
kotlin("jvm") version libs.versions.kotlin
99
kotlin("libs.publisher") version libs.versions.libsPublisher
1010
kotlin("plugin.serialization") version libs.versions.kotlin
11-
kotlin("jupyter.api") version libs.versions.kotlinJupyter
1211
kotlin("plugin.dataframe") version libs.versions.dataframe apply false
1312

1413
id("org.jetbrains.dokka") version libs.versions.dokka
15-
id("org.jetbrains.dataframe.generator")
1614

1715
id("org.jmailen.kotlinter") version libs.versions.ktlint
18-
1916
}
2017

2118
val jupyterApiTCRepo: String by project
@@ -33,40 +30,11 @@ configurations {
3330
}
3431

3532
dependencies {
36-
implementation(libs.kotlin.stdlib)
37-
implementation(libs.kotlin.stdlib.jdk8)
38-
implementation(libs.kotlin.reflect)
39-
40-
api(libs.commonsCsv)
41-
implementation(libs.klaxon)
42-
implementation(libs.fuel)
43-
44-
implementation(libs.kotlin.datetimeJvm)
45-
implementation("com.squareup:kotlinpoet:1.11.0")
46-
47-
testImplementation(libs.junit)
48-
testImplementation(libs.kotestAssertions) {
49-
exclude("org.jetbrains.kotlin", "kotlin-stdlib-jdk8")
50-
}
51-
testImplementation(libs.kotlin.scriptingJvm)
52-
testImplementation(libs.jsoup)
53-
}
54-
55-
kotlin {
56-
explicitApi()
33+
api(project(":core"))
34+
api(project(":dataframe-arrow"))
35+
api(project(":dataframe-excel"))
5736
}
5837

59-
tasks.withType<JavaCompile> {
60-
sourceCompatibility = JavaVersion.VERSION_1_8.toString()
61-
targetCompatibility = JavaVersion.VERSION_1_8.toString()
62-
}
63-
64-
tasks.withType<KotlinCompile> {
65-
dependsOn(tasks.lintKotlin)
66-
kotlinOptions {
67-
freeCompilerArgs = freeCompilerArgs + listOf("-Xinline-classes", "-Xopt-in=kotlin.RequiresOptIn")
68-
}
69-
}
7038

7139
allprojects {
7240
tasks.withType<KotlinCompile> {
@@ -147,46 +115,3 @@ kotlinPublications {
147115
}
148116
}
149117
}
150-
151-
tasks.lintKotlinMain {
152-
exclude("**/*keywords*/**")
153-
}
154-
155-
tasks.lintKotlinTest {
156-
enabled = true
157-
}
158-
159-
kotlinter {
160-
ignoreFailures = false
161-
reporters = arrayOf("checkstyle", "plain")
162-
experimentalRules = true
163-
disabledRules = arrayOf(
164-
"no-wildcard-imports",
165-
"experimental:spacing-between-declarations-with-annotations",
166-
"experimental:enum-entry-name-case",
167-
"experimental:argument-list-wrapping",
168-
"experimental:annotation",
169-
"max-line-length",
170-
"filename"
171-
)
172-
}
173-
174-
val instrumentedJars: Configuration by configurations.creating {
175-
isCanBeConsumed = true
176-
isCanBeResolved = false
177-
}
178-
179-
artifacts {
180-
add("instrumentedJars", tasks.jar.get().archiveFile) {
181-
builtBy(tasks.jar)
182-
}
183-
}
184-
185-
tasks.test {
186-
maxHeapSize = "2048m"
187-
}
188-
189-
tasks.processJupyterApiResources {
190-
libraryProducers = listOf("org.jetbrains.kotlinx.dataframe.jupyter.Integration")
191-
}
192-

core/build.gradle.kts

+110
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
2+
@Suppress("DSL_SCOPE_VIOLATION", "UnstableApiUsage")
3+
plugins {
4+
kotlin("jvm")
5+
kotlin("libs.publisher")
6+
kotlin("plugin.serialization")
7+
kotlin("jupyter.api") version libs.versions.kotlinJupyter
8+
9+
id("org.jetbrains.dataframe.generator")
10+
11+
id("org.jmailen.kotlinter")
12+
}
13+
14+
group = "org.jetbrains.kotlinx"
15+
16+
val jupyterApiTCRepo: String by project
17+
18+
repositories {
19+
mavenLocal()
20+
mavenCentral()
21+
maven("https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven")
22+
maven(jupyterApiTCRepo)
23+
}
24+
25+
dependencies {
26+
implementation(libs.kotlin.stdlib)
27+
implementation(libs.kotlin.stdlib.jdk8)
28+
implementation(libs.kotlin.reflect)
29+
30+
api(libs.commonsCsv)
31+
implementation(libs.klaxon)
32+
implementation(libs.fuel)
33+
34+
implementation(libs.kotlin.datetimeJvm)
35+
implementation("com.squareup:kotlinpoet:1.11.0")
36+
37+
testImplementation(libs.junit)
38+
testImplementation(libs.kotestAssertions) {
39+
exclude("org.jetbrains.kotlin", "kotlin-stdlib-jdk8")
40+
}
41+
testImplementation(libs.kotlin.scriptingJvm)
42+
testImplementation(libs.jsoup)
43+
}
44+
45+
tasks.lintKotlinMain {
46+
exclude("**/*keywords*/**")
47+
}
48+
49+
tasks.lintKotlinTest {
50+
enabled = true
51+
}
52+
53+
kotlinter {
54+
ignoreFailures = false
55+
reporters = arrayOf("checkstyle", "plain")
56+
experimentalRules = true
57+
disabledRules = arrayOf(
58+
"no-wildcard-imports",
59+
"experimental:spacing-between-declarations-with-annotations",
60+
"experimental:enum-entry-name-case",
61+
"experimental:argument-list-wrapping",
62+
"experimental:annotation",
63+
"max-line-length",
64+
"filename"
65+
)
66+
}
67+
68+
kotlin {
69+
explicitApi()
70+
}
71+
72+
tasks.withType<JavaCompile> {
73+
sourceCompatibility = JavaVersion.VERSION_1_8.toString()
74+
targetCompatibility = JavaVersion.VERSION_1_8.toString()
75+
}
76+
77+
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
78+
dependsOn(tasks.lintKotlin)
79+
kotlinOptions {
80+
freeCompilerArgs = freeCompilerArgs + listOf("-Xinline-classes", "-Xopt-in=kotlin.RequiresOptIn")
81+
}
82+
}
83+
84+
tasks.test {
85+
maxHeapSize = "2048m"
86+
}
87+
88+
tasks.processJupyterApiResources {
89+
libraryProducers = listOf("org.jetbrains.kotlinx.dataframe.jupyter.Integration")
90+
}
91+
92+
kotlinPublications {
93+
publication {
94+
publicationName.set("core")
95+
artifactId.set("dataframe-core")
96+
description.set("Dataframe core API")
97+
packageName.set(artifactId)
98+
}
99+
}
100+
101+
val instrumentedJars: Configuration by configurations.creating {
102+
isCanBeConsumed = true
103+
isCanBeResolved = false
104+
}
105+
106+
artifacts {
107+
add("instrumentedJars", tasks.jar.get().archiveFile) {
108+
builtBy(tasks.jar)
109+
}
110+
}

src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/aggregation/aggregations.kt core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/aggregation/aggregations.kt

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import org.jetbrains.kotlinx.dataframe.api.rows
1616
import org.jetbrains.kotlinx.dataframe.columns.ColumnPath
1717
import org.jetbrains.kotlinx.dataframe.columns.ColumnSet
1818
import org.jetbrains.kotlinx.dataframe.columns.UnresolvedColumnsPolicy
19-
import org.jetbrains.kotlinx.dataframe.columns.values
2019
import org.jetbrains.kotlinx.dataframe.impl.DataFrameReceiver
2120
import org.jetbrains.kotlinx.dataframe.impl.aggregation.receivers.AggregateInternalDsl
2221
import org.jetbrains.kotlinx.dataframe.impl.columns.toColumns
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/test/kotlin/org/jetbrains/kotlinx/dataframe/jupyter/SampleNotebooksTests.kt core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/jupyter/SampleNotebooksTests.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ class SampleNotebooksTests : DataFrameJupyterTest() {
105105
)
106106

107107
companion object {
108-
const val ideaExamplesPath = "examples/idea-examples"
109-
const val jupyterExamplesPath = "examples/jupyter-notebooks"
108+
const val ideaExamplesPath = "../examples/idea-examples"
109+
const val jupyterExamplesPath = "../examples/jupyter-notebooks"
110110

111111
fun testFile(folder: String, fileName: String) = fileName to "$jupyterExamplesPath/$folder/$fileName"
112112
}

0 commit comments

Comments
 (0)