summaryrefslogtreecommitdiff
path: root/java/testing.go
diff options
context:
space:
mode:
author Jihoon Kang <jihoonkang@google.com> 2024-07-01 17:04:46 +0000
committer Jihoon Kang <jihoonkang@google.com> 2024-08-28 18:01:25 +0000
commit2a88491afc72707c21a125b81f7dcd252d2fc5f1 (patch)
tree49f62c495320605e5f5792d702ea368adc8dc7f7 /java/testing.go
parenta1527e5e23a517911891074a6b83dfe02823aef3 (diff)
Revert^2 "Implement detecting container violations."
This change introduces a method to detect violating inter-container dependencies between modules. The method is run in `ModuleBase.GenerateBuildActions`, after the container info provider is set. Given that the provider of the direct dependencies would have been set at this time, the method utilizes this information to determine the violations, which are introduced in https://r.android.com/3141104. Note that this enforcement does not turn all inter-container dependencies as errors. Instead, it will only turn dependencies that matches the pre-defined violations into errors. Even if the dependency matches the violation, an error will not be thrown if the dependency satisfies any of the exception functions (e.g. the dependent module is stubs, or the two modules belong to the same apexes). Test: m nothing --no-skip-soong-tests Bug: 338660802 Change-Id: Ia693c4a53369c757a3e96656a769405c759b111c
Diffstat (limited to 'java/testing.go')
-rw-r--r--java/testing.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/java/testing.go b/java/testing.go
index 0e85022ce..03dcee667 100644
--- a/java/testing.go
+++ b/java/testing.go
@@ -184,6 +184,10 @@ var PrepareForTestWithJacocoInstrumentation = android.GroupFixturePreparers(
host_supported: true,
srcs: ["Test.java"],
sdk_version: "current",
+ apex_available: [
+ "//apex_available:anyapex",
+ "//apex_available:platform",
+ ],
}
`)),
)
@@ -408,7 +412,6 @@ func gatherRequiredDepsForTest() string {
"core.current.stubs",
"legacy.core.platform.api.stubs",
"stable.core.platform.api.stubs",
-
"android_stubs_current_exportable",
"android_system_stubs_current_exportable",
"android_test_stubs_current_exportable",
@@ -416,13 +419,11 @@ func gatherRequiredDepsForTest() string {
"android_system_server_stubs_current_exportable",
"core.current.stubs.exportable",
"legacy.core.platform.api.stubs.exportable",
-
"kotlin-stdlib",
"kotlin-stdlib-jdk7",
"kotlin-stdlib-jdk8",
"kotlin-annotations",
"stub-annotations",
-
"aconfig-annotations-lib",
"unsupportedappusage",
}
@@ -435,6 +436,7 @@ func gatherRequiredDepsForTest() string {
sdk_version: "none",
system_modules: "stable-core-platform-api-stubs-system-modules",
compile_dex: true,
+ is_stubs_module: true,
}
`, extra)
}