-
Notifications
You must be signed in to change notification settings - Fork 55
Closed
Labels
Milestone
Description
When I add the option android.testOptions.junitPlatform.unitTests.includeAndroidResources
to the app build.gradle
, there is an Gradle error:
Could not set unknown property 'includeAndroidResources' for object of type de.mannodermaus.gradle.plugins.junit5.AndroidJUnitPlatformExtension$UnitTestOptions.
This is a snippet from the build.gradle
:
android {
...
testOptions {
...
junitPlatform {
...
unitTests {
// Fix unit test resources not included with AS3
includeAndroidResources = true
}
}
}
Some background info on this flag: https://android.jlelse.eu/make-robolectric-compatible-with-latest-gradle-tools-3-0-0-eca085681b3b
To fix this in the plugin, it seems you need to add the following line:
var includeAndroidResources = false
around here:
android-junit5/android-junit5/src/main/kotlin/de/mannodermaus/gradle/plugins/junit5/Dsl.kt
Line 523 in 715344a
} |
Could you fix this and release a new version with support for this flag so we can use resources in unit tests?