Skip to content

Commit

Permalink
Merge pull request #16309 from protocolbuffers/cp-26x-4
Browse files Browse the repository at this point in the history
Move java_features.proto to java/core/srce/main/resources
  • Loading branch information
zhangskz authored Mar 26, 2024
2 parents e1092ee + a2f5303 commit f7d2326
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 11 deletions.
10 changes: 4 additions & 6 deletions java/core/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -168,20 +168,18 @@ protobuf_java_library(

proto_library(
name = "java_features_proto",
srcs = ["src/main/java/com/google/protobuf/java_features.proto"],
strip_import_prefix = "/java/core/src/main/java/com",
srcs = ["src/main/resources/google/protobuf/java_features.proto"],
strip_import_prefix = "/java/core/src/main/resources",
visibility = [
"//java/kotlin:__pkg__",
"//java/kotlin-lite:__pkg__",
"//java/lite:__pkg__",
"//pkg:__pkg__",
],
deps = ["//:descriptor_proto"],
)

filegroup(
name = "java_features_proto_srcs",
srcs = ["src/main/java/com/google/protobuf/java_features.proto"],
srcs = ["src/main/resources/google/protobuf/java_features.proto"],
visibility = ["//pkg:__pkg__"],
)

Expand Down Expand Up @@ -557,7 +555,7 @@ pkg_files(
name = "dist_files",
srcs = glob([
"src/main/java/com/google/protobuf/*.java",
"src/main/java/com/google/protobuf/*.proto",
"src/main/resources/google/protobuf/*.proto",
"src/test/java/**/*.java",
"src/test/proto/**/*.proto",
]) + [
Expand Down
2 changes: 1 addition & 1 deletion java/core/generate-sources-build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<arg value="--java_out=${generated.sources.dir}"/>
<arg value="--proto_path=${protobuf.source.dir}"/>
<arg value="--proto_path=${protobuf.java_source.dir}"/>
<arg value="${protobuf.java_source.dir}/main/java/com/google/protobuf/java_features.proto"/>
<arg value="${protobuf.java_source.dir}/google/protobuf/java_features.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/any.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/api.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/descriptor.proto"/>
Expand Down
2 changes: 1 addition & 1 deletion java/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<resource>
<directory>${protobuf.java_source.dir}</directory>
<includes>
<include>main/java/com/google/protobuf/java_features.proto</include>
<include>google/protobuf/java_features.proto</include>
</includes>
</resource>
</resources>
Expand Down
2 changes: 1 addition & 1 deletion java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<!-- These are relative to the submodules -->
<protobuf.basedir>${project.basedir}/../..</protobuf.basedir>
<protobuf.source.dir>${protobuf.basedir}/src</protobuf.source.dir>
<protobuf.java_source.dir>${protobuf.basedir}/java/core/src</protobuf.java_source.dir>
<protobuf.java_source.dir>${protobuf.basedir}/java/core/src/main/resources</protobuf.java_source.dir>
<protoc>${protobuf.basedir}/protoc</protoc>
<test.proto.dir>src/test/proto</test.proto.dir>
<generated.sources.dir>${project.build.directory}/generated-sources</generated.sources.dir>
Expand Down
2 changes: 1 addition & 1 deletion src/file_lists.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ set(plugin_proto_files

# @//java/core:java_features_proto
set(java_features_proto_proto_srcs
${protobuf_SOURCE_DIR}/java/core/src/main/java/com/google/protobuf/java_features.proto
${protobuf_SOURCE_DIR}/java/core/src/main/resources/google/protobuf/java_features.proto
)

# @//java/core:java_features_proto
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ edition = "2023";

package protobuf_editions_test;

import "third_party/java_src/protobuf/current/java/com/google/protobuf/java_features.proto";
import "google/protobuf/java_features.proto";
import "google/protobuf/cpp_features.proto";
import "google/protobuf/editions/proto/editions_transform_proto3.proto";

Expand Down

0 comments on commit f7d2326

Please sign in to comment.