diff options
| author | 2023-03-13 16:07:00 +0000 | |
|---|---|---|
| committer | 2023-03-13 16:07:00 +0000 | |
| commit | fd11e9ee5b2b84e616a465c3192ec12dff94fb3a (patch) | |
| tree | bb94c6bad1bd73592b296ed8ac68124a258dd4ac /java/java.go | |
| parent | 6235f58040e80c345f5b8dc80eb39cec3dffb651 (diff) | |
| parent | 686df3185299bea35abe716bc403d92f4d91264f (diff) | |
Merge "Update load statements in java.go bp2build" am: 686df31852
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2480297
Change-Id: I132636c4b4d96394eb844435fb7c31212bd93fae
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'java/java.go')
| -rw-r--r-- | java/java.go | 22 | 
1 files changed, 16 insertions, 6 deletions
| diff --git a/java/java.go b/java/java.go index 61f5949bb..e8f78ba4a 100644 --- a/java/java.go +++ b/java/java.go @@ -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",  		}  	} @@ -2929,7 +2929,8 @@ func javaBinaryHostBp2Build(ctx android.TopDownMutatorContext, m *Binary) {  	}  	props := bazel.BazelTargetModuleProperties{ -		Rule_class: "java_binary", +		Rule_class:        "java_binary", +		Bzl_load_location: "//build/bazel/rules/java:rules.bzl",  	}  	attrs := &javaBinaryHostAttributes{  		Runtime_deps: runtimeDeps, @@ -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{ @@ -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()) @@ -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)  } |