-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
116 lines (109 loc) · 6.59 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
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
<?xml version="1.0"?>
<project name="Kilamea" basedir="." default="all">
<!-- Define properties -->
<property environment="env"/>
<property name="kotlin.compile" value="${env.KOTLIN_COMPILE}"/>
<property name="jar.file" value="Kilamea.jar"/>
<property name="temp.file" value="temp.jar"/>
<property name="main.class" value="com.github.kilamea.Launcher"/>
<property name="class.path.entry" value="lib/commons-lang3.jar lib/google-api-client.jar lib/google-api-services-gmail.jar lib/google-http-client.jar lib/google-http-client-jackson2.jar lib/google-oauth-client.jar lib/google-oauth-client-java6.jar lib/google-oauth-client-jetty.jar lib/gson.jar lib/jackson-core.jar lib/javax.mail.jar lib/javax.servlet.jar lib/jetty.jar lib/jetty-util.jar lib/liquibase-core.jar lib/org.eclipse.core.commands.jar lib/org.eclipse.equinox.common.jar lib/org.eclipse.jface.jar lib/org.eclipse.osgi.jar lib/sqlite-jdbc.jar lib/swt-win32-win32-x86_64.jar"/>
<!-- Define target to replace spaces with semicolons in class path -->
<target name="replaceSpaces">
<script language="javascript">
<![CDATA[
var classPath = project.getProperty("class.path.entry");
var modifiedClassPath = classPath.replace(/ /g, ";");
project.setProperty("lib.files", modifiedClassPath);
]]>
</script>
</target>
<!-- Define target to clean -->
<target name="clean">
<delete file="${jar.file}"/>
<delete file="${temp.file}"/>
</target>
<!-- Define target to compile Kotlin files -->
<target name="compile" depends="replaceSpaces,clean">
<exec executable="${kotlin.compile}">
<arg value="-cp"/>
<arg value='"${lib.files}"'/>
<arg value="src/com/github/kilamea/Launcher.kt"/>
<arg value="src/com/github/kilamea/core/Bag.kt"/>
<arg value="src/com/github/kilamea/core/Constants.kt"/>
<arg value="src/com/github/kilamea/core/Context.kt"/>
<arg value="src/com/github/kilamea/core/Options.kt"/>
<arg value="src/com/github/kilamea/database/DatabaseManager.kt"/>
<arg value="src/com/github/kilamea/database/DBRuntimeException.kt"/>
<arg value="src/com/github/kilamea/entity/AbstractEntity.kt"/>
<arg value="src/com/github/kilamea/entity/Account.kt"/>
<arg value="src/com/github/kilamea/entity/AccountList.kt"/>
<arg value="src/com/github/kilamea/entity/Attachment.kt"/>
<arg value="src/com/github/kilamea/entity/AttachmentList.kt"/>
<arg value="src/com/github/kilamea/entity/Contact.kt"/>
<arg value="src/com/github/kilamea/entity/ContactList.kt"/>
<arg value="src/com/github/kilamea/entity/Folder.kt"/>
<arg value="src/com/github/kilamea/entity/FolderList.kt"/>
<arg value="src/com/github/kilamea/entity/FolderType.kt"/>
<arg value="src/com/github/kilamea/entity/ListFilter.kt"/>
<arg value="src/com/github/kilamea/entity/Message.kt"/>
<arg value="src/com/github/kilamea/entity/MessageList.kt"/>
<arg value="src/com/github/kilamea/i18n/I18n.kt"/>
<arg value="src/com/github/kilamea/i18n/Language.kt"/>
<arg value="src/com/github/kilamea/mail/AttachmentConverter.kt"/>
<arg value="src/com/github/kilamea/mail/AuthException.kt"/>
<arg value="src/com/github/kilamea/mail/ClientBuilder.kt"/>
<arg value="src/com/github/kilamea/mail/DefaultClient.kt"/>
<arg value="src/com/github/kilamea/mail/GmailClient.kt"/>
<arg value="src/com/github/kilamea/mail/MailMapper.kt"/>
<arg value="src/com/github/kilamea/mail/MailProtocol.kt"/>
<arg value="src/com/github/kilamea/mail/MimeType.kt"/>
<arg value="src/com/github/kilamea/mail/ReceiveException.kt"/>
<arg value="src/com/github/kilamea/mail/SendException.kt"/>
<arg value="src/com/github/kilamea/sort/ComparatorPool.kt"/>
<arg value="src/com/github/kilamea/sort/FieldComparator.kt"/>
<arg value="src/com/github/kilamea/sort/SortField.kt"/>
<arg value="src/com/github/kilamea/sort/SortOrder.kt"/>
<arg value="src/com/github/kilamea/swt/CocoaUIEnhancer.kt"/>
<arg value="src/com/github/kilamea/swt/Dimension.kt"/>
<arg value="src/com/github/kilamea/swt/FileChooser.kt"/>
<arg value="src/com/github/kilamea/swt/MessageDialog.kt"/>
<arg value="src/com/github/kilamea/swt/ModalDialog.kt"/>
<arg value="src/com/github/kilamea/swt/NumberValidator.kt"/>
<arg value="src/com/github/kilamea/swt/TabTraverse.kt"/>
<arg value="src/com/github/kilamea/util/FileUtils.kt"/>
<arg value="src/com/github/kilamea/util/PasswordCrypt.kt"/>
<arg value="src/com/github/kilamea/util/StringExtensions.kt"/>
<arg value="src/com/github/kilamea/util/SystemUtils.kt"/>
<arg value="src/com/github/kilamea/view/AccountDialog.kt"/>
<arg value="src/com/github/kilamea/view/ComposeDialog.kt"/>
<arg value="src/com/github/kilamea/view/ContactDialog.kt"/>
<arg value="src/com/github/kilamea/view/FolderDialog.kt"/>
<arg value="src/com/github/kilamea/view/IFormValidator.kt"/>
<arg value="src/com/github/kilamea/view/Kilamea.kt"/>
<arg value="src/com/github/kilamea/view/MailboxViewerContentProvider.kt"/>
<arg value="src/com/github/kilamea/view/MenuFactory.kt"/>
<arg value="src/com/github/kilamea/view/OptionDialog.kt"/>
<arg value="src/com/github/kilamea/view/SearchDialog.kt"/>
<arg value="src/com/github/kilamea/view/SourceDialog.kt"/>
<arg value="src/com/github/kilamea/view/TreeDialog.kt"/>
<arg value="-include-runtime"/>
<arg value="-d"/>
<arg value="${temp.file}"/>
</exec>
</target>
<!-- Define target to update JAR file -->
<target name="updateJar" depends="compile">
<jar jarfile="${jar.file}">
<zipfileset src="${temp.file}"/>
<fileset dir="res"/>
<manifest>
<attribute name="Main-Class" value="${main.class}"/>
<attribute name="Class-Path" value="${class.path.entry}"/>
</manifest>
</jar>
</target>
<!-- Define target "all" to run replaceSpaces, clean, compile, and updateJar targets -->
<target name="all" depends="updateJar">
<echo message="All tasks completed"/>
</target>
</project>