Created
June 5, 2010 09:50
-
-
Save fumokmm/426497 to your computer and use it in GitHub Desktop.
Antスクリプト内でGroovyスクリプトを利用するテンプレート。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" ?> | |
<project name="ant-with-groovy" default="test"> | |
<taskdef name="groovy" | |
classname="org.codehaus.groovy.ant.Groovy" | |
classpath="groovy-all-1.7.2.jar" /> <!-- groovy-all-*.jar を指定 --> | |
<target name="test"> | |
<groovy><![CDATA[ | |
// この中にgroovyスクリプトを自由に記述できる。 | |
// このバインディング内で暗黙的に利用可能な変数は以下。 | |
// | |
// ant …現在のプロジェクトを知っているAntBuilder | |
// project …現在、ビルドしているプロジェクト | |
// properties …現在のプロパティ (変更可能) | |
// target …現在、実行しているターゲット | |
// task …Groovyをラップしているタスク | |
println 'Groovy script in Ant script.' | |
]]></groovy> | |
</target> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment