Skip to content

Commit

Permalink
Updated Kotlin to 2.0.0, Decompose to 3.1.0 and other dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
arkivanov committed Jun 15, 2024
1 parent 16813fc commit 01c9e92
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ venv
/dist
/mkdocs_material.egg-info
.vscode
.kotlin
3 changes: 2 additions & 1 deletion app-android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

plugins {
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.compose)
alias(libs.plugins.android.application)
alias(libs.plugins.jetbrains.compose)
}
Expand Down Expand Up @@ -45,4 +46,4 @@ dependencies {
implementation(project(":compose-ui"))
implementation(libs.androidx.activity.activityCompose)
implementation(compose.foundation)
}
}
1 change: 1 addition & 0 deletions app-desktop/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import org.jetbrains.compose.desktop.application.dsl.TargetFormat

plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.kotlin.compose)
alias(libs.plugins.jetbrains.compose)
}

Expand Down
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ plugins {
alias(libs.plugins.android.application).apply(false)
alias(libs.plugins.android.library).apply(false)
alias(libs.plugins.kotlin.android).apply(false)
alias(libs.plugins.kotlin.compose).apply(false)
alias(libs.plugins.kotlin.multiplatform).apply(false)
alias(libs.plugins.kotlin.serialization).apply(false)
alias(libs.plugins.jetbrains.compose).apply(false)
Expand Down
3 changes: 2 additions & 1 deletion compose-ui/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.android.library)
alias(libs.plugins.jetbrains.compose)
alias(libs.plugins.kotlin.compose)
}

kotlin {
Expand All @@ -24,7 +25,7 @@ kotlin {
iosArm64(),
iosSimulatorArm64()
)
.takeIf { "XCODE_VERSION_MAJOR" in System.getenv().keys } // Export the framework only for Xcode builds
// .takeIf { "XCODE_VERSION_MAJOR" in System.getenv().keys } // Export the framework only for Xcode builds
?.forEach {
// This `shared` framework is exported for app-ios-compose
it.binaries.framework {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.example.myapplication

import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import com.arkivanov.decompose.ExperimentalDecomposeApi
import com.arkivanov.decompose.extensions.compose.pages.Pages
import com.arkivanov.decompose.extensions.compose.pages.PagesScrollAnimation
import com.arkivanov.decompose.router.pages.ChildPages

@OptIn(ExperimentalFoundationApi::class, ExperimentalDecomposeApi::class)
@Composable
fun FailingComposable() {
Pages(
pages = ChildPages(items = emptyList(), selectedIndex = 0),
onPageSelected = {},
scrollAnimation = PagesScrollAnimation.Default, // Commenting this line fixes the error
) { index, _ ->
Text("Item: $index")
}
}
9 changes: 5 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
[versions]

project = "1.0.0"
kotlin = "1.9.23"
kotlin = "2.0.0"
agp = "8.2.0"
jvmTarget = "11"

android-minSdk = "24"
android-compileSdk = "34"
android-targetSdk = "34"

compose-jetbrains = "1.6.2"
compose-jetbrains = "1.6.11"

androidx-activityCompose = "1.9.0"

decompose = "3.0.0"
essenty = "2.0.0"
decompose = "3.1.0"
essenty = "2.1.0"

[plugins]

kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
android-application = { id = "com.android.application", version.ref = "agp" }
android-library = { id = "com.android.library", version.ref = "agp" }
Expand Down

0 comments on commit 01c9e92

Please # to comment.