Skip to content

Commit f7d2326

Browse files
authored
Merge pull request #16309 from protocolbuffers/cp-26x-4
Move java_features.proto to java/core/srce/main/resources
2 parents e1092ee + a2f5303 commit f7d2326

File tree

7 files changed

+9
-11
lines changed

7 files changed

+9
-11
lines changed

java/core/BUILD.bazel

+4-6
Original file line numberDiff line numberDiff line change
@@ -168,20 +168,18 @@ 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 = [
174174
"//java/kotlin:__pkg__",
175-
"//java/kotlin-lite:__pkg__",
176-
"//java/lite:__pkg__",
177175
"//pkg:__pkg__",
178176
],
179177
deps = ["//:descriptor_proto"],
180178
)
181179

182180
filegroup(
183181
name = "java_features_proto_srcs",
184-
srcs = ["src/main/java/com/google/protobuf/java_features.proto"],
182+
srcs = ["src/main/resources/google/protobuf/java_features.proto"],
185183
visibility = ["//pkg:__pkg__"],
186184
)
187185

@@ -557,7 +555,7 @@ pkg_files(
557555
name = "dist_files",
558556
srcs = glob([
559557
"src/main/java/com/google/protobuf/*.java",
560-
"src/main/java/com/google/protobuf/*.proto",
558+
"src/main/resources/google/protobuf/*.proto",
561559
"src/test/java/**/*.java",
562560
"src/test/proto/**/*.proto",
563561
]) + [

java/core/generate-sources-build.xml

+1-1
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

+1-1
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

+1-1
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/file_lists.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ set(plugin_proto_files
602602

603603
# @//java/core:java_features_proto
604604
set(java_features_proto_proto_srcs
605-
${protobuf_SOURCE_DIR}/java/core/src/main/java/com/google/protobuf/java_features.proto
605+
${protobuf_SOURCE_DIR}/java/core/src/main/resources/google/protobuf/java_features.proto
606606
)
607607

608608
# @//java/core:java_features_proto

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

+1-1
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)