diff options
| author | 2019-12-23 15:38:34 +0900 | |
|---|---|---|
| committer | 2019-12-23 06:46:39 +0000 | |
| commit | 5a80d9f352763c26f292def9c8e28656bde03cec (patch) | |
| tree | d0d389ae308d621f58acc41fdaf4f14a19693788 /apex/apex.go | |
| parent | 7e143af6ee16efad245922acd7baecbd980d2f98 (diff) | |
apex: drop `java_import` support
java_import doesn't support dex jar which is necessary to be packaged in
an APEX. Supporting this would require non-trivial work. By the way
java_import is not used and there is a workaround.(defining java_library
and static-linking with it)
We drop the support for `java_import` in APEX.
Bug: 139175488
Test: m (soong tests amended)
Change-Id: I924386571079090c701276d87f665ce7fbb6f074
Diffstat (limited to 'apex/apex.go')
| -rw-r--r-- | apex/apex.go | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/apex/apex.go b/apex/apex.go index 505e1fd4c..e0ee1ea40 100644 --- a/apex/apex.go +++ b/apex/apex.go @@ -884,18 +884,6 @@ func apexFileForJavaLibrary(ctx android.BaseModuleContext, lib javaLibrary) apex return newApexFile(ctx, fileToCopy, lib.Name(), dirInApex, javaSharedLib, lib) } -func apexFileForPrebuiltJavaLibrary(ctx android.BaseModuleContext, java *java.Import) apexFile { - dirInApex := "javalib" - // The output is only one, but for some reason, ImplementationJars returns Paths, not Path - implJars := java.ImplementationJars() - if len(implJars) != 1 { - panic(fmt.Errorf("java.ImplementationJars() must return single Path, but got: %s", - strings.Join(implJars.Strings(), ", "))) - } - fileToCopy := implJars[0] - return newApexFile(ctx, fileToCopy, java.Name(), dirInApex, javaSharedLib, java) -} - func apexFileForPrebuiltEtc(ctx android.BaseModuleContext, prebuilt android.PrebuiltEtcModule, depName string) apexFile { dirInApex := filepath.Join("etc", prebuilt.SubDir()) fileToCopy := prebuilt.OutputFile() @@ -1043,13 +1031,6 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) { } filesInfo = append(filesInfo, newApexFile(ctx, pf, pf.Base(), "etc/permissions", etc, nil)) return true // track transitive dependencies - } else if javaLib, ok := child.(*java.Import); ok { - af := apexFileForPrebuiltJavaLibrary(ctx, javaLib) - if !af.Ok() { - ctx.PropertyErrorf("java_libs", "%q does not have a jar output", depName) - } else { - filesInfo = append(filesInfo, af) - } } else { ctx.PropertyErrorf("java_libs", "%q of type %q is not supported", depName, ctx.OtherModuleType(child)) } |