Loading java/droiddoc.go +14 −12 Original line number Diff line number Diff line Loading @@ -1979,25 +1979,27 @@ func (d *Droidstubs) BuildSnapshot(sdkModuleContext android.ModuleContext, build snapshotRelativeDir := filepath.Join("java", d.Name()+"_stubs_sources") builder.UnzipToSnapshot(stubsSrcJar, snapshotRelativeDir) name := d.Name() bp := builder.AndroidBpFile() bp.Printfln("prebuilt_stubs_sources {") bp.Indent() bp.Printfln("name: %q,", builder.VersionedSdkMemberName(name)) bp.Printfln("sdk_member_name: %q,", name) bp.Printfln("srcs: [%q],", snapshotRelativeDir) bp.Dedent() bp.Printfln("}") bp.Printfln("") d.generatePrebuiltStubsSources(builder, snapshotRelativeDir, 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. d.generatePrebuiltStubsSources(builder, snapshotRelativeDir, false) } func (d *Droidstubs) generatePrebuiltStubsSources(builder android.SnapshotBuilder, snapshotRelativeDir string, versioned bool) { bp := builder.AndroidBpFile() name := d.Name() bp.Printfln("prebuilt_stubs_sources {") 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("srcs: [%q],", snapshotRelativeDir) bp.Printfln("prefer: false,") } bp.Printfln("srcs: [%q],", snapshotRelativeDir) bp.Dedent() bp.Printfln("}") bp.Printfln("") Loading sdk/sdk_test.go +1 −1 Original line number Diff line number Diff line Loading @@ -515,8 +515,8 @@ prebuilt_stubs_sources { prebuilt_stubs_sources { name: "myjavaapistubs", srcs: ["java/myjavaapistubs_stubs_sources"], prefer: false, srcs: ["java/myjavaapistubs_stubs_sources"], } cc_prebuilt_library_shared { Loading Loading
java/droiddoc.go +14 −12 Original line number Diff line number Diff line Loading @@ -1979,25 +1979,27 @@ func (d *Droidstubs) BuildSnapshot(sdkModuleContext android.ModuleContext, build snapshotRelativeDir := filepath.Join("java", d.Name()+"_stubs_sources") builder.UnzipToSnapshot(stubsSrcJar, snapshotRelativeDir) name := d.Name() bp := builder.AndroidBpFile() bp.Printfln("prebuilt_stubs_sources {") bp.Indent() bp.Printfln("name: %q,", builder.VersionedSdkMemberName(name)) bp.Printfln("sdk_member_name: %q,", name) bp.Printfln("srcs: [%q],", snapshotRelativeDir) bp.Dedent() bp.Printfln("}") bp.Printfln("") d.generatePrebuiltStubsSources(builder, snapshotRelativeDir, 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. d.generatePrebuiltStubsSources(builder, snapshotRelativeDir, false) } func (d *Droidstubs) generatePrebuiltStubsSources(builder android.SnapshotBuilder, snapshotRelativeDir string, versioned bool) { bp := builder.AndroidBpFile() name := d.Name() bp.Printfln("prebuilt_stubs_sources {") 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("srcs: [%q],", snapshotRelativeDir) bp.Printfln("prefer: false,") } bp.Printfln("srcs: [%q],", snapshotRelativeDir) bp.Dedent() bp.Printfln("}") bp.Printfln("") Loading
sdk/sdk_test.go +1 −1 Original line number Diff line number Diff line Loading @@ -515,8 +515,8 @@ prebuilt_stubs_sources { prebuilt_stubs_sources { name: "myjavaapistubs", srcs: ["java/myjavaapistubs_stubs_sources"], prefer: false, srcs: ["java/myjavaapistubs_stubs_sources"], } cc_prebuilt_library_shared { Loading