-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenerate-protobuf.xml
26 lines (24 loc) · 1.21 KB
/
generate-protobuf.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<project default="generate">
<property name="source.folder.kotlin" value="src/main/kotlin"/>
<property name="source.folder.java" value="src/main/kotlin"/>
<property name="target.package" value="com.greensopinion.vectorvector.vector.pbf"/>
<property name="source.vector.proto" value="https://raw.githubusercontent.com/mapbox/vector-tile-spec/refs/heads/master/2.1/vector_tile.proto"/>
<property name="project.build.tmp" value="target/tmp"/>
<property name="project.build.tmp.proto" value="target/tmp/vector_tile.proto"/>
<property name="protoc.path" value="/opt/homebrew/bin/protoc"/>
<target name="generate">
<mkdir dir="${project.build.tmp}"/>
<mkdir dir="${source.folder.java}"/>
<mkdir dir="${source.folder.kotlin}"/>
<get src="${source.vector.proto}" dest="${project.build.tmp.proto}" />
<echo level="info">
To get protoc run the following:
brew install protobuf
</echo>
<exec executable="${protoc.path}">
<arg value="--kotlin_out=${source.folder.kotlin}" />
<arg value="--java_out=${source.folder.java}"/>
<arg value="${project.build.tmp.proto}"/>
</exec>
</target>
</project>