diff --git a/aspect/build_dependencies.bzl b/aspect/build_dependencies.bzl index dfd381c126b..7f45c79f53d 100644 --- a/aspect/build_dependencies.bzl +++ b/aspect/build_dependencies.bzl @@ -5,7 +5,6 @@ load( "CPP_COMPILE_ACTION_NAME", "C_COMPILE_ACTION_NAME", ) -load(":java_info.bzl", "get_java_info") ALWAYS_BUILD_RULES = "java_proto_library,java_lite_proto_library,java_mutable_proto_library,kt_proto_library_helper,_java_grpc_library,_java_lite_grpc_library,kt_grpc_library_helper,java_stubby_library,kt_stubby_library_helper,aar_import,java_import" @@ -16,6 +15,16 @@ PROTO_RULE_KINDS = [ "kt_proto_library_helper", ] +def java_info_in_target(target): + return JavaInfo in target + +def get_java_info(target): + if JavaInfo in target: + return target[JavaInfo] + +def java_info_reference(): + return [JavaInfo] + def _package_dependencies_impl(target, ctx): java_info_file = _write_java_target_info(target, ctx) cc_info_file = _write_cc_target_info(target, ctx) diff --git a/querysync/java/com/google/idea/blaze/qsync/project/ProjectDefinition.java b/querysync/java/com/google/idea/blaze/qsync/project/ProjectDefinition.java index 118820262e2..e016ef19388 100644 --- a/querysync/java/com/google/idea/blaze/qsync/project/ProjectDefinition.java +++ b/querysync/java/com/google/idea/blaze/qsync/project/ProjectDefinition.java @@ -100,7 +100,7 @@ public QuerySpec deriveQuerySpec(Context context, Path workspaceRoot) throws */ private static boolean isValidPathForQuery(Context context, Path candidate) throws IOException { - if (Files.exists(candidate.resolve("BUILD"))) { + if (Files.exists(candidate.resolve("BUILD")) || Files.exists(candidate.resolve("BUILD.bazel"))) { return true; } if (!Files.isDirectory(candidate)) {