Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move java_features.proto to java/core/srce/main/resources #16309

Merged
merged 3 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading