[34602] | 1 | <?xml version="1.0" encoding="utf-8"?>
|
---|
[34703] | 2 | <project name="javafx" default="dist" basedir="." xmlns:if="ant:if" xmlns:unless="ant:unless">
|
---|
[34602] | 3 | <!-- enter the SVN commit message -->
|
---|
| 4 | <property name="commit.message" value="Commit message"/>
|
---|
| 5 | <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
|
---|
[34623] | 6 | <property name="plugin.main.version" value="14234"/>
|
---|
[34602] | 7 |
|
---|
[34703] | 8 | <!-- Configure these properties (replace "..." accordingly).
|
---|
[34602] | 9 | See https://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins
|
---|
| 10 | -->
|
---|
| 11 | <property name="plugin.author" value="Don-vip"/>
|
---|
[34703] | 12 | <property name="plugin.class.windows" value="org.openstreetmap.josm.plugins.javafx.JavaFxPluginWindows"/>
|
---|
| 13 | <property name="plugin.class.unixoid" value="org.openstreetmap.josm.plugins.javafx.JavaFxPluginUnixoid"/>
|
---|
| 14 | <property name="plugin.class.osx" value="org.openstreetmap.josm.plugins.javafx.JavaFxPluginOsx"/>
|
---|
[34602] | 15 | <property name="plugin.description" value="Provides the OpenJFX (JavaFX) library for JOSM core and other JOSM plugins. Provides additional features such as MP3 audio playback."/>
|
---|
[34729] | 16 | <property name="plugin.minimum.java.version" value="10"/>
|
---|
[34701] | 17 | <property name="plugin.provides" value="javafx"/>
|
---|
[34602] | 18 | <!--<property name="plugin.icon" value="..."/>-->
|
---|
| 19 | <!--<property name="plugin.link" value="..."/>-->
|
---|
| 20 | <property name="plugin.early" value="true"/>
|
---|
| 21 | <!--<property name="plugin.requires" value="..."/>-->
|
---|
| 22 | <property name="plugin.stage" value="5"/>
|
---|
| 23 |
|
---|
[34713] | 24 | <condition property="isWindows"><os family="Windows"/></condition>
|
---|
| 25 | <condition property="isUnix"><os family="Unix"/></condition>
|
---|
| 26 | <condition property="isMac"><os family="Mac"/></condition>
|
---|
| 27 | <property name="plugin.dist.dir" location="../../dist"/>
|
---|
| 28 | <property name="plugin.jar" location="${plugin.dist.dir}/${ant.project.name}-windows.jar" if:set="isWindows"/>
|
---|
| 29 | <property name="plugin.jar" location="${plugin.dist.dir}/${ant.project.name}-osx.jar" if:set="isMac"/>
|
---|
| 30 | <property name="plugin.jar" location="${plugin.dist.dir}/${ant.project.name}-unixoid.jar" if:set="isUnix"/>
|
---|
| 31 |
|
---|
| 32 | <!-- ** include targets that all plugins have in common ** -->
|
---|
[34602] | 33 | <import file="../build-common.xml"/>
|
---|
| 34 |
|
---|
[34703] | 35 | <target name="pre-compile" depends="fetch_dependencies">
|
---|
| 36 | <!-- include fetch_dependencies task -->
|
---|
| 37 | </target>
|
---|
[34623] | 38 |
|
---|
[34703] | 39 | <macrodef name="build-native-manifest">
|
---|
| 40 | <attribute name="class"/>
|
---|
| 41 | <attribute name="manifest"/>
|
---|
| 42 | <attribute name="platform"/>
|
---|
| 43 | <sequential>
|
---|
| 44 | <copy file="MANIFEST" tofile="@{manifest}" />
|
---|
| 45 | <manifest file="@{manifest}" mode="update">
|
---|
[34705] | 46 | <attribute name="Plugin-Class" value="@{class}" />
|
---|
[34703] | 47 | <attribute name="Plugin-Platform" value="@{platform}" />
|
---|
| 48 | </manifest>
|
---|
| 49 | </sequential>
|
---|
| 50 | </macrodef>
|
---|
| 51 |
|
---|
| 52 | <target name="additional-manifest">
|
---|
| 53 | <build-native-manifest platform="Windows" class="${plugin.class.windows}" manifest="${manifest.windows}"/>
|
---|
| 54 | <build-native-manifest platform="Unixoid" class="${plugin.class.unixoid}" manifest="${manifest.unixoid}" />
|
---|
| 55 | <build-native-manifest platform="Osx" class="${plugin.class.osx}" manifest="${manifest.osx}" />
|
---|
| 56 | </target>
|
---|
| 57 |
|
---|
| 58 | <macrodef name="build-native-jar">
|
---|
| 59 | <attribute name="jar"/>
|
---|
| 60 | <attribute name="manifest"/>
|
---|
| 61 | <attribute name="qualifier"/>
|
---|
| 62 | <attribute name="copy"/>
|
---|
| 63 | <sequential>
|
---|
| 64 | <echo>Building @{qualifier} jar...</echo>
|
---|
| 65 | <!-- Building the JAR file directly from javafx jar files is awfully slow,
|
---|
| 66 | see https://bz.apache.org/bugzilla/show_bug.cgi?id=43144 -->
|
---|
| 67 | <mkdir dir="${plugin.lib.dir}/@{qualifier}"/>
|
---|
| 68 | <unzip dest="${plugin.lib.dir}/@{qualifier}">
|
---|
| 69 | <patternset>
|
---|
| 70 | <exclude name="META-INF/maven/*"/>
|
---|
| 71 | <exclude name="META-INF/DEPENDENCIES"/>
|
---|
| 72 | <exclude name="META-INF/LICENSE"/>
|
---|
| 73 | <exclude name="META-INF/NOTICE"/>
|
---|
| 74 | <exclude name="META-INF/*.RSA"/>
|
---|
| 75 | <exclude name="META-INF/*.SF"/>
|
---|
| 76 | <exclude name="module-info.class"/>
|
---|
| 77 | </patternset>
|
---|
| 78 | <fileset dir="${plugin.lib.dir}">
|
---|
| 79 | <include name="*-@{qualifier}.jar"/>
|
---|
| 80 | <include name="*-monocle*.jar"/>
|
---|
| 81 | </fileset>
|
---|
| 82 | </unzip>
|
---|
| 83 | <jar destfile="@{jar}" manifest="@{manifest}" manifestencoding="UTF-8" level="9">
|
---|
| 84 | <fileset dir="${plugin.build.dir}"/>
|
---|
| 85 | <fileset dir="${plugin.lib.dir}/@{qualifier}"/>
|
---|
| 86 | </jar>
|
---|
| 87 | <delete dir="${plugin.lib.dir}/@{qualifier}" failonerror="false" />
|
---|
| 88 | </sequential>
|
---|
| 89 | </macrodef>
|
---|
| 90 |
|
---|
[34623] | 91 | <target name="build-jar">
|
---|
[34703] | 92 | <build-native-jar jar="${plugin.unixoid.jar}" manifest="${manifest.unixoid}" qualifier="linux" copy="isUnix" />
|
---|
| 93 | <build-native-jar jar="${plugin.windows.jar}" manifest="${manifest.windows}" qualifier="win" copy="isWindows" />
|
---|
| 94 | <build-native-jar jar="${plugin.osx.jar}" manifest="${manifest.osx}" qualifier="mac" copy="isMac" />
|
---|
[34623] | 95 | </target>
|
---|
[34602] | 96 | </project>
|
---|