blob: 3035d4324455130e378654b1a77f1485f6fd76bd [file] [log] [blame]
<!--
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
* Author: anorth@google.com (Alex North)
-->
<project>
<import file="${build.classpath.path}"/>
<!--
Compiles the sources referenced by the "srcs" patternset.
The model for these rules is that buildjava's source path includes the
entire universe of all source, but small fragements of it are compiled
one by one as specificed by a subproject's 'srcs' pattern.
-->
<target name="compile">
<echo message="Compiling ${libname}"/>
<buildjava destdir="${build.src.dir}" srcpattern="srcs">
<src path="${src.dir}"/>
<classpath>
<path refid="libpath"/>
<path location="${build.proto.dir}"/>
<path location="${build.messages.dir}"/>
</classpath>
</buildjava>
</target>
<!--
Compiles the tests referenced by the "srcs" patternset.
-->
<target name="compile-tests">
<buildjava srcdir="${test.dir}" destdir="${build.test.dir}" srcpattern="srcs">
<classpath>
<path refid="libpath"/>
<path location="${build.src.dir}"/>
<path location="${build.proto.dir}"/>
<path location="${build.messages.dir}"/>
</classpath>
</buildjava>
</target>
<!--
Packages compiled and source files into jars
-->
<target name="dist" depends="compile">
<distlib srcpattern="srcs" libname="${libname}"/>
</target>
</project>