Skip to content

Commit 4313b01

Browse files
pdavidczglueck
authored andcommitted
Update the project to Android Studio 3 (#187)
* Updated the project to Android Studio 3 - Updated Gradle to version 4.1 - Updated the Android Plugin for Gradle to version 3.0.1 - Updated gradle.properties to use the new Android Studio defaults - Removed obsolete android.buildToolsVersion Gradle properties https://developer.android.com/studio/releases/gradle-plugin.html#3-0-0 * Removed Android SDK build tools from Travis CI configuration * Restored Android SDK build tools to Travis CI configuration * Corrected and updated WorldWind module dependencies - Moved the WorldWind library module to API level 23, the intended target API level for WorldWind - Updated the Android Support Libraries to the latest versions - Updated the WorldWind Examples and Tutorials modules to API level 24, the minimum level required for the Android features used - Updated the WorldWind Examples module to retrieve the latest Mission Command symbology renderer from JCenter, rather than a stale local copy * Corrected the WorldWind Examples and Tutorials modules API level * Added support for Java 8 language features https://developer.android.com/studio/write/java8-support.html
1 parent eb8771a commit 4313b01

File tree

9 files changed

+40
-41
lines changed

9 files changed

+40
-41
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ android:
1313
components:
1414
- platform-tools # latest SDK platform-tools
1515
- tools # latest SDK tools
16-
- android-24 # SDK version used to compile the project
17-
- build-tools-26.0.1 # build tools used by the project
16+
- android-23 # SDK version used to compile the project
17+
- build-tools-26.0.2 # minimum build tools required by Android Gradle plugin 3.0.1
1818
- extra-android-support
1919
- extra-android-m2repository
2020

WorldWindAndroid.iml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</configuration>
99
</facet>
1010
</component>
11-
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="true">
11+
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="true">
1212
<content url="file://$MODULE_DIR$">
1313
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
1414
</content>

build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@
22

33
buildscript {
44
repositories {
5+
google()
56
jcenter()
67
}
78
dependencies {
8-
classpath 'com.android.tools.build:gradle:2.3.3'
9-
9+
classpath 'com.android.tools.build:gradle:3.0.1'
1010
// NOTE: Do not place your application dependencies here; they belong
1111
// in the individual module build.gradle files
1212
}
1313
}
1414

1515
allprojects {
1616
repositories {
17+
google()
1718
jcenter()
1819
}
1920
}

gradle.properties

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@
55
# any settings specified in this file.
66

77
# For more details on how to configure your build environment visit
8-
# https://www.gradle.org/docs/current/userguide/build_environment.html
8+
# http://www.gradle.org/docs/current/userguide/build_environment.html
99

1010
# Specifies the JVM arguments used for the daemon process.
1111
# The setting is particularly useful for tweaking memory settings.
12-
# Default value: -Xmx10248m -XX:MaxPermSize=256m
13-
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
12+
org.gradle.jvmargs=-Xmx1536m
1413

1514
# When configured, Gradle will run in incubating parallel mode.
1615
# This option should only be used with decoupled projects. More details, visit
17-
# https://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18-
# org.gradle.parallel=true
16+
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17+
# org.gradle.parallel=true
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Fri Mar 03 16:11:43 PST 2017
1+
#Fri Dec 08 14:12:43 PST 2017
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip

worldwind-examples/build.gradle

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 24
5-
buildToolsVersion '26.0.1'
4+
compileSdkVersion 23
65
defaultConfig {
76
applicationId 'gov.nasa.worldwindx.examples'
8-
minSdkVersion 16
9-
targetSdkVersion 24
7+
minSdkVersion 23
8+
targetSdkVersion 23
109
versionCode 10
1110
versionName '0.8.0-SNAPSHOT'
1211
}
@@ -22,18 +21,15 @@ android {
2221
abortOnError false
2322
disable 'GradleDependency'
2423
}
25-
}
26-
27-
repositories {
28-
flatDir dirs: 'libs'
24+
compileOptions {
25+
sourceCompatibility JavaVersion.VERSION_1_8
26+
targetCompatibility JavaVersion.VERSION_1_8
27+
}
2928
}
3029

3130
dependencies {
32-
compile fileTree(include: ['*.jar'], dir: 'libs')
3331
compile project(':worldwind')
34-
compile 'mil-sym-android:renderer:0.1.2@aar'
35-
//maven-like dependency from flatDir repo; alternative: compile(name: 'renderer', ext: 'aar')
36-
compile 'com.android.support:appcompat-v7:24.2.1'
37-
compile 'com.android.support:design:24.2.1'
38-
testCompile 'junit:junit:4.12'
32+
compile 'com.android.support:appcompat-v7:23.4.0'
33+
compile 'com.android.support:design:23.4.0'
34+
compile 'mil.army.missioncommand:mil-sym-android-renderer:0.1.36'
3935
}

worldwind-examples/libs/renderer.aar

-1.26 MB
Binary file not shown.

worldwind-tutorials/build.gradle

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 24
5-
buildToolsVersion '26.0.1'
4+
compileSdkVersion 23
65
defaultConfig {
76
applicationId 'gov.nasa.worldwindx.tutorials'
8-
minSdkVersion 16
9-
targetSdkVersion 24
7+
minSdkVersion 23
8+
targetSdkVersion 23
109
versionCode 10
1110
versionName '0.8.0-SNAPSHOT'
1211
}
@@ -22,12 +21,14 @@ android {
2221
abortOnError false
2322
disable 'GradleDependency'
2423
}
24+
compileOptions {
25+
sourceCompatibility JavaVersion.VERSION_1_8
26+
targetCompatibility JavaVersion.VERSION_1_8
27+
}
2528
}
2629

2730
dependencies {
28-
compile fileTree(include: ['*.jar'], dir: 'libs')
2931
compile project(':worldwind')
30-
testCompile 'junit:junit:4.12'
31-
compile 'com.android.support:appcompat-v7:24.2.1'
32-
compile 'com.android.support:design:24.2.1'
32+
compile 'com.android.support:appcompat-v7:23.4.0'
33+
compile 'com.android.support:design:23.4.0'
3334
}

worldwind/build.gradle

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,10 @@ apply plugin: 'maven-publish'
1414
apply plugin: 'com.jfrog.artifactory'
1515

1616
android {
17-
compileSdkVersion 24
18-
buildToolsVersion '26.0.1'
19-
17+
compileSdkVersion 23
2018
defaultConfig {
2119
minSdkVersion 16
22-
targetSdkVersion 24
20+
targetSdkVersion 23
2321
versionCode 10
2422
versionName '0.8.0-SNAPSHOT'
2523
testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
@@ -42,12 +40,14 @@ android {
4240
abortOnError false
4341
disable 'GradleDependency'
4442
}
43+
compileOptions {
44+
sourceCompatibility JavaVersion.VERSION_1_8
45+
targetCompatibility JavaVersion.VERSION_1_8
46+
}
4547
}
4648

4749
dependencies {
48-
compile 'com.android.support:support-annotations:24.+'
49-
androidTestCompile 'com.android.support.test:runner:0.5'
50-
androidTestCompile 'com.android.support.test:rules:0.5'
50+
compile 'com.android.support:support-annotations:27.0.2'
5151
testCompile 'junit:junit:4.12'
5252
testCompile 'org.mockito:mockito-core:2.0.43-beta'
5353
// PowerMockito is required to mock static methods like Logger.log
@@ -59,6 +59,8 @@ dependencies {
5959
exclude module: 'hamcrest-core'
6060
exclude module: 'objenesis'
6161
}
62+
androidTestCompile 'com.android.support.test:runner:1.0.1'
63+
androidTestCompile 'com.android.support.test:rules:1.0.1'
6264
}
6365

6466
publishing {

0 commit comments

Comments
 (0)