-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
117 lines (91 loc) · 4.1 KB
/
build.xml
File metadata and controls
117 lines (91 loc) · 4.1 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<?xml version="1.0" encoding="UTF-8"?>
<project name="injector" default="all">
<property file="build.properties"/>
<!-- Load plugin version from plugin.xml. -->
<xmlproperty file="META-INF/plugin.xml" />
<property name="plugin.version" value="${idea-plugin.version}" />
<property name="plugin.jar_name" value="injector" />
<!-- Compiler options -->
<property name="compiler.debug" value="off"/>
<property name="compiler.generate.no.warnings" value="off"/>
<property name="compiler.args" value=""/>
<property name="compiler.max.memory" value="128m"/>
<patternset id="ignored.files">
<exclude name="**/.svn/**"/>
<exclude name="**/.git/**"/>
</patternset>
<patternset id="library.patterns">
<include name="*.jar"/>
</patternset>
<patternset id="compiler.resources">
<include name="**/?*.properties"/>
<include name="**/?*.xml"/>
<include name="**/?*.png"/>
</patternset>
<!-- JDK definitions -->
<property name="jdk.bin" value="${jdk.home}/bin"/>
<path id="jdk.classpath.rubymine">
<fileset dir="${jdk.home}/jre/lib" />
<fileset dir="${plugin.sdk.home}/lib" />
</path>
<!-- Register Custom Compiler Taskdefs -->
<property name="javac2.home" value="${idea.home}/lib"/>
<path id="javac2.classpath">
<pathelement location="${javac2.home}/javac2.jar"/>
<pathelement location="${javac2.home}/jdom.jar"/>
<pathelement location="${javac2.home}/asm.jar"/>
<pathelement location="${javac2.home}/asm-commons.jar"/>
<pathelement location="${javac2.home}/jgoodies-forms.jar"/>
</path>
<target name="register.custom.compilers">
<taskdef name="javac2" classname="com.intellij.ant.Javac2" classpathref="javac2.classpath"/>
<taskdef name="instrumentIdeaExtensions" classname="com.intellij.ant.InstrumentIdeaExtensions"
classpathref="javac2.classpath"/>
</target>
<!-- Modules -->
<property name="output.dir" value="${basedir}/out"/>
<property name="release.dir" value="${basedir}/release"/>
<path id="plugin.sourcepath">
<dirset dir="${basedir}">
<include name="src"/>
</dirset>
</path>
<target name="init" description="Build initialization">
<!-- Perform any build initialization in this target -->
</target>
<target name="compile.plugin" depends="register.custom.compilers"
description="Compile plugin; production classes">
<mkdir dir="${output.dir}"/>
<javac2 destdir="${output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}"
memorymaximumsize="${compiler.max.memory}" fork="true" executable="${jdk.bin}/javac" includeantruntime="false">
<compilerarg line="${compiler.args}"/>
<classpath refid="jdk.classpath.rubymine"/>
<src refid="plugin.sourcepath"/>
<patternset refid="ignored.files"/>
</javac2>
<copy todir="${output.dir}">
<fileset dir="${basedir}/src">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
</copy>
</target>
<!-- Build plugin jar -->
<target name="plugin.build.jar" depends="compile.plugin"
description="Build plugin archive">
<mkdir dir="${release.dir}"/>
<jar destfile="${release.dir}/${ant.project.name}-${plugin.version}/${plugin.jar_name}.jar" duplicate="preserve">
<zipfileset dir="${output.dir}"/>
<zipfileset file="${basedir}/META-INF/plugin.xml" prefix="META-INF"/>
<manifest>
<attribute name="Created-By" value="IntelliJ IDEA"/>
<attribute name="Manifest-Version" value="1.0"/>
</manifest>
</jar>
</target>
<target name="clean" description="cleanup all">
<delete dir="${output.dir}"/>
</target>
<target name="build.plugin" depends="init, clean, plugin.build.jar" description="build plugin"/>
<target name="all" depends="build.plugin" description="build all"/>
</project>