You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a multiplatform component with several modules that have dependencies under one another, i.e. kmp-module depends on kmp-dep1 and kmp-dep2 modules as well as kotlin-stdlib naturally.
Now DAGP reports this:
Advice for :kmp-module
These transitive dependencies should be declared directly:
api("org.jetbrains.kotlin:kotlin-stdlib:2.0.21")
api(project(":kmp-dep1"))
api(project(":kmp-dep2"))
which is what I'm already doing:
kotlin {
applyDefaultHierarchyTemplate()
sourceSets {
commonMain.dependencies {
api(kotlin("stdlib"))
// using Gradle project accessors, but makes no difference // if old-style project(":kmp-dep1") syntax is used
api(projects.kmpDep1)
api(projects.kmpDep2)
}
androidMain.dependencies { ... }
desktopMain.dependencies { ... }
}
}
Other non-project KMP dependencies are not flagged. Also, it makes no difference if I repeat the specific api declarations in the other two source sets, androidMain and desktopMain. This is with DAGP 2.6.1.
$ gradle --version
------------------------------------------------------------
Gradle 8.10.1
------------------------------------------------------------
Build time: 2024-09-09 07:42:56 UTC
Revision: 8716158d3ec8c59e38f87a67f1f311f297b79576
Kotlin: 1.9.24
Groovy: 3.0.22
Ant: Apache Ant(TM) version 1.10.14 compiled on August 16 2023
Launcher JVM: 17.0.9 (Eclipse Adoptium 17.0.9+9)
Daemon JVM: /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home (no JDK specified, using current Java home)
OS: Mac OS X 14.6.1 aarch64
The text was updated successfully, but these errors were encountered:
realdadfish
changed the title
DAGP fails to assess KMP dependencies as being present
DAGP fails to recognize KMP project dependencies
Dec 19, 2024
I have a multiplatform component with several modules that have dependencies under one another, i.e.
kmp-module
depends onkmp-dep1
andkmp-dep2
modules as well askotlin-stdlib
naturally.Now DAGP reports this:
which is what I'm already doing:
Other non-project KMP dependencies are not flagged. Also, it makes no difference if I repeat the specific
api
declarations in the other two source sets,androidMain
anddesktopMain
. This is with DAGP 2.6.1.The text was updated successfully, but these errors were encountered: