https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
f

fkrauthan

02/06/2021, 4:49 AM
Hey my Intellij in latest version shows me the error message:
The feature "multi platform projects" is experimental and should be enabled explicitly
for a shared lib. But I do have in my gradle file this
Copy code
targets.all {
        compilations.all {
            kotlinOptions {
                freeCompilerArgs = listOf("-Xmulti-platform")
            }
        }
    }
but the error does not go away. It is running fine but super annoying. Anyone know what todo?
j

Javier

02/06/2021, 9:10 AM
It is a flag in
gradle.properties
but it says something about alpha state I think 🤔
btw in Multiplatform projects you cant add flags there, take a look at language features
f

fkrauthan

02/08/2021, 6:04 PM
hmm I found this in the multiplatform guide?
And the problem is not the code itself compiled through gradle (that works fine) but intellij importing this gradle project annoys me with that error message
j

Javier

02/08/2021, 6:08 PM
the code will compile but it will do nothing
btw maybe I am wrong with that
f

fkrauthan

02/08/2021, 8:42 PM
that shows I can set kotlinOptions the way listed above
Hmm just tried it but there is no language feature for multi platform project
h

HankG

02/27/2021, 6:14 PM
Reviving this question because I just ran across it too. I only get this when I ported my gradle to be multiplatform manually but a new one autogenerated does not have this problem
I can't see any differences in my gradle files which hint at why it doesn't know it's explicitly added either...weird
i

Ingo Noka

04/21/2021, 10:40 AM
I am getting the Intellij warning (The feature “multi platform projects” is experimental and should be enabled explicitly) when I set
Copy code
kotlin.mpp.enableGranularSourceSetsMetadata=true
in gradle.properties. The warning goes away when I remove that setting and reload gradle.
👍 1
j

Javier

04/21/2021, 10:47 AM
I should keep it if it works for you, it will be enabled by default in the future
i

Ingo Noka

04/21/2021, 10:48 AM
Unfortunately it doesn’t work for me. For now the warning and red underlining of all expect keywords is too annoying.
j

Javier

04/21/2021, 10:50 AM
I think I got that issue too, but I don't remember if I solved removing it TBH
i

Ingo Noka

04/21/2021, 10:50 AM
j

Javier

04/21/2021, 10:55 AM
Ah, I think I am talking about a different warning, which appears in CLI, but after 2 months I dont remember 😢
5 Views