diff options
Diffstat (limited to 'java/java.go')
-rw-r--r-- | java/java.go | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/java/java.go b/java/java.go index 5cd074ab1..9c0fcbaa0 100644 --- a/java/java.go +++ b/java/java.go @@ -1737,30 +1737,8 @@ func (j *Library) BuildSnapshot(sdkModuleContext android.ModuleContext, builder } } - j.generateJavaImport(builder, snapshotRelativeJavaLibPath, true) - - // This module is for the case when the source tree for the unversioned module - // doesn't exist (i.e. building in an unbundled tree). "prefer:" is set to false - // so that this module does not eclipse the unversioned module if it exists. - j.generateJavaImport(builder, snapshotRelativeJavaLibPath, false) -} - -func (j *Library) generateJavaImport(builder android.SnapshotBuilder, snapshotRelativeJavaLibPath string, versioned bool) { - bp := builder.AndroidBpFile() - name := j.Name() - bp.Printfln("java_import {") - bp.Indent() - if versioned { - bp.Printfln("name: %q,", builder.VersionedSdkMemberName(name)) - bp.Printfln("sdk_member_name: %q,", name) - } else { - bp.Printfln("name: %q,", name) - bp.Printfln("prefer: false,") - } - bp.Printfln("jars: [%q],", snapshotRelativeJavaLibPath) - bp.Dedent() - bp.Printfln("}") - bp.Printfln("") + module := builder.AddPrebuiltModule(sdkModuleContext.OtherModuleName(j), "java_import") + module.AddProperty("jars", []string{snapshotRelativeJavaLibPath}) } // java_library builds and links sources into a `.jar` file for the device, and possibly for the host as well. |