Skip to content

Commit 7a60fd3

Browse files
committed
Move all classes on the surface and their dependencies to api package.
1 parent 425eb51 commit 7a60fd3

File tree

202 files changed

+78
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

202 files changed

+78
-0
lines changed

move_files.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import os
2+
import shutil
3+
4+
def move_files(file_list, source_folder, destination_folder):
5+
"""
6+
Moves files from one folder to another.
7+
8+
Args:
9+
file_list: A list of file names to move.
10+
source_folder: The folder containing the files.
11+
destination_folder: The folder to move the files to.
12+
"""
13+
14+
for file_name in file_list:
15+
source_path = os.path.join(source_folder, file_name)
16+
destination_path = os.path.join(destination_folder, file_name)
17+
shutil.move(source_path, destination_path)
18+
19+
if __name__ == "__main__":
20+
file_list = os.listdir("/Users/blakeli/code/protobuf-poc-split/protobuf-api/src/main/java/com/google/api/")
21+
# print(file_list)
22+
source_folder = "/Users/blakeli/code/protobuf-poc-split-keep-package/src/main/java/com/google/protobuf/"
23+
destination_folder = "/Users/blakeli/code/protobuf-poc-split-keep-package/protobuf-api/src/main/java/com/google/protobuf/"
24+
os.makedirs(destination_folder, exist_ok=True)
25+
26+
move_files(file_list, source_folder, destination_folder)

pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
<groupId>org.example</groupId>
88
<artifactId>protobuf-poc-split-keep-package</artifactId>
99
<version>1.0-SNAPSHOT</version>
10+
<packaging>pom</packaging>
11+
<modules>
12+
<module>protobuf-api</module>
13+
<module>protobuf-sdk</module>
14+
</modules>
1015

1116
<properties>
1217
<maven.compiler.source>11</maven.compiler.source>

protobuf-api/pom.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
<parent>
7+
<groupId>org.example</groupId>
8+
<artifactId>protobuf-poc-split-keep-package</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
</parent>
11+
12+
<artifactId>protobuf-api</artifactId>
13+
14+
<properties>
15+
<maven.compiler.source>11</maven.compiler.source>
16+
<maven.compiler.target>11</maven.compiler.target>
17+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
18+
</properties>
19+
20+
</project>

0 commit comments

Comments
 (0)