This repository has been archived by the owner on May 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathbuild.xml
34 lines (30 loc) · 1.57 KB
/
build.xml
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
<project name="editorconfig plugin" default="build">
<property name="project.home" value="${basedir}"/>
<property name="out.dir" value="${project.home}/out"/>
<property name="core.dir" value="${project.home}/../editorconfig-core-java"/>
<property name="idea.jar" value="${project.home}/idea.jar"/>
<target name="clean">
<delete dir="${out.dir}/classes" failonerror="false"/>
<delete dir="${out.dir}/zip" failonerror="false"/>
</target>
<target name="build-core">
<ant antfile="${core.dir}/build.xml" target="build" dir="${core.dir}"/>
<copy file="${core.dir}/lib/editorconfig-core-java.jar" todir="${out.dir}/zip/editorconfig-jetbrains/lib/" />
</target>
<target name="build" depends="clean,build-core">
<mkdir dir="${out.dir}/classes"/>
<mkdir dir="${out.dir}/zip/editorconfig-jetbrains/lib"/>
<javac srcdir="${project.home}/src" destdir="${out.dir}/classes">
<classpath>
<pathelement location="${idea.jar}" />
<pathelement location="${out.dir}/zip/editorconfig-jetbrains/lib/editorconfig-core-java.jar" />
</classpath>
</javac>
<mkdir dir="${out.dir}/classes/META-INF"/>
<copy todir="${out.dir}/classes/META-INF">
<fileset file="${project.home}/META-INF/plugin.xml"/>
</copy>
<jar basedir="${out.dir}/classes" jarfile="${out.dir}/zip/editorconfig-jetbrains/lib/editorconfig-jetbrains.jar" />
<zip file="${out.dir}/editorconfig-jetbrains.zip" basedir="${out.dir}/zip/"/>
</target>
</project>