Skip to content

Commit 9312416

Browse files
authored
Merge pull request NASAWorldWind#30 from wcmatthysen/gradle
Initial gradle build configuration
2 parents bc54886 + 8f8d4e4 commit 9312416

File tree

3 files changed

+123
-1
lines changed

3 files changed

+123
-1
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,6 @@ worldwind.jar
1616

1717
worldwindx.jar
1818

19-
/nbproject/private/
19+
/nbproject/private/
20+
21+
.gradle

build.gradle

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
apply plugin: 'java'
2+
3+
group = 'gov.nasa'
4+
version = '2.2.0'
5+
6+
sourceCompatibility = '1.8'
7+
targetCompatibility = '1.8'
8+
9+
ext {
10+
joglVersion = '2.3.2'
11+
jacksonVersion = '1.9.13'
12+
junitVersion = '4.5'
13+
}
14+
15+
repositories {
16+
mavenLocal()
17+
mavenCentral()
18+
jcenter()
19+
}
20+
21+
dependencies {
22+
implementation "org.jogamp.jogl:jogl-all-main:${project.joglVersion}"
23+
implementation "org.jogamp.gluegen:gluegen-rt-main:${project.joglVersion}"
24+
25+
compile files('gdal.jar')
26+
27+
implementation "org.codehaus.jackson:jackson-core-asl:${project.jacksonVersion}"
28+
29+
testImplementation "junit:junit:${project.junitVersion}"
30+
}
31+
32+
sourceSets {
33+
main {
34+
java {
35+
srcDirs = ['src']
36+
}
37+
}
38+
test {
39+
java {
40+
srcDirs = ['test']
41+
}
42+
}
43+
}
44+
45+
compileJava {
46+
options.debug = project.hasProperty("debugBuild") ? "${project.debugBuild}".toBoolean() : false
47+
}
48+
49+
// Compile worldwind jar.
50+
jar {
51+
dependsOn classes
52+
version = null
53+
from sourceSets.main.output
54+
exclude 'gov/nasa/worldwindx/**'
55+
from(sourceSets.main.allSource) {
56+
include 'gov/nasa/worldwind/util/**/*.properties'
57+
include 'config/**'
58+
include 'images/**'
59+
}
60+
}
61+
// Copy worldwind jar to project-directory.
62+
jar.doLast {
63+
copy {
64+
from "$buildDir/libs/${jar.archiveName}"
65+
into "${project.projectDir}"
66+
}
67+
}
68+
69+
// Compile worldwindx jar.
70+
task extensionsJar(type: Jar) {
71+
group = 'build'
72+
description = 'Assembles a jar archive containing the extension classes.'
73+
archiveBaseName = 'worldwindx'
74+
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/**'
86+
}
87+
}
88+
// Copy worldwindx jar to project-directory.
89+
extensionsJar.doLast {
90+
copy {
91+
from "$buildDir/libs/${extensionsJar.archiveName}"
92+
into "${project.projectDir}"
93+
}
94+
}
95+
96+
artifacts {
97+
archives extensionsJar
98+
}
99+
100+
test {
101+
dependsOn jar
102+
classpath += project.files("$buildDir/libs/${jar.archiveName}", configurations.runtime)
103+
}
104+
105+
javadoc {
106+
options {
107+
overview = "${project.projectDir}/src/overview.html"
108+
windowTitle = 'WorldWindJava API'
109+
title = 'NASA WorldWind Java-Community Edition'
110+
header = 'NASA WorldWind-CE'
111+
splitIndex = true
112+
noDeprecated = true
113+
version = false
114+
author = false
115+
use = true
116+
}
117+
exclude 'com/**'
118+
exclude 'gov/nasa/worldwind/formats/**'
119+
}

settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rootProject.name = 'worldwind'

0 commit comments

Comments
 (0)