Loading java/java.go +16 −6 Original line number Diff line number Diff line Loading @@ -2844,12 +2844,12 @@ func javaLibraryBp2Build(ctx android.TopDownMutatorContext, m *Library) { if !bp2BuildInfo.hasKotlin { props = bazel.BazelTargetModuleProperties{ Rule_class: "java_library", Bzl_load_location: "//build/bazel/rules/java:library.bzl", Bzl_load_location: "//build/bazel/rules/java:rules.bzl", } } else { props = bazel.BazelTargetModuleProperties{ Rule_class: "kt_jvm_library", Bzl_load_location: "//build/bazel/rules/kotlin:kt_jvm_library.bzl", Bzl_load_location: "//build/bazel/rules/kotlin:rules.bzl", } } Loading Loading @@ -2930,6 +2930,7 @@ func javaBinaryHostBp2Build(ctx android.TopDownMutatorContext, m *Binary) { props := bazel.BazelTargetModuleProperties{ Rule_class: "java_binary", Bzl_load_location: "//build/bazel/rules/java:rules.bzl", } attrs := &javaBinaryHostAttributes{ Runtime_deps: runtimeDeps, Loading @@ -2944,7 +2945,7 @@ func javaBinaryHostBp2Build(ctx android.TopDownMutatorContext, m *Binary) { ktName := m.Name() + "_kt" ktProps := bazel.BazelTargetModuleProperties{ Rule_class: "kt_jvm_library", Bzl_load_location: "//build/bazel/rules/kotlin:kt_jvm_library.bzl", Bzl_load_location: "//build/bazel/rules/kotlin:rules.bzl", } ktAttrs := &javaLibraryAttributes{ Loading Loading @@ -2981,7 +2982,10 @@ func (i *Import) ConvertWithBp2build(ctx android.TopDownMutatorContext) { attrs := &bazelJavaImportAttributes{ Jars: jars, } props := bazel.BazelTargetModuleProperties{Rule_class: "java_import"} props := bazel.BazelTargetModuleProperties{ Rule_class: "java_import", Bzl_load_location: "//build/bazel/rules/java:rules.bzl", } name := android.RemoveOptionalPrebuiltPrefix(i.Name()) Loading @@ -2992,7 +2996,13 @@ func (i *Import) ConvertWithBp2build(ctx android.TopDownMutatorContext) { Neverlink: bazel.BoolAttribute{Value: &neverlink}, Exports: bazel.MakeSingleLabelListAttribute(bazel.Label{Label: ":" + name}), } ctx.CreateBazelTargetModule(bazel.BazelTargetModuleProperties{Rule_class: "java_library"}, android.CommonAttributes{Name: name + "-neverlink"}, neverlinkAttrs) ctx.CreateBazelTargetModule( bazel.BazelTargetModuleProperties{ Rule_class: "java_library", Bzl_load_location: "//build/bazel/rules/java:rules.bzl", }, android.CommonAttributes{Name: name + "-neverlink"}, neverlinkAttrs) } Loading Loading
java/java.go +16 −6 Original line number Diff line number Diff line Loading @@ -2844,12 +2844,12 @@ func javaLibraryBp2Build(ctx android.TopDownMutatorContext, m *Library) { if !bp2BuildInfo.hasKotlin { props = bazel.BazelTargetModuleProperties{ Rule_class: "java_library", Bzl_load_location: "//build/bazel/rules/java:library.bzl", Bzl_load_location: "//build/bazel/rules/java:rules.bzl", } } else { props = bazel.BazelTargetModuleProperties{ Rule_class: "kt_jvm_library", Bzl_load_location: "//build/bazel/rules/kotlin:kt_jvm_library.bzl", Bzl_load_location: "//build/bazel/rules/kotlin:rules.bzl", } } Loading Loading @@ -2930,6 +2930,7 @@ func javaBinaryHostBp2Build(ctx android.TopDownMutatorContext, m *Binary) { props := bazel.BazelTargetModuleProperties{ Rule_class: "java_binary", Bzl_load_location: "//build/bazel/rules/java:rules.bzl", } attrs := &javaBinaryHostAttributes{ Runtime_deps: runtimeDeps, Loading @@ -2944,7 +2945,7 @@ func javaBinaryHostBp2Build(ctx android.TopDownMutatorContext, m *Binary) { ktName := m.Name() + "_kt" ktProps := bazel.BazelTargetModuleProperties{ Rule_class: "kt_jvm_library", Bzl_load_location: "//build/bazel/rules/kotlin:kt_jvm_library.bzl", Bzl_load_location: "//build/bazel/rules/kotlin:rules.bzl", } ktAttrs := &javaLibraryAttributes{ Loading Loading @@ -2981,7 +2982,10 @@ func (i *Import) ConvertWithBp2build(ctx android.TopDownMutatorContext) { attrs := &bazelJavaImportAttributes{ Jars: jars, } props := bazel.BazelTargetModuleProperties{Rule_class: "java_import"} props := bazel.BazelTargetModuleProperties{ Rule_class: "java_import", Bzl_load_location: "//build/bazel/rules/java:rules.bzl", } name := android.RemoveOptionalPrebuiltPrefix(i.Name()) Loading @@ -2992,7 +2996,13 @@ func (i *Import) ConvertWithBp2build(ctx android.TopDownMutatorContext) { Neverlink: bazel.BoolAttribute{Value: &neverlink}, Exports: bazel.MakeSingleLabelListAttribute(bazel.Label{Label: ":" + name}), } ctx.CreateBazelTargetModule(bazel.BazelTargetModuleProperties{Rule_class: "java_library"}, android.CommonAttributes{Name: name + "-neverlink"}, neverlinkAttrs) ctx.CreateBazelTargetModule( bazel.BazelTargetModuleProperties{ Rule_class: "java_library", Bzl_load_location: "//build/bazel/rules/java:rules.bzl", }, android.CommonAttributes{Name: name + "-neverlink"}, neverlinkAttrs) } Loading