Closed vdcast closed 7 months ago
It was fixed by adding in build.gradle project level
repositories {
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
}
and added dependencies in commonMain sources in build.gradle shared module:
sourceSets {
val commonMain by getting {
dependencies {
implementation("io.github.thechance101:chart:Beta-0.0.5")
}
}
}
Hello! I'm trying to add the lib and use it to do some pie charts. I added dependencies and synced project (maybe some of them in wrong place). But I think it's not working, cause I can't import PieChart or any other composable from the lib. Can you mention where exactly I need to add?
Here is my build.gradle shared module:
plugins { kotlin("multiplatform") id("com.android.library") id("org.jetbrains.compose") id("com.squareup.sqldelight") }
kotlin { androidTarget { compilations.all { kotlinOptions { jvmTarget = "17" } } }
}
android { compileSdk = (findProperty("android.compileSdk") as String).toInt() namespace = "com.project"
}
sqldelight { database("AppDatabase") { packageName = "com.data.database" sourceFolders = listOf("sqldelight") } }
dependencies { implementation("androidx.compose.material3:material3:1.1.2") implementation("androidx.core:core:1.10.1") commonMainApi("dev.icerock.moko:mvvm-core:0.16.1") commonMainApi("dev.icerock.moko:mvvm-compose:0.16.1") commonMainApi("dev.icerock.moko:mvvm-flow:0.16.1") commonMainApi("dev.icerock.moko:mvvm-flow-compose:0.16.1") }
and build.gradle project:
buildscript { dependencies { classpath("com.android.tools.build:gradle:8.1.2") classpath("com.squareup.sqldelight:gradle-plugin:1.5.5") classpath("org.jetbrains.kotlinx:atomicfu-gradle-plugin:0.17.3") } } plugins { kotlin("multiplatform").apply(false) id("com.android.application").apply(false) id("com.android.library").apply(false) id("org.jetbrains.compose").apply(false) }
allprojects { apply(plugin = "kotlinx-atomicfu") }