adrielcafe / voyager

🛸 A pragmatic navigation library for Jetpack Compose
https://voyager.adriel.cafe
MIT License
2.51k stars 126 forks source link

BottomSheetNavigator - IOS Build error #458

Open Maandraj opened 1 month ago

Maandraj commented 1 month ago

Gradle info:

voyagerVersion = "1.1.0-beta02"
kotlin.version=1.9.23
compose.version=1.6.10-beta02
compose-material3 = "1.2.1"
commonMain {
            dependencies {
                ...
                implementation("cafe.adriel.voyager:voyager-bottom-sheet-navigator:$voyagerVersion")
            }
        }

When I try to compile on iOS, I get an error::

> Task :shared:compileKotlinIosSimulatorArm64 FAILED
error: Could not find "org.jetbrains.compose.material:material" in [/Users/...., /Users/..../.konan/klib, /Users/...../.konan/kotlin-native-prebuilt-macos-aarch64-1.9.23/klib/common, /Users/..../.konan/kotlin-native-prebuilt-macos-aarch64-1.9.23/klib/platform/ios_simulator_arm64]
error: Compilation finished with errors

It builds on android without any problems. Also, if you remove the dependency ..voyager-bottom-sheet-navigator:$voyagerVersion, then everything builds on iOS without problems

What could be the reason for this logic? Is M3 not supported yet?

atabekm commented 1 month ago

Having same issue

Maandraj commented 1 month ago

Having same issue

Did you solve the problem as a result?

atabekm commented 1 month ago

Did you solve the problem as a result?

Yes, I've to add the followings to build.gradle.kts kotlin->sourceSets:

iosMain.dependencies {
    implementation(compose.material)
    // other dependencies
}

all {
    languageSettings.optIn("androidx.compose.material.ExperimentalMaterialApi")
}
Maandraj commented 1 month ago

Yes, I've to add the followings to build.gradle.kts kotlin->sourceSets...

Thank you !