Skip to content

Gradle build-script improvements#66

Merged
wcmatthysen merged 9 commits intoWorldWindEarth:developfrom
wcmatthysen:gradle-improvements
Aug 5, 2019
Merged

Gradle build-script improvements#66
wcmatthysen merged 9 commits intoWorldWindEarth:developfrom
wcmatthysen:gradle-improvements

Conversation

@wcmatthysen
Copy link
Copy Markdown
Member

Description of the Change

Additional changes and fixes to the build.gradle file. In particular we can now build the MilStd2525 symbology zip file as well as launch the layer-manager example via the runLayerManager task. The dependency declarations have been fixed by swapping the "compile" clauses with "implementation" and vice versa (this was incorrectly declared initially). We also now have the ability to build against the system GDAL jar if required.

Why Should This Be In Core?

The build.gradle file is now more complete and covers most of the functionality of the ant build script. We just lack the webstart clauses.

Benefits

More complete gradle build script.

Potential Drawbacks

None

Applicable Issues

None

The JOGL, Gluegen and Jackson dependencies should be declared as
"compile" dependencies, whereas the gdal dependency should be an
implementation dependency. The reason for this is that clients that
depend on WorldWind should receive JOGL, Gluegen and Jackson as
transitive dependencies. On the other hand, they should not receive GDAL
as a transitive dependency due to the fact that GDAL can be included as
a system dependency.
@wcmatthysen
Copy link
Copy Markdown
Member Author

wcmatthysen commented Aug 5, 2019

@gbburkhardt, @Sufaev, I made a couple of fixes to the build.gradle file. Most of the functionality of the ant build scripts have been mirrored except for the Webstart stuff. However, as Webstart is dead we can probably omit it altogether.

Note: to build against the system GDAL you can pass the following parameter when building:

gradle build -PsystemGDAL

I'll have to have a look at whether we can use this parameter during runtime with NetBeans to force it to use the system-based GDAL as dependency when launching one of the main classes.

@wcmatthysen wcmatthysen added the enhancement New feature or request label Aug 5, 2019
Added two new Gradle tasks called processMilStd2525SVGs and
milStd2525Zip respectively. The processMilStd2525SVGs is a replacement
for the compileMilStd2525 ant-task that is present in the build.xml
file and is basically responsible for processing the MilStd2525 SVG
files to produce the corresponding PNG files. The milStd2525Zip task
depends on the output of the processMilStd2525SVGs to produce a final
zip file containing the PNGs.
Modified some ${}-clauses by removing the curly braces as this is not
needed in this file. The doLast lambdas of jar and extensionsJar was
moved to be inside their respective tasks. This organizes the tasks a
bit better in that the tasks contain everything pertaining to their
execution inside their bodies.
Added a new Gradle task called runLayerManager. This task mirrors the
runLayerManager task in the ant build.xml file.
To run the ant runLayerManager task we do not need to setup a GDAL
environment as the runLayerManager task does not use any GDAL
functionality. Thus, a small cleanup was done to this task by removing
the GDAL jars from the classpath as well as removing the GDAL specific
environment variables.
Modified the build.gradle file by adding an entry in the ant-block to
load either the Windows or Linux GDAL properties file based on whether
we are running in Windows or not. The dependencies clause was also
modified by adding a check to see if the "systemGDAL" property was
specified as a property on the command-line during a build. If this was
the case then the GDAL jar on the system will be used during the build,
else the default published one will be used from the maven-central or
jcenter repositories.
We can't run the "sh -e /etc/init.d/xvfb start" command anymore. Instead
we now need to specify that we need the xvfb service.
Travis switched to Xenial which means that oraclejdk8 is no longer
available as an option in the jdk-list. So, to keep up with the latest
changes we need to drop Oracle JDK 8 from our builds.
@wcmatthysen wcmatthysen modified the milestone: WWJ-CE 2.2.0 Aug 5, 2019
@wcmatthysen wcmatthysen merged commit 7344072 into WorldWindEarth:develop Aug 5, 2019
@wcmatthysen wcmatthysen deleted the gradle-improvements branch August 5, 2019 20:57
@wcmatthysen wcmatthysen added this to the WWJ-CE 2.2.0 milestone Aug 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant