https://kotlinlang.org logo
Title
j

Jonathan

11/23/2018, 10:13 AM
Hi guys, can someone please tell me how to disable warnings in IntelliJ for
ExperimentalCoroutinesApi
when using maven? (the following is obviously not working)
<configuration>
	<args>
		<args>-Xuse-experimental=kotlin.Experimental</args>
		<args>-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi</args>
		<args>-Xuse-experimental=kotlinx.coroutines.ObsoleteCoroutinesApi</args>
	</args>
</configuration>
g

gildor

11/23/2018, 10:18 AM
-Xuse-experimental
->
-Xexperimental
j

Jonathan

11/23/2018, 10:20 AM
Thank you very much @gildor! May I ask where did you find this information? Do you know why is it different from we write in gradle builds?
g

gildor

11/23/2018, 10:21 AM
this is how I use it with gradle
j

Jonathan

11/23/2018, 10:22 AM
mmhhh... my gradle works fine like this:
compileTestKotlin {
    kotlinOptions {
        freeCompilerArgs = [
                '-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi',
                '-Xuse-experimental=kotlinx.coroutines.ObsoleteCoroutinesApi'
        ]
    }
}
Do you know where I could find documentation about that?
g

gildor

11/23/2018, 10:27 AM
do you see compile-time warnings or only IDE?
j

Jonathan

11/23/2018, 10:28 AM
No I don't see compile-type warnings as far as I remember (cannot check right now)
g

gildor

11/23/2018, 10:28 AM
So, probably it’s just some tooling issue
maybe make sense to report it
j

Jonathan

11/23/2018, 11:47 AM
Actually, I still have the problem using "-Xexperimental" instead of "-Xuse-experimental" 😕
And I checked, I do have compile time warnings
g

gildor

11/23/2018, 11:51 AM
Maybe it's just incorrect way to pass arguments. I just not familiar with kotlin maven