robjperez
08/12/2021, 11:48 AMandroidAndroidTestRelease
autogenerated source set
• If I put the tests on androidTest/kotlin
I cannot run the tests because AS says “No task available”
• If I put the tests on androidAndroidTest/kotlin
then AS runs the tests, but it looks like the tests are not included in the apk so no tests are runrobjperez
08/12/2021, 12:20 PMNo tasks available
😞robjperez
08/12/2021, 12:21 PMtest sources root
Karel Petránek
08/12/2021, 2:23 PMkotlin {
sourceSets {
if (isIdeaSyncing) {
androidAndroidTestRelease {}
}
}
}
where
boolean isIdeaSyncing = System.getProperty('idea.sync.active') != null
(like in the other thread we were discussing 🙂 )robjperez
08/12/2021, 2:37 PMrobjperez
08/12/2021, 2:39 PMKarel Petránek
08/12/2021, 3:06 PMrobjperez
08/12/2021, 3:14 PMshared/src/androidTest/kotlin/SampleTest.kt
I cannot run them with AS because it says “No Task available”robjperez
08/12/2021, 3:15 PMshared/src/androidAndroidTest/kotlin/SampleTest.kt
AS can try to run them, but the actual test is not in the generated test apk, so no tests are actually executedrobjperez
08/12/2021, 3:15 PMKarel Petránek
08/12/2021, 3:18 PMandroidAndroidTestRelease { dependsOn(androidTest) }
Karel Petránek
08/12/2021, 3:20 PMrobjperez
08/12/2021, 3:24 PMrobjperez
08/12/2021, 3:25 PMKarel Petránek
08/12/2021, 4:04 PMrobjperez
08/12/2021, 4:16 PMrobjperez
08/12/2021, 4:16 PMSebastian Sellmair [JB]
08/12/2021, 4:36 PMMJegorovas
08/13/2021, 6:37 AMNo tasks available
problem. For other problems, you should create new ones.tad
08/16/2021, 7:25 PMtad
08/16/2021, 7:25 PM