File: java-build.xml

package info (click to toggle)
protobuf 3.6.1.3-2
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 33,312 kB
  • sloc: cpp: 163,076; java: 65,099; objc: 59,422; ansic: 35,119; python: 20,846; cs: 19,220; php: 9,701; ruby: 4,020; makefile: 2,969; sh: 2,878; xml: 1,574; pascal: 388; lisp: 92
file content (44 lines) | stat: -rw-r--r-- 2,012 bytes parent folder | download | duplicates (2)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<project name="protobuf-java" default="jar" basedir="..">
    <property name="srcdir" value="src" />
    <property name="javadir" value="java/core" />
    <property name="javasrcdir" value="${javadir}/src" />
    <property name="targetdir" value="${javadir}/target" />
    <property name="classesdir" value="${targetdir}/classes" />
    <property name="generateddir" value="${targetdir}/generated-sources" />

    <target name="clean">
        <delete dir="${targetdir}"/>
    </target>

    <target name="generate">
        <mkdir dir="${generateddir}" />
        <echo message="${srcdir}" />
        <exec executable="${srcdir}/protoc">
            <arg value="--java_out=${generateddir}" />
            <arg value="--proto_path=${srcdir}" />
            <arg value="${srcdir}/google/protobuf/any.proto" />
            <arg value="${srcdir}/google/protobuf/api.proto" />
            <arg value="${srcdir}/google/protobuf/descriptor.proto" />
            <arg value="${srcdir}/google/protobuf/duration.proto" />
            <arg value="${srcdir}/google/protobuf/empty.proto" />
            <arg value="${srcdir}/google/protobuf/field_mask.proto" />
            <arg value="${srcdir}/google/protobuf/source_context.proto" />
            <arg value="${srcdir}/google/protobuf/struct.proto" />
            <arg value="${srcdir}/google/protobuf/timestamp.proto" />
            <arg value="${srcdir}/google/protobuf/type.proto" />
            <arg value="${srcdir}/google/protobuf/wrappers.proto" />
	    <arg value="${srcdir}/google/protobuf/compiler/plugin.proto" />
        </exec>
    </target>

    <target name="compile" depends="generate">
        <mkdir dir="${classesdir}"/>
        <javac srcdir="${generateddir}:${javasrcdir}/main/java"
               destdir="${classesdir}" source="1.5" target="1.5"
               includeantruntime="false" />
    </target>

    <target name="jar" depends="compile">
        <jar destfile="${targetdir}/protobuf.jar" basedir="${classesdir}" />
    </target>
</project>