diff --git a/docs/StardustDocs/topics/setup/SetupAndroid.md b/docs/StardustDocs/topics/setup/SetupAndroid.md index b21534b3c2..1444ae993b 100644 --- a/docs/StardustDocs/topics/setup/SetupAndroid.md +++ b/docs/StardustDocs/topics/setup/SetupAndroid.md @@ -22,13 +22,19 @@ but you can add the Kotlin DataFrame JVM dependency to your Android project with ```kotlin dependencies { - implementation("org.jetbrains.kotlinx:dataframe:%dataFrameVersion%") + // Core Kotlin DataFrame API, CSV and JSON IO. + // See custom Gradle setup: + // https://kotlin.github.io/dataframe/setupcustomgradle.html + implementation("org.jetbrains.kotlinx:dataframe-core:%dataFrameVersion%") + implementation("org.jetbrains.kotlinx:dataframe-json:%dataFrameVersion%") + implementation("org.jetbrains.kotlinx:dataframe-csv:%dataFrameVersion%") + // You can add any additional IO modules you like, except for 'dataframe-arrow'. + // Apache Arrow is not supported well on Android. } android { - // Requires Android 0+, i.e. SDK version 26 or higher. defaultConfig { - minSdk = 26 + minSdk = 21 } // Requires Java 8 or higher compileOptions { @@ -38,25 +44,6 @@ android { kotlinOptions { jvmTarget = "1.8" } - packaging { - resources { - pickFirsts += listOf( - "META-INF/AL2.0", - "META-INF/LGPL2.1", - "META-INF/ASL-2.0.txt", - "META-INF/LICENSE.md", - "META-INF/NOTICE.md", - "META-INF/LGPL-3.0.txt", - "META-INF/thirdparty-LICENSE", - ) - excludes += listOf( - "META-INF/kotlin-jupyter-libraries/libraries.json", - "META-INF/{INDEX.LIST,DEPENDENCIES}", - "{draftv3,draftv4}/schema", - "arrow-git.properties", - ) - } - } } tasks.withType { kotlinOptions.jvmTarget = "1.8" @@ -69,13 +56,19 @@ tasks.withType { ```groovy dependencies { - implementation 'org.jetbrains.kotlinx:dataframe:%dataFrameVersion%' + // Core Kotlin DataFrame API, CSV and JSON IO. + // See custom Gradle setup: + // https://kotlin.github.io/dataframe/setupcustomgradle.html + implementation 'org.jetbrains.kotlinx:dataframe-core:%dataFrameVersion%' + implementation 'org.jetbrains.kotlinx:dataframe-json:%dataFrameVersion%' + implementation 'org.jetbrains.kotlinx:dataframe-csv:%dataFrameVersion%' + // You can add any additional IO modules you like, except for 'dataframe-arrow'. + // Apache Arrow is not supported well on Android. } android { - // Requires Android 0+, i.e. SDK version 26 or higher. defaultConfig { - minSdk 26 + minSdk 21 } // Requires Java 8 or higher compileOptions { @@ -85,25 +78,6 @@ android { kotlinOptions { jvmTarget = "1.8" } - packaging { - resources { - pickFirsts += [ - "META-INF/AL2.0", - "META-INF/LGPL2.1", - "META-INF/ASL-2.0.txt", - "META-INF/LICENSE.md", - "META-INF/NOTICE.md", - "META-INF/LGPL-3.0.txt", - "META-INF/thirdparty-LICENSE", - ] - excludes += [ - "META-INF/kotlin-jupyter-libraries/libraries.json", - "META-INF/{INDEX.LIST,DEPENDENCIES}", - "{draftv3,draftv4}/schema", - "arrow-git.properties", - ] - } - } } tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach { kotlinOptions.jvmTarget = "1.8" @@ -113,9 +87,8 @@ tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach { -This setup adds the [general Kotlin DataFrame dependency](Modules.md#dataframe-general), -which includes the [core API and implementation](Modules.md#dataframe-core) -as well as all [IO modules](Modules.md#io-modules) +This setup adds the [Kotlin DataFrame core](Modules.md#dataframe-core) +as well as a subset of the [IO modules](Modules.md#io-modules) (excluding [experimental ones](Modules.md#experimental-modules)). For flexible configuration, see [Custom configuration](SetupCustomGradle.md). diff --git a/examples/android-example/app/build.gradle.kts b/examples/android-example/app/build.gradle.kts index 15baad46bd..295a721414 100644 --- a/examples/android-example/app/build.gradle.kts +++ b/examples/android-example/app/build.gradle.kts @@ -1,8 +1,10 @@ +import org.jetbrains.kotlin.gradle.dsl.JvmTarget + plugins { alias(libs.plugins.android.application) alias(libs.plugins.kotlin.android) alias(libs.plugins.kotlin.compose) - kotlin("plugin.dataframe") version "2.2.20-Beta1" + kotlin("plugin.dataframe") version "2.2.20-Beta2" } android { @@ -11,7 +13,7 @@ android { defaultConfig { applicationId = "com.example.myapplication" - minSdk = 26 + minSdk = 21 targetSdk = 36 versionCode = 1 versionName = "1.0" @@ -21,10 +23,10 @@ android { buildTypes { release { - isMinifyEnabled = false + isMinifyEnabled = true proguardFiles( getDefaultProguardFile("proguard-android-optimize.txt"), - "proguard-rules.pro" + "proguard-rules.pro", ) } } @@ -32,31 +34,14 @@ android { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 } - kotlinOptions { - jvmTarget = "1.8" + kotlin { + compilerOptions { + jvmTarget = JvmTarget.JVM_1_8 + } } buildFeatures { compose = true } - packaging { - resources { - pickFirsts += listOf( - "META-INF/AL2.0", - "META-INF/LGPL2.1", - "META-INF/ASL-2.0.txt", - "META-INF/LICENSE.md", - "META-INF/NOTICE.md", - "META-INF/LGPL-3.0.txt", - "META-INF/thirdparty-LICENSE", - ) - excludes += listOf( - "META-INF/kotlin-jupyter-libraries/libraries.json", - "META-INF/{INDEX.LIST,DEPENDENCIES}", - "{draftv3,draftv4}/schema", - "arrow-git.properties", - ) - } - } } dependencies { @@ -78,9 +63,12 @@ dependencies { debugImplementation(libs.androidx.ui.test.manifest) // TODO update version - // Core Kotlin DataFrame API & JSON IO. + // Core Kotlin DataFrame API, JSON and CSV IO. // See custom Gradle setup: // https://kotlin.github.io/dataframe/setupcustomgradle.html - implementation("org.jetbrains.kotlinx:dataframe-core:1.0.0-dev-7831") - implementation("org.jetbrains.kotlinx:dataframe-json:1.0.0-dev-7831") + implementation("org.jetbrains.kotlinx:dataframe-core:1.0.0-dev-8314") + implementation("org.jetbrains.kotlinx:dataframe-json:1.0.0-dev-8314") + implementation("org.jetbrains.kotlinx:dataframe-csv:1.0.0-dev-8314") + // You can add any additional IO modules you like, except for 'dataframe-arrow'. + // Apache Arrow is not supported well on Android. } diff --git a/examples/android-example/gradle/libs.versions.toml b/examples/android-example/gradle/libs.versions.toml index 9eb3a92603..19a4b85238 100644 --- a/examples/android-example/gradle/libs.versions.toml +++ b/examples/android-example/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] agp = "8.11.1" -kotlin = "2.2.20-Beta1" +kotlin = "2.2.20-Beta2" coreKtx = "1.10.1" junit = "4.13.2" junitVersion = "1.1.5"