Repository navigation
Expand file tree
/
Copy pathbuild.xml
More file actions
135 lines (124 loc) · 4.2 KB
/
Copy pathbuild.xml
File metadata and controls
135 lines (124 loc) · 4.2 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project name="MabiIcco"
basedir="."
default="jar">
<!-- 環境変数 -->
<property environment="env" />
<property name="src" location="src" />
<property name="dest" location="dest" />
<property name="test" location="test" />
<property name="lib" location="lib" />
<property name="out" location="out" />
<property name="properties" location="properties" />
<property name="jardest" location="" />
<path id="classpath">
<pathelement location="${lib}/commons-compress/commons-compress-1.9.jar"/>
</path>
<path id="classpath-test">
<pathelement location="${lib}/junit-4.12.jar"/>
<pathelement location="${lib}/hamcrest-core-1.3.jar"/>
</path>
<!-- アプリケーションの設定 -->
<property name="app.vendor" value="fourthline.jp" />
<property name="app.id" value="MabiIcco" />
<property name="app.name" value="MabiIcco" />
<property name="app.version" value="1.5.12" />
<property name="app.main-class" value="jp.fourthline.mabiicco.MabiIcco" />
<property name="class.path" value="lib/commons-compress/commons-compress-1.9.jar;lib/flatlaf/flatlaf-2.4.jar;lib/jna/jna-5.11.0.jar" />
<!-- clean task -->
<target name="clean">
<mkdir dir="${dest}" />
<delete dir="${dest}" />
<mkdir dir="${dest}" />
</target>
<!-- compile task -->
<target name="compile" depends="clean">
<javac
srcdir="${src}"
destdir="${dest}"
classpath="${class.path}"
excludes="**/package-info.java,com/"
encoding="UTF-8"
listfiles="yes"
includeantruntime="false">
<compilerarg line="--add-exports java.desktop/com.sun.media.sound=ALL-UNNAMED" />
<compilerarg line="--add-exports java.desktop/sun.swing=ALL-UNNAMED" />
</javac>
</target>
<!-- resources task -->
<target name="resources">
<copy todir="${dest}">
<fileset dir="${src}">
<include name="**/*.png" />
</fileset>
</copy>
<copy todir="${dest}/resources">
<fileset dir="properties">
<include name="**/*.properties" />
</fileset>
</copy>
<copy todir="${dest}" file="NOTICE" />
<java classname="jp.fourthline.mmlTools.core.MMLTickTable" classpath="${dest}">
<arg value="${dest}/jp/fourthline/mmlTools/core/tickTable.dat" />
</java>
</target>
<!-- compile-test task -->
<target name="compile-test" depends="clean">
<javac
srcdir="${test}"
destdir="${dest}"
classpathref="classpath-test"
encoding="UTF-8"
listfiles="yes"
includeantruntime="false" />
<copy todir="${dest}">
<fileset dir="${test}">
<include name="**/*.mml" />
<include name="**/*.mms" />
<include name="**/*.mmi" />
<include name="**/*.mid" />
<include name="**/*.txt" />
</fileset>
</copy>
</target>
<!-- test task -->
<target name="test" depends="compile-test">
<junit printsummary="no">
<classpath>
<path refid="classpath"/>
<path refid="classpath-test"/>
<pathelement path="${dest}"/>
</classpath>
<formatter type="xml" />
<batchtest todir="${dest}">
<fileset dir="${test}" includes="**/*Test.java">
<exclude name="jp/fourthline/mabiicco/midi/MabiDLSTest.java"/>
<exclude name="jp/fourthline/mabiicco/ui/MMLSeqViewTest.java"/>
<exclude name="jp/fourthline/mabiicco/ui/MainFrameTest.java"/>
<exclude name="jp/fourthline/mabiicco/ui/editor/KeyboardEditorTest.java"/>
<exclude name="jp/fourthline/mabiicco/ui/editor/MMLEditorTest.java"/>
<exclude name="jp/fourthline/mmlTools/MMLScoreTest.java"/>
<exclude name="jp/fourthline/mmlTools/parser/MMLFileTest.java"/>
<exclude name="jp/fourthline/mmlTools/parser/MMSFileTest.java"/>
<exclude name="jp/fourthline/mmlTools/parser/MidiFileTest.java"/>
</fileset>
</batchtest>
</junit>
</target>
<!-- jar task -->
<target name="jar"
description="jar"
depends="compile,resources">
<jar jarfile="${jardest}/${app.id}.jar">
<fileset dir="${dest}" />
<manifest>
<attribute name="Main-Class" value="${app.main-class}"/>
<attribute name="Implementation-Vendor" value="${app.vendor}" />
<attribute name="Implementation-Title" value="${app.name}" />
<attribute name="MabiIcco-Version" value="${app.version}" />
<attribute name="Class-Path" value="${class.path}" />
</manifest>
</jar>
</target>
<!-- // jar task -->
</project>