I have a multimodule project on Kotlin 1.9.20, where one (and only one) module errors when I use the new
androidTarget
, saying it doesn't exist. I see a warning in my IDE that
android
target is deprecated, suggesting that I change it, but sync fails if I do. Is there something I'm missing?
Landry Norris
11/08/2023, 4:43 PM
The build.gradle.kts file is pretty standard, and almost copy/paste from the other modules, which do work.
f
Fergus Hewson
11/08/2023, 4:57 PM
Are you applying the default hierarchy?
kotlin {
applyDefaultHierarchyTemplate()
androidTarget()
}
l
Landry Norris
11/08/2023, 4:58 PM
I'm not, but I was under the impression that 1.9.20 does so automatically.
Landry Norris
11/08/2023, 5:00 PM
I should probably clarify my 'doesn't exist' to say it gives a syntax error saying androidTarget is not defined. I'm not sure if that module is somehow still using the kmp 1.8.20 gradle plugin or something, but from my understanding of gradle, one module can't have a different plugin version.