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

gregopet

11/08/2017, 8:39 AM
I have a Kotlin common module that is being consumed by JVM and JS code and it works using Gradle; IntelliJ keeps complaining about classes like
Int
missing in the common module, though, even though the module's target platform is marked as
Common (experimental)
and the language version is at 1.2 - any hints on what I could try?
i

ilya.gorbunov

11/08/2017, 2:37 PM
So in the common module
Int
is unresolved, right? What about classes like
Regex
or
StringBuilder
?
g

gregopet

11/08/2017, 2:42 PM
It's different for the two;
Regex
is unresolved while
StringBuilder
seems to get resolved. For
String
I get
Type mismatch: inferred type is kotlin.String but java.lang.String was expected
Array
is also unresolved, as is
mutableListOf
This also seemed interesting: I have String aliased to the name
Property
(simply because it makes a few function calls more descriptive) and I get
Operator '==' cannot be applied to 'Property /* = java.lang.String */' and 'kotlin.String'
i

ilya.gorbunov

11/08/2017, 2:46 PM
Do you have a dependency of
kotlin-stdlib-common
in your common module?
g

gregopet

11/09/2017, 7:44 AM
Yes, I do:
Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:1.2.0-beta-88
The Kotlin tab has the language & API versions at 1.2
Though it's interesting.. in Gradle I have the
1.2.0-rc-39
version
I'll try installing a new version of the Kotlin plugin, maybe that will help
2 Views