I have a KMM Library project and i want to test it on an app. I published library as mavenLocal and it is in my .m2 folder. When i trying to implement and import my library from my app gradle could not find my library. By the way i added mavenLocal to repositories in my app but still there is no library.
Here is my app’s gradle files:
build.gradle.kts:
plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.androidLibrary)
}
kotlin {
androidTarget {
compilations.all {
kotlinOptions {
jvmTarget = "1.8"
}
}
}
listOf(
iosX64(),
iosArm64(),
iosSimulatorArm64()
).forEach {
it.binaries.framework {
baseName = "shared"
isStatic = true
}
}
sourceSets {
commonMain.dependencies {
implementation("com.kartaca.sumersdk:sumersdk:1.0.0")
}
commonTest.dependencies {
implementation(libs.kotlin.test)
}
}
}
android {
namespace = "com.kartaca.sumer"
compileSdk = 34
defaultConfig {
minSdk = 29
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}
settings.gradle.kts:
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
pluginManagement {
repositories {
google()
gradlePluginPortal()
mavenCentral()
}
}
dependencyResolutionManagement {
repositories {
mavenLocal()
google()
mavenCentral()
}
}
rootProject.name = "My_Application"
include(":androidApp")
include(":shared")
New contributor
Yusuf is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.