Skip to content

Commit dc63ddc

Browse files
authored
Merge pull request #44 from wcmatthysen/gradle-improvements
Gradle improvements
2 parents a840f19 + 92e4fa5 commit dc63ddc

File tree

13 files changed

+92
-253
lines changed

13 files changed

+92
-253
lines changed

.gitignore

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
11
.DS_Store
22

33
.idea/shelf
4-
54
.idea/tasks.xml
6-
75
.idea/workspace.xml
86

97
build
10-
118
classes
12-
139
testClasses
1410

1511
worldwind.jar
16-
1712
worldwindx.jar
1813

19-
/nbproject/private/
20-
14+
gradle
15+
gradlew
16+
gradlew.bat
2117
.gradle
22-
/bin/
18+
.nb-gradle

.travis.yml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,35 @@ language: java
99
jdk:
1010
- openjdk8
1111
- openjdk11
12+
- openjdk12
1213
- oraclejdk8
1314
- oraclejdk11
1415
- openjdk-ea
15-
16+
17+
before_cache:
18+
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
19+
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
20+
21+
cache:
22+
directories:
23+
- $HOME/.gradle/caches/
24+
- $HOME/.gradle/wrapper/
25+
1626
# Don't fail the build on the early access JDK, or wait for it to finish before marking it done.
1727
matrix:
1828
fast_finish: true
1929
allow_failures:
20-
- jdk: openjdk-ea
30+
- jdk: openjdk-ea
2131

22-
# Install the Ant JUnit package, which is missing from the Travis CI environment. See the Travis documentation: https://docs.travis-ci.com/user/installing-dependencies/#Adding-APT-Packages
23-
addons:
24-
apt:
25-
packages:
26-
- ant-optional
32+
# Install gradle wrapper based on version defined in wrapper.gradle
33+
before_install:
34+
# Use Java 8 to install the wrapper as this command will fail in Java 11.
35+
- JAVA_HOME=`jdk_switcher home openjdk8` gradle -b wrapper.gradle wrapper
2736

28-
# Custom install script to force using ant instead of gradle if travis detects a build.gradle file.
37+
# Clean up project before running build script.
2938
install:
3039
# Using clean as dummy target; could install dependencies here if needed.
31-
- ant clean
40+
- ./gradlew clean
3241

3342
# Use xvfb to run tests that require a GUI and give it some time to start
3443
before_script:
@@ -38,14 +47,14 @@ before_script:
3847

3948
# Build the project
4049
script:
41-
- ant build
50+
- ./gradlew build javadoc
4251

4352
# Deploy develop branch javadocs to gh_pages, and create and deploy CHANGELOG.md on tags
4453
deploy:
4554
# Publish API documentation to GitHub Pages
4655
- provider: pages
4756
github_token: $GITHUB_API_KEY
48-
local_dir: build/doc/javadoc
57+
local_dir: build/docs/javadoc
4958
skip_cleanup: true
5059
on:
5160
branch: develop

build.gradle

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apply plugin: 'java'
22

3-
group = 'gov.nasa'
3+
group = 'earth.worldwind'
44
version = '2.2.0'
55

66
sourceCompatibility = '1.8'
@@ -33,6 +33,11 @@ sourceSets {
3333
main {
3434
java {
3535
srcDirs = ['src']
36+
include '**/*.java'
37+
}
38+
resources {
39+
srcDirs = ['src']
40+
exclude '**/*.java'
3641
}
3742
}
3843
test {
@@ -43,7 +48,7 @@ sourceSets {
4348
}
4449

4550
compileJava {
46-
options.debug = project.hasProperty("debugBuild") ? "${project.debugBuild}".toBoolean() : false
51+
options.debug = !project.hasProperty("releaseBuild")
4752
}
4853

4954
// Compile worldwind jar.
@@ -52,11 +57,6 @@ jar {
5257
version = null
5358
from sourceSets.main.output
5459
exclude 'gov/nasa/worldwindx/**'
55-
from(sourceSets.main.allSource) {
56-
include 'gov/nasa/worldwind/util/**/*.properties'
57-
include 'config/**'
58-
include 'images/**'
59-
}
6060
}
6161
// Copy worldwind jar to project-directory.
6262
jar.doLast {
@@ -70,19 +70,13 @@ jar.doLast {
7070
task extensionsJar(type: Jar) {
7171
group = 'build'
7272
description = 'Assembles a jar archive containing the extension classes.'
73-
archiveBaseName = 'worldwindx'
73+
baseName = 'worldwindx'
7474
version = null
75-
from sourceSets.main.output
76-
include 'gov/nasa/worldwindx/**/*.class'
77-
from(sourceSets.main.allSource) {
78-
include 'gov/nasa/worldwindx/applications/sar/*.html'
79-
include 'gov/nasa/worldwindx/applications/sar/config/**'
80-
include 'gov/nasa/worldwindx/applications/sar/data/**'
81-
include 'gov/nasa/worldwindx/applications/sar/images/**'
82-
include 'gov/nasa/worldwindx/applications/worldwindow/config/**'
83-
include 'gov/nasa/worldwindx/applications/worldwindow/images/**'
84-
include 'gov/nasa/worldwindx/examples/data/**'
85-
include 'gov/nasa/worldwindx/examples/images/**'
75+
from (sourceSets.main.output) {
76+
exclude 'com/**'
77+
exclude 'config/**'
78+
exclude 'images/**'
79+
exclude 'gov/nasa/worldwind/**'
8680
}
8781
}
8882
// Copy worldwindx jar to project-directory.
@@ -116,4 +110,4 @@ javadoc {
116110
}
117111
exclude 'com/**'
118112
exclude 'gov/nasa/worldwind/formats/**'
119-
}
113+
}

nbproject/ide-file-targets.xml

Lines changed: 0 additions & 15 deletions
This file was deleted.

nbproject/ide-targets.xml

Lines changed: 0 additions & 15 deletions
This file was deleted.

nbproject/project.properties

Lines changed: 0 additions & 7 deletions
This file was deleted.

nbproject/project.xml

Lines changed: 0 additions & 138 deletions
This file was deleted.

0 commit comments

Comments
 (0)