Set strict_mode to true
The default strict_mode is now set to true. We are encourage teams to write tests in strict_mode to make tests Bivalent (able to run on device and devicelessly)
Ignore-AOSP-First: Due to merge conflicts, will submit in AOSP later after these batch of CLs are merged in git_main
Test: atest MyRoboTests
Bug: 334089788
Change-Id: I3098e2c1ef1b5fd2ee1a98950db5e4f2e8d87d1e
diff --git a/java/robolectric.go b/java/robolectric.go
index 18386c9..039e439 100644
--- a/java/robolectric.go
+++ b/java/robolectric.go
@@ -116,7 +116,7 @@
if v := String(r.robolectricProperties.Robolectric_prebuilt_version); v != "" {
ctx.AddVariationDependencies(nil, libTag, fmt.Sprintf(robolectricPrebuiltLibPattern, v))
- } else if !proptools.Bool(r.robolectricProperties.Strict_mode) {
+ } else if !proptools.BoolDefault(r.robolectricProperties.Strict_mode, true) {
if proptools.Bool(r.robolectricProperties.Upstream) {
ctx.AddVariationDependencies(nil, libTag, robolectricCurrentLib+"_upstream")
} else {
@@ -124,7 +124,7 @@
}
}
- if proptools.Bool(r.robolectricProperties.Strict_mode) {
+ if proptools.BoolDefault(r.robolectricProperties.Strict_mode, true) {
ctx.AddVariationDependencies(nil, roboRuntimeOnlyTag, robolectricCurrentLib+"_upstream")
}