Skip to content

Commit

Permalink
Added plugin building scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
viatsko committed Aug 11, 2011
1 parent 7451864 commit 9ecbfdf
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 0 deletions.
File renamed without changes.
80 changes: 80 additions & 0 deletions build-package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<project name="Idea Parser 3 language scripted build file" default="package"
basedir=".">

<!-- set global properties for this build -->
<property name="main-src" location="main/src"/>
<property name="main-resources" location="main/resources"/>
<property name="jreformator-src" location="jreformator/src"/>
<property name="idea-support-src" location="idea-support/src"/>
<property name="idea-errorreporting-client-src"
location="idea-errorreporting-client/src"/>
<property name="als-java-toolkit-src" location="als-java-toolkit/src"/>

<property name="build" location="build"/>
<property name="dist" location="dist"/>

<property name="parser.plugin.name" value="idea-parser3"/>
<property name="idea.community.build"
location="${user.home}/Projects/ideaIC-107.105/"/>


<taskdef name="javac2" classname="com.intellij.ant.Javac2">
<classpath>
<pathelement location="${idea.community.build}/redist/forms_rt.jar"/>
<pathelement location="${idea.community.build}/redist/javac2.jar"/>
<pathelement location="${idea.community.build}/redist/annotations.jar"/>
<fileset dir="${idea.community.build}" includes="**/*.jar"/>
</classpath>

</taskdef>

<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
<mkdir dir="${dist}"/>

<echo message="Using IDEA build from: ${idea.community.build}"/>
</target>

<target name="compile" depends="clean,init" description="compile the source ">
<javac2 destdir="${build}" includeantruntime="false">
<src path="${main-src}"></src>
<src path="${jreformator-src}"></src>
<src path="${idea-support-src}"></src>
<src path="${idea-errorreporting-client-src}"></src>
<src path="${als-java-toolkit-src}"></src>

<classpath>
<fileset dir="${idea.community.build}" includes="**/*.jar"/>
</classpath>
<compilerarg value="-Xlint:deprecation"/>
</javac2>
</target>

<target name="package" depends="compile"
description="generate the distribution">
<mkdir dir="${build}/META-INF"/>

<copy file="META-INF/plugin.xml" todir="${build}/META-INF/plugin.xml"/>

<!-- Create the distribution archive -->
<jar jarfile="${dist}/${parser.plugin.name}.jar" update="false">
<fileset dir="${main-resources}" includes="**/*.*" excludes="**/*.htm"/>
<fileset dir="${build}" includes="**/*.*"/>
<fileset dir="${main-src}" excludes="**/*.java"/>
<fileset dir="${jreformator-src}" excludes="**/*.java"/>
<fileset dir="${idea-support-src}" excludes="**/*.java"/>
<fileset dir="${idea-errorreporting-client-src}" excludes="**/*.java"/>
<fileset dir="${als-java-toolkit-src}" excludes="**/*.java"/>
</jar>

</target>

<target name="clean" description="clean up">
<delete dir="${build}"/>
<delete file="${dist}/${parser.plugin.name}.jar"/>
</target>

</project>

0 comments on commit 9ecbfdf

Please sign in to comment.