From bb678f82d6bb5cd89bf282e88a879123d9763d61 Mon Sep 17 00:00:00 2001 From: Jihoon Kang Date: Mon, 1 Jul 2024 17:04:46 +0000 Subject: 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: I36e9cd956c5a076a53635be0c6ff27f77725516e --- java/sdk_library.go | 1 + 1 file changed, 1 insertion(+) (limited to 'java/sdk_library.go') diff --git a/java/sdk_library.go b/java/sdk_library.go index 2fe629fb1..a53edba55 100644 --- a/java/sdk_library.go +++ b/java/sdk_library.go @@ -2099,6 +2099,7 @@ func (module *SdkLibrary) topLevelStubsLibraryProps(mctx android.DefaultableHook props.Dist.Dir = proptools.StringPtr(module.apiDistPath(apiScope)) props.Dist.Tag = proptools.StringPtr(".jar") } + props.Is_stubs_module = proptools.BoolPtr(true) return props } -- cgit v1.2.3-59-g8ed1b