summaryrefslogtreecommitdiff
path: root/java/base.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2023-12-07 13:10:56 -0800
committer Colin Cross <ccross@android.com> 2023-12-08 13:51:05 -0800
commit8ff105860d20f2ccbb8d8044bf562f94100b7f6a (patch)
treeb01575cd628eb36807b7ca274de28fd6a1971e17 /java/base.go
parente51c6e4109e8063e54cf7d8ced1b7da7f9359c34 (diff)
Remove ConvertWithBp2build implementations
Remove the ConvertWithBp2build implementations from all the module types, along with the related code. Bug: 315353489 Test: m blueprint_tests Change-Id: I212672286686a318893bc7348ddd5a5ec51e77a7
Diffstat (limited to 'java/base.go')
-rw-r--r--java/base.go53
1 files changed, 0 insertions, 53 deletions
diff --git a/java/base.go b/java/base.go
index c4b402620..cdb58a2f9 100644
--- a/java/base.go
+++ b/java/base.go
@@ -20,8 +20,6 @@ import (
"strconv"
"strings"
- "android/soong/ui/metrics/bp2build_metrics_proto"
-
"github.com/google/blueprint"
"github.com/google/blueprint/pathtools"
"github.com/google/blueprint/proptools"
@@ -408,7 +406,6 @@ type Module struct {
android.ModuleBase
android.DefaultableModuleBase
android.ApexModuleBase
- android.BazelModuleBase
// Functionality common to Module and Import.
embeddableInModuleAndImport
@@ -1038,37 +1035,6 @@ func (j *Module) collectJavacFlags(
// just adding a symlink under the root doesn't help.)
patchPaths := []string{".", ctx.Config().SoongOutDir()}
- // b/150878007
- //
- // Workaround to support *Bazel-executed* JDK9 javac in Bazel's
- // execution root for --patch-module. If this javac command line is
- // invoked within Bazel's execution root working directory, the top
- // level directories (e.g. libcore/, tools/, frameworks/) are all
- // symlinks. JDK9 javac does not traverse into symlinks, which causes
- // --patch-module to fail source file lookups when invoked in the
- // execution root.
- //
- // Short of patching javac or enumerating *all* directories as possible
- // input dirs, manually add the top level dir of the source files to be
- // compiled.
- topLevelDirs := map[string]bool{}
- for _, srcFilePath := range srcFiles {
- srcFileParts := strings.Split(srcFilePath.String(), "/")
- // Ignore source files that are already in the top level directory
- // as well as generated files in the out directory. The out
- // directory may be an absolute path, which means srcFileParts[0] is the
- // empty string, so check that as well. Note that "out" in Bazel's execution
- // root is *not* a symlink, which doesn't cause problems for --patch-modules
- // anyway, so it's fine to not apply this workaround for generated
- // source files.
- if len(srcFileParts) > 1 &&
- srcFileParts[0] != "" &&
- srcFileParts[0] != "out" {
- topLevelDirs[srcFileParts[0]] = true
- }
- }
- patchPaths = append(patchPaths, android.SortedKeys(topLevelDirs)...)
-
classPath := flags.classpath.FormJavaClassPath("")
if classPath != "" {
patchPaths = append(patchPaths, classPath)
@@ -2379,22 +2345,3 @@ type ModuleWithStem interface {
}
var _ ModuleWithStem = (*Module)(nil)
-
-func (j *Module) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
- switch ctx.ModuleType() {
- case "java_library", "java_library_host", "java_library_static", "tradefed_java_library_host":
- if lib, ok := ctx.Module().(*Library); ok {
- javaLibraryBp2Build(ctx, lib)
- }
- case "java_binary_host":
- if binary, ok := ctx.Module().(*Binary); ok {
- javaBinaryHostBp2Build(ctx, binary)
- }
- case "java_test_host":
- if testHost, ok := ctx.Module().(*TestHost); ok {
- javaTestHostBp2Build(ctx, testHost)
- }
- default:
- ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_TYPE_UNSUPPORTED, "")
- }
-}