From 7c1958f0f451e9c6d7729138197f8a9982f6751c Mon Sep 17 00:00:00 2001 From: Jihoon Kang Date: Wed, 15 Nov 2023 00:34:43 +0000 Subject: [PATCH] Add environment variable BUILD_FROM_SOURCE_STUB On top of the soong build flag --build-from-source-stub, the user can configure build to generate stubs from source Java files by setting the environment variable BUILD_FROM_SOURCE_STUB=true. Test: m nothing Bug: 310279899 Change-Id: I0c5247558455f09b8fc208d988aab3b60bf0ff16 --- android/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/config.go b/android/config.go index bf0b9de06..572e006a1 100644 --- a/android/config.go +++ b/android/config.go @@ -2079,7 +2079,7 @@ func (c *config) BuildFromTextStub() bool { // TODO: b/302320354 - Remove the coverage build specific logic once the // robust solution for handling native properties in from-text stub build // is implemented. - return !c.buildFromSourceStub && !c.JavaCoverageEnabled() + return !c.buildFromSourceStub && !c.JavaCoverageEnabled() && !c.IsEnvTrue("BUILD_FROM_SOURCE_STUB") } func (c *config) SetBuildFromTextStub(b bool) {