Yunchi
09/29/2023, 7:09 PMjvmIntegrationTest
sourceset. It all works in gradle, but Android Studio isn’t able to launch tests when clicking the Run button on the gutter.Yunchi
09/29/2023, 7:10 PMYunchi
09/29/2023, 7:13 PMjvmIntegrationTest
sourceset seems to trigger a run using the JUnit plugin, notice the ◀️▶️ symbol on the left of JunitWorksIntegrationTest.kt
instead of the usual Gradle symbol.
The contents of the test is just
class JunitWorksIntegrationTest {
@Test
fun junitTest() {
throw Exception("boom")
}
}
Running it gets me error like this:
Cannot locate tasks that match ':shared:impl:compileJava' as task 'compileJava' is ambiguous in project ':shared:state-machine:data:impl'. Candidates are: 'compileDebugAndroidTestJavaWithJavac', 'compileDebugJavaWithJavac', 'compileDebugUnitTestJavaWithJavac', 'compileReleaseJavaWithJavac', 'compileReleaseUnitTestJavaWithJavac'.
Yunchi
09/29/2023, 7:15 PMjvmTest
package, like JunitWorksTest
above, gets kicked off properly with what I assume to be the gradle plugin given the little elephant symbol, and instead runs
:shared:impl:cleanJvmTest :shared:impl:jvmTest --tests "com.example.TestJunitWorks"
Yunchi
09/29/2023, 7:17 PMgradle :shared:impl:jvmIntegrationTest --tests "com.example.JunitWorksIntegrationTest"
either via the CLI or by manually creating a gradle configuration works just fine.
I’m guessing it’s something with Idea not liking how the source set, compilation, or test task is configured and isn’t recognizing it as a KMP Gradle test. I’m at a loss at what to do though.
Anyone got ideas?Yunchi
09/29/2023, 7:18 PMephemient
09/29/2023, 9:21 PMYunchi
09/29/2023, 9:23 PMephemient
09/29/2023, 9:29 PMephemient
09/29/2023, 9:29 PMYunchi
09/29/2023, 9:30 PMephemient
09/29/2023, 9:31 PMephemient
09/29/2023, 9:31 PMYunchi
09/29/2023, 9:32 PMYunchi
09/29/2023, 9:59 PMjvmIntegrationTest
Do you know if Intellij and AS use different kotlin plugins? They shouldn’t right?