Skip to content

Commit 6ac0fe4

Browse files
committed
adapted android example, removing arrow from the examples
1 parent a6b435d commit 6ac0fe4

File tree

2 files changed

+23
-64
lines changed

2 files changed

+23
-64
lines changed

docs/StardustDocs/topics/setup/SetupAndroid.md

Lines changed: 18 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,14 @@ but you can add the Kotlin DataFrame JVM dependency to your Android project with
2222

2323
```kotlin
2424
dependencies {
25-
implementation("org.jetbrains.kotlinx:dataframe:%dataFrameVersion%")
25+
// Core Kotlin DataFrame API, CSV and JSON IO.
26+
// See custom Gradle setup:
27+
// https://kotlin.github.io/dataframe/setupcustomgradle.html
28+
implementation("org.jetbrains.kotlinx:dataframe-core:%dataFrameVersion%")
29+
implementation("org.jetbrains.kotlinx:dataframe-json:%dataFrameVersion%")
30+
implementation("org.jetbrains.kotlinx:dataframe-csv:%dataFrameVersion%")
31+
// You can add any additional IO modules you like, except for 'dataframe-arrow'.
32+
// Apache Arrow is not supported well on Android.
2633
}
2734

2835
android {
@@ -38,25 +45,6 @@ android {
3845
kotlinOptions {
3946
jvmTarget = "1.8"
4047
}
41-
packaging {
42-
resources {
43-
pickFirsts += listOf(
44-
"META-INF/AL2.0",
45-
"META-INF/LGPL2.1",
46-
"META-INF/ASL-2.0.txt",
47-
"META-INF/LICENSE.md",
48-
"META-INF/NOTICE.md",
49-
"META-INF/LGPL-3.0.txt",
50-
"META-INF/thirdparty-LICENSE",
51-
)
52-
excludes += listOf(
53-
"META-INF/kotlin-jupyter-libraries/libraries.json",
54-
"META-INF/{INDEX.LIST,DEPENDENCIES}",
55-
"{draftv3,draftv4}/schema",
56-
"arrow-git.properties",
57-
)
58-
}
59-
}
6048
}
6149
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
6250
kotlinOptions.jvmTarget = "1.8"
@@ -69,7 +57,14 @@ tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
6957

7058
```groovy
7159
dependencies {
72-
implementation 'org.jetbrains.kotlinx:dataframe:%dataFrameVersion%'
60+
// Core Kotlin DataFrame API, CSV and JSON IO.
61+
// See custom Gradle setup:
62+
// https://kotlin.github.io/dataframe/setupcustomgradle.html
63+
implementation 'org.jetbrains.kotlinx:dataframe-core:%dataFrameVersion%'
64+
implementation 'org.jetbrains.kotlinx:dataframe-json:%dataFrameVersion%'
65+
implementation 'org.jetbrains.kotlinx:dataframe-csv:%dataFrameVersion%'
66+
// You can add any additional IO modules you like, except for 'dataframe-arrow'.
67+
// Apache Arrow is not supported well on Android.
7368
}
7469
7570
android {
@@ -85,25 +80,6 @@ android {
8580
kotlinOptions {
8681
jvmTarget = "1.8"
8782
}
88-
packaging {
89-
resources {
90-
pickFirsts += [
91-
"META-INF/AL2.0",
92-
"META-INF/LGPL2.1",
93-
"META-INF/ASL-2.0.txt",
94-
"META-INF/LICENSE.md",
95-
"META-INF/NOTICE.md",
96-
"META-INF/LGPL-3.0.txt",
97-
"META-INF/thirdparty-LICENSE",
98-
]
99-
excludes += [
100-
"META-INF/kotlin-jupyter-libraries/libraries.json",
101-
"META-INF/{INDEX.LIST,DEPENDENCIES}",
102-
"{draftv3,draftv4}/schema",
103-
"arrow-git.properties",
104-
]
105-
}
106-
}
10783
}
10884
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
10985
kotlinOptions.jvmTarget = "1.8"
@@ -113,9 +89,8 @@ tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
11389
</tab>
11490
</tabs>
11591

116-
This setup adds the [general Kotlin DataFrame dependency](Modules.md#dataframe-general),
117-
which includes the [core API and implementation](Modules.md#dataframe-core)
118-
as well as all [IO modules](Modules.md#io-modules)
92+
This setup adds the [Kotlin DataFrame core](Modules.md#dataframe-core)
93+
as well as a subset of the [IO modules](Modules.md#io-modules)
11994
(excluding [experimental ones](Modules.md#experimental-modules)).
12095
For flexible configuration, see [Custom configuration](SetupCustomGradle.md).
12196

examples/android-example/app/build.gradle.kts

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ android {
2121

2222
buildTypes {
2323
release {
24-
isMinifyEnabled = false
24+
isMinifyEnabled = true
2525
proguardFiles(
2626
getDefaultProguardFile("proguard-android-optimize.txt"),
2727
"proguard-rules.pro"
@@ -38,25 +38,6 @@ android {
3838
buildFeatures {
3939
compose = true
4040
}
41-
packaging {
42-
resources {
43-
pickFirsts += listOf(
44-
"META-INF/AL2.0",
45-
"META-INF/LGPL2.1",
46-
"META-INF/ASL-2.0.txt",
47-
"META-INF/LICENSE.md",
48-
"META-INF/NOTICE.md",
49-
"META-INF/LGPL-3.0.txt",
50-
"META-INF/thirdparty-LICENSE",
51-
)
52-
excludes += listOf(
53-
"META-INF/kotlin-jupyter-libraries/libraries.json",
54-
"META-INF/{INDEX.LIST,DEPENDENCIES}",
55-
"{draftv3,draftv4}/schema",
56-
"arrow-git.properties",
57-
)
58-
}
59-
}
6041
}
6142

6243
dependencies {
@@ -78,9 +59,12 @@ dependencies {
7859
debugImplementation(libs.androidx.ui.test.manifest)
7960

8061
// TODO update version
81-
// Core Kotlin DataFrame API & JSON IO.
62+
// Core Kotlin DataFrame API, JSON and CSV IO.
8263
// See custom Gradle setup:
8364
// https://kotlin.github.io/dataframe/setupcustomgradle.html
8465
implementation("org.jetbrains.kotlinx:dataframe-core:1.0.0-dev-7831")
8566
implementation("org.jetbrains.kotlinx:dataframe-json:1.0.0-dev-7831")
67+
implementation("org.jetbrains.kotlinx:dataframe-csv:1.0.0-dev-7831")
68+
// You can add any additional IO modules you like, except for 'dataframe-arrow'.
69+
// Apache Arrow is not supported well on Android.
8670
}

0 commit comments

Comments
 (0)