aboutsummaryrefslogtreecommitdiff
path: root/jniwrap
diff options
context:
space:
mode:
authorMartin Desruisseaux <martin.desruisseaux@geomatys.com>2018-05-02 14:41:02 +0200
committerMartin Desruisseaux <martin.desruisseaux@geomatys.com>2018-05-02 16:00:51 +0200
commit88d848423fcdc309629e60b19ad531108c23c1cc (patch)
tree8df623c7d8582141f9ef3183d87f43733defff01 /jniwrap
parent7452e0ce1c40a09e6aedddf64d81dd124fa4609a (diff)
downloadPROJ-88d848423fcdc309629e60b19ad531108c23c1cc.tar.gz
PROJ-88d848423fcdc309629e60b19ad531108c23c1cc.zip
Modularize the Proj Java package:
- Move the jniwrap/org/ directory into the jniwrap/org.osgeo.proj/ sub-directory ("org.osgeo.proj" is the module). - Add a module-info.java description. - Update the Makefile.am files for referencing the files in their new location. There is no API change at this stage; all moved classes are still the same that previous version.
Diffstat (limited to 'jniwrap')
-rw-r--r--jniwrap/Makefile.am2
-rw-r--r--jniwrap/build.xml21
-rw-r--r--jniwrap/org.osgeo.proj/Makefile.am4
-rw-r--r--jniwrap/org.osgeo.proj/module-info.java29
-rw-r--r--jniwrap/org.osgeo.proj/org/Makefile.am (renamed from jniwrap/org/Makefile.am)0
-rw-r--r--jniwrap/org.osgeo.proj/org/proj4/Makefile.am (renamed from jniwrap/org/proj4/Makefile.am)0
-rw-r--r--jniwrap/org.osgeo.proj/org/proj4/PJ.java (renamed from jniwrap/org/proj4/PJ.java)0
-rw-r--r--jniwrap/org.osgeo.proj/org/proj4/PJException.java (renamed from jniwrap/org/proj4/PJException.java)0
-rw-r--r--jniwrap/org.osgeo.proj/org/proj4/package-info.java (renamed from jniwrap/org/proj4/package-info.java)0
9 files changed, 48 insertions, 8 deletions
diff --git a/jniwrap/Makefile.am b/jniwrap/Makefile.am
index 4a176362..2d33809a 100644
--- a/jniwrap/Makefile.am
+++ b/jniwrap/Makefile.am
@@ -1,6 +1,6 @@
EXTRA_DIST = build.xml README.md
-SUBDIRS = org
+SUBDIRS = org.osgeo.proj
install-data-local:
echo In jniwrap
diff --git a/jniwrap/build.xml b/jniwrap/build.xml
index 9c23c39e..bb9a6081 100644
--- a/jniwrap/build.xml
+++ b/jniwrap/build.xml
@@ -4,11 +4,11 @@
<!-- *******************************************
Set directory paths and versions.
******************************************* -->
- <property name="src-java" value="."/>
- <property name="src-C" value="../src"/>
+ <property name="src" value="."/>
<property name="out" value="out"/>
<property name="classes" value="${out}/classes"/>
<property name="javadoc" value="${out}/apidocs"/>
+ <property name="module" value="org.osgeo.proj"/>
<property name="version" value="5.1"/>
<!-- *******************************************
@@ -18,12 +18,12 @@
<target name="compile">
<mkdir dir="${out}"/>
<mkdir dir="${classes}"/>
- <javac srcdir="${src-java}" destdir="${classes}" encoding="UTF-8" nativeheaderdir="${src-C}"
+ <javac modulesourcepath="${src}" destdir="${classes}" encoding="UTF-8" nativeheaderdir="${src}"
createMissingPackageInfoClass = "false"
includeAntRuntime = "false"
includes = "org/**/*.java"/>
- <jar destfile="${out}/proj.jar" basedir="${classes}" level="9" strict="fail">
+ <jar destfile="${out}/proj.jar" basedir="${classes}/${module}" level="9" strict="fail">
<manifest>
<attribute name="Implementation-Title" value="Proj bridge to Java"/>
<attribute name="Implementation-Version" value="${version}"/>
@@ -37,9 +37,16 @@
Build and create documentation.
********************************************************** -->
<target name="javadoc" depends="compile">
- <javadoc sourcepath="${src-java}" classpath="${classes}" destdir="${javadoc}" encoding="UTF-8"
- noqualifier="all" windowtitle="Proj bridge to Java" author="false" version="true"
- link="http://www.geoapi.org/3.0/javadoc/" additionalparam="-html5"/>
+ <javadoc classpath="${classes}/${module}" destdir="${javadoc}"
+ encoding="UTF-8" noqualifier="all" windowtitle="Proj bridge to Java" author="false" version="true"
+ link="http://www.geoapi.org/3.0/javadoc/" additionalparam="-html5">
+ <sourcefiles>
+ <fileset dir="${src}/${module}">
+ <include name="org/**/*.java"/>
+ <exclude name="module-info.java"/>
+ </fileset>
+ </sourcefiles>
+ </javadoc>
</target>
<!-- *******************************************
diff --git a/jniwrap/org.osgeo.proj/Makefile.am b/jniwrap/org.osgeo.proj/Makefile.am
new file mode 100644
index 00000000..6c02a743
--- /dev/null
+++ b/jniwrap/org.osgeo.proj/Makefile.am
@@ -0,0 +1,4 @@
+EXTRA_DIST = module-info.java
+
+SUBDIRS = org
+
diff --git a/jniwrap/org.osgeo.proj/module-info.java b/jniwrap/org.osgeo.proj/module-info.java
new file mode 100644
index 00000000..8c5739fb
--- /dev/null
+++ b/jniwrap/org.osgeo.proj/module-info.java
@@ -0,0 +1,29 @@
+/******************************************************************************
+ * Project: PROJ.4
+ * Purpose: Java/JNI wrappers for PROJ.4 API.
+ * Author: Martin Desruisseaux
+ *
+ ******************************************************************************
+ * Copyright (c) 2018, Open Geospatial Consortium, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+module org.osgeo.proj {
+ exports org.proj4;
+}
diff --git a/jniwrap/org/Makefile.am b/jniwrap/org.osgeo.proj/org/Makefile.am
index f07adff1..f07adff1 100644
--- a/jniwrap/org/Makefile.am
+++ b/jniwrap/org.osgeo.proj/org/Makefile.am
diff --git a/jniwrap/org/proj4/Makefile.am b/jniwrap/org.osgeo.proj/org/proj4/Makefile.am
index 665fc39d..665fc39d 100644
--- a/jniwrap/org/proj4/Makefile.am
+++ b/jniwrap/org.osgeo.proj/org/proj4/Makefile.am
diff --git a/jniwrap/org/proj4/PJ.java b/jniwrap/org.osgeo.proj/org/proj4/PJ.java
index 27b0f25d..27b0f25d 100644
--- a/jniwrap/org/proj4/PJ.java
+++ b/jniwrap/org.osgeo.proj/org/proj4/PJ.java
diff --git a/jniwrap/org/proj4/PJException.java b/jniwrap/org.osgeo.proj/org/proj4/PJException.java
index 4b465e6a..4b465e6a 100644
--- a/jniwrap/org/proj4/PJException.java
+++ b/jniwrap/org.osgeo.proj/org/proj4/PJException.java
diff --git a/jniwrap/org/proj4/package-info.java b/jniwrap/org.osgeo.proj/org/proj4/package-info.java
index d69fb807..d69fb807 100644
--- a/jniwrap/org/proj4/package-info.java
+++ b/jniwrap/org.osgeo.proj/org/proj4/package-info.java