Colton Idle
04/09/2021, 10:16 AMdependencies {
implementation(project(":common"))
implementation("androidx.activity:activity-compose:1.3.0-alpha03")
}
Which makes sense. android module depends on common module. and also activity compose lib. cool.
But then common has
val androidMain by getting {
dependencies {
api("androidx.appcompat:appcompat:1.2.0")
api("androidx.core:core-ktx:1.3.1")
}
}
That seems... wrong? Should appcompat and core be directly in android build file?
As an experiment I just commented out those /common android deps and placed them in /android build file and everything works. again... leaving me confused as to why have the android deps in two places?jim
04/09/2021, 3:46 PMfoo-library
) which can be invoked from common code. Most of the time, your implementation of foo-library
can hopefully only depend on other common
libraries, and thus is platform-independent. However, sometimes, your foo-library
might need to use some platform-specific implementations under the hood in order to behave properly. In such cases, the module still exposes a platform-independent API, but internally it uses expect-actuals for each of the supported platforms. The expect-actuals must live in the same compilation unit which effectively means they must be in the same module, which means you need to have platform specific dependencies in your foo-library
module as an implementation detail.Colton Idle
04/09/2021, 3:54 PMjim
04/09/2021, 3:57 PMjim
04/09/2021, 3:58 PMColton Idle
04/09/2021, 3:59 PM