Skip to content

Commit 8f8d4e4

Browse files
committed
Allow for debug-builds.
Modified the build.gradle file to allow for debug-builds. This is accomplished by specifying the property -PdebugBuild=true on the command-line. The dependency-versions was also moved out to the ext property clause and is now referenced in the dependencies block. A group and description was added to the extensionsJar-task so that it correctly falls under the build-group with the correct description when invoking `gradle tasks`.
1 parent df71b21 commit 8f8d4e4

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

build.gradle

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,27 @@ version = '2.2.0'
66
sourceCompatibility = '1.8'
77
targetCompatibility = '1.8'
88

9+
ext {
10+
joglVersion = '2.3.2'
11+
jacksonVersion = '1.9.13'
12+
junitVersion = '4.5'
13+
}
14+
915
repositories {
1016
mavenLocal()
1117
mavenCentral()
1218
jcenter()
1319
}
1420

1521
dependencies {
16-
def joglVersion = '2.3.2'
17-
implementation "org.jogamp.jogl:jogl-all-main:$joglVersion"
18-
implementation "org.jogamp.gluegen:gluegen-rt-main:$joglVersion"
22+
implementation "org.jogamp.jogl:jogl-all-main:${project.joglVersion}"
23+
implementation "org.jogamp.gluegen:gluegen-rt-main:${project.joglVersion}"
1924

20-
implementation files('gdal.jar')
25+
compile files('gdal.jar')
2126

22-
implementation 'org.codehaus.jackson:jackson-core-asl:1.9.13'
27+
implementation "org.codehaus.jackson:jackson-core-asl:${project.jacksonVersion}"
2328

24-
testImplementation 'junit:junit:4.5'
29+
testImplementation "junit:junit:${project.junitVersion}"
2530
}
2631

2732
sourceSets {
@@ -37,6 +42,10 @@ sourceSets {
3742
}
3843
}
3944

45+
compileJava {
46+
options.debug = project.hasProperty("debugBuild") ? "${project.debugBuild}".toBoolean() : false
47+
}
48+
4049
// Compile worldwind jar.
4150
jar {
4251
dependsOn classes
@@ -59,6 +68,8 @@ jar.doLast {
5968

6069
// Compile worldwindx jar.
6170
task extensionsJar(type: Jar) {
71+
group = 'build'
72+
description = 'Assembles a jar archive containing the extension classes.'
6273
archiveBaseName = 'worldwindx'
6374
version = null
6475
from sourceSets.main.output

0 commit comments

Comments
 (0)