Skip to content

Commit 22f1170

Browse files
committed
Move java_features.proto to java/core/srce/main/resources
This also fixes maven to package this correctly as google/protobuf/java_features.proto (same dir as WKT/descriptor.proto) instead of com/google/protobuf/java_features.proto. Fixes #16155 PiperOrigin-RevId: 617307475
1 parent b4e1870 commit 22f1170

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

java/core/BUILD.bazel

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,15 +168,15 @@ protobuf_java_library(
168168

169169
proto_library(
170170
name = "java_features_proto",
171-
srcs = ["src/main/java/com/google/protobuf/java_features.proto"],
172-
strip_import_prefix = "/java/core/src/main/java/com",
171+
srcs = ["src/main/resources/google/protobuf/java_features.proto"],
172+
strip_import_prefix = "/java/core/src/main/resources",
173173
visibility = ["//pkg:__pkg__"],
174174
deps = ["//:descriptor_proto"],
175175
)
176176

177177
filegroup(
178178
name = "java_features_proto_srcs",
179-
srcs = ["src/main/java/com/google/protobuf/java_features.proto"],
179+
srcs = ["src/main/resources/google/protobuf/java_features.proto"],
180180
visibility = ["//pkg:__pkg__"],
181181
)
182182

@@ -552,7 +552,7 @@ pkg_files(
552552
name = "dist_files",
553553
srcs = glob([
554554
"src/main/java/com/google/protobuf/*.java",
555-
"src/main/java/com/google/protobuf/*.proto",
555+
"src/main/resources/google/protobuf/*.proto",
556556
"src/test/java/**/*.java",
557557
"src/test/proto/**/*.proto",
558558
]) + [

java/core/generate-sources-build.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<arg value="--java_out=${generated.sources.dir}"/>
66
<arg value="--proto_path=${protobuf.source.dir}"/>
77
<arg value="--proto_path=${protobuf.java_source.dir}"/>
8-
<arg value="${protobuf.java_source.dir}/main/java/com/google/protobuf/java_features.proto"/>
8+
<arg value="${protobuf.java_source.dir}/google/protobuf/java_features.proto"/>
99
<arg value="${protobuf.source.dir}/google/protobuf/any.proto"/>
1010
<arg value="${protobuf.source.dir}/google/protobuf/api.proto"/>
1111
<arg value="${protobuf.source.dir}/google/protobuf/descriptor.proto"/>

java/core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
<resource>
6363
<directory>${protobuf.java_source.dir}</directory>
6464
<includes>
65-
<include>main/java/com/google/protobuf/java_features.proto</include>
65+
<include>google/protobuf/java_features.proto</include>
6666
</includes>
6767
</resource>
6868
</resources>

java/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<!-- These are relative to the submodules -->
3434
<protobuf.basedir>${project.basedir}/../..</protobuf.basedir>
3535
<protobuf.source.dir>${protobuf.basedir}/src</protobuf.source.dir>
36-
<protobuf.java_source.dir>${protobuf.basedir}/java/core/src</protobuf.java_source.dir>
36+
<protobuf.java_source.dir>${protobuf.basedir}/java/core/src/main/resources</protobuf.java_source.dir>
3737
<protoc>${protobuf.basedir}/protoc</protoc>
3838
<test.proto.dir>src/test/proto</test.proto.dir>
3939
<generated.sources.dir>${project.build.directory}/generated-sources</generated.sources.dir>

src/google/protobuf/editions/golden/editions_transform_proto2.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ edition = "2023";
1414

1515
package protobuf_editions_test;
1616

17-
import "third_party/java_src/protobuf/current/java/com/google/protobuf/java_features.proto";
17+
import "google/protobuf/java_features.proto";
1818
import "google/protobuf/cpp_features.proto";
1919
import "google/protobuf/editions/proto/editions_transform_proto3.proto";
2020

0 commit comments

Comments
 (0)