source: osm/applications/editors/josm/plugins/javafx/build.xml@ 35005

Last change on this file since 35005 was 34729, checked in by donvip, 6 years ago

fix #josm17008 - make JavaFX plugin work with Java 10

File size: 5.1 KB
Line 
1<?xml version="1.0" encoding="utf-8"?>
2<project name="javafx" default="dist" basedir="." xmlns:if="ant:if" xmlns:unless="ant:unless">
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 -->
6 <property name="plugin.main.version" value="14234"/>
7
8 <!-- Configure these properties (replace "..." accordingly).
9 See https://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins
10 -->
11 <property name="plugin.author" value="Don-vip"/>
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"/>
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."/>
16 <property name="plugin.minimum.java.version" value="10"/>
17 <property name="plugin.provides" value="javafx"/>
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
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 ** -->
33 <import file="../build-common.xml"/>
34
35 <target name="pre-compile" depends="fetch_dependencies">
36 <!-- include fetch_dependencies task -->
37 </target>
38
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">
46 <attribute name="Plugin-Class" value="@{class}" />
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
91 <target name="build-jar">
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" />
95 </target>
96</project>
Note: See TracBrowser for help on using the repository browser.