java_library support for building headers-only

Flag for java_library modules to build just the Turbine headers and
skip building an impl jar.

Test: go test java
Bug: 289776578
Change-Id: Iad0babf951710476bc32df93c25d17065a14ab84
This commit is contained in:
Mark White
2023-08-22 21:28:11 +00:00
parent f5ee8e3ffc
commit a15790ac1e
6 changed files with 90 additions and 0 deletions

View File

@@ -692,6 +692,7 @@ func (j *Library) GenerateAndroidBuildActions(ctx android.ModuleContext) {
}
j.checkSdkVersions(ctx)
j.checkHeadersOnly(ctx)
if ctx.Device() {
j.dexpreopter.installPath = j.dexpreopter.getInstallPath(
ctx, android.PathForModuleInstall(ctx, "framework", j.Stem()+".jar"))