| <!-- |
| 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. |
| --> |
| <project name="org.apache.easyant.plugins#scaladoc" xmlns:ea="antlib:org.apache.easyant"> |
| <ea:core-version requiredrevision="[0.9,+]" /> |
| |
| <target name="scaladoc:init"> |
| <ea:parameter property="src.main.scala" required="true" description="directory where sources to be compiled are" /> |
| <ea:parameter property="src.test.scala" required="true" description="directory where test sources to be compiled are" /> |
| <ea:parameter path="compile.main.classpath" required="true" description="path used to compile main sources" /> |
| <ea:parameter path="compile.test.classpath" required="true" description="path used to compile test sources" /> |
| |
| <ea:parameter property="target.report" default="${target}/report" description="base directory for reports" /> |
| <ea:parameter property="target.scaladoc" default="${target.report}/javadoc" description="base directory where scaladoc will be generated" /> |
| <ea:parameter property="target.scaladoc.main" default="${target.scaladoc}/main" description="directory where scaladoc will be generated" /> |
| <ea:parameter property="target.scaladoc.test" default="${target.scaladoc}/test" |
| description="directory where scaladoc for tests will be generated" /> |
| |
| <available file="${src.main.scala}" property="has.src.main.scala" /> |
| <available file="${src.test.scala}" property="has.src.test.scala" /> |
| </target> |
| |
| <target name="-scaladoc:main" depends="scaladoc:init" if="has.src.main.scala"> |
| <mkdir dir="${target.scaladoc.main}" /> |
| <scaladoc destdir="${target.scaladoc.main}" srcdir="${src.main.scala}" classpathref="compile.main.classpath" /> |
| </target> |
| |
| <target name="-scaladoc:test" depends="scaladoc:init" if="has.src.test.scala"> |
| <mkdir name="${target.scaladoc.test}" /> |
| <scaladoc destdir="${target.scaladoc.test}" srcdir="${src.test.scala}" classpathref="compile.test.classpath" /> |
| </target> |
| |
| <target name="scaladoc:scaladoc" depends="-scaladoc:main,scaladoc:-test" description="generate scaladoc report for main classes and test classes" /> |
| </project> |