I have two android library modules called `android...
# multiplatform
q
I have two android library modules called
androidMain
and
helper
. I'd like for
helper
to have a dependency on
androidMain
, but I can't figure out how to make the usual
implementation project(':main')
work. I keep geeting this error:
roject with path ':main' could not be found in root project 'instantsearch-kotlin'.
I've read this paragraph on the website but that didn't really help. https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#disambiguating-targets. Any help would be greatly appreciated !
d
how is main set in your settings.gradle(.kts) ?
😄 1
q
Copy code
pluginManagement {
    resolutionStrategy {
        eachPlugin {
            if (requested.id.id == "kotlin-multiplatform") {
                useModule("org.jetbrains.kotlin:kotlin-gradle-plugin:${requested.version}")
            }
        }
    }

    repositories {
        maven { url '<https://dl.bintray.com/kotlin/kotlin-eap>' }

        mavenCentral()

        maven { url '<https://plugins.gradle.org/m2/>' }
    }
}
rootProject.name = 'instantsearch-kotlin'

enableFeaturePreview('GRADLE_METADATA')
It is the default settings.gradle when you start a new mpp shared platform library project.
d
I've tried this as well before and failed