russhwolf / multiplatform-settings

A Kotlin Multiplatform library for saving simple key-value data
Apache License 2.0
1.69k stars 67 forks source link

IDE cannot find the library when "kotlin.mpp.enableGranularSourceSetsMetadata=true" #62

Closed dbaroncelli closed 3 years ago

dbaroncelli commented 4 years ago

I am using Android Studio Canary 8

I enabled this line:

# Enable the hierarchy structure support
kotlin.mpp.enableGranularSourceSetsMetadata=true

on gradle.properties

as suggested here: https://kotlinlang.org/docs/reference/migrating-multiplatform-project-to-14.html#migrate-to-the-hierarchical-project-structure

In future versions, the hierarchical project structure with the usage of platform-dependent libraries in shared source sets will be the default in multiplatform projects. So the sooner you support it, the sooner users will be able to migrate. We'll also be very grateful if you report any bugs you find to our issue tracker.

but the IDE does not find the class, even thought it seems to compile:

Schermata 2020-08-28 alle 23 03 17

not sure if it's a problem with the IDE, or with the gradle setting, or with the library itself.

Please note, I am using the no-arg library (no sure if it affects that in any way):

Schermata 2020-08-28 alle 22 46 30
dbaroncelli commented 4 years ago

With Android Studio Canary 10 and Kotlin 1.4.10 I don't seem to verify this anymore

Ornolfr commented 4 years ago

Having a similar issue with "no-arg" version of the library on AS 4.1 RC 3 with the newest KMP plugin. Code completion stops working for the whole shared module.

russhwolf commented 4 years ago

I've been trying to do some minimal samples to get a better understanding of the different HMPP flags, but I've been having trouble getting consistent behavior. Will keep investigating because I want to understand this better. If anyone has a simple project they can upload that exhibits the issue, please let me know.

russhwolf commented 3 years ago

In 0.7 I removed the hmpp flag from the library. I'm curious if that helps this issue.

russhwolf commented 3 years ago

All the hmpp stuff should now be working in 0.8.