From b331309c66d399918f7b293ceb6c3533ad24af88 Mon Sep 17 00:00:00 2001 From: Marvin W Date: Mon, 1 Jan 2018 18:38:36 +0100 Subject: [PATCH] Update gradle, build tools, deps, fix/suppress warnings --- .travis.yml | 18 +++++------------- build.gradle | 11 +++++++---- extern/MicroGUiTools | 2 +- extern/UnifiedNlpApi | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- unifiednlp-app/build.gradle | 10 ++++++++-- unifiednlp-app/src/main/AndroidManifest.xml | 6 +++++- unifiednlp-base/build.gradle | 12 ++++++++---- .../nlp/location/AbstractLocationService.java | 1 + .../microg/nlp/ui/SettingInjectorService.java | 2 ++ .../java/android/location/LocationManager.java | 1 + 11 files changed, 40 insertions(+), 27 deletions(-) diff --git a/.travis.yml b/.travis.yml index 294ee5c..1666a71 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,26 +1,18 @@ language: android sudo: false -git: - submodules: false -before_install: - - git submodule update --init --recursive before_script: - echo sdk.dir $ANDROID_HOME > local.properties script: - jdk_switcher use oraclejdk8 - export TERM=dumb - - export JAVA_OPTS="-XX:MaxPermSize=1024m -XX:+CMSClassUnloadingEnabled -XX:+HeapDumpOnOutOfMemoryError -Xmx2048m" + - export JAVA_OPTS="-XX:+CMSClassUnloadingEnabled -XX:+HeapDumpOnOutOfMemoryError -Xmx2048m" - ./gradlew build android: components: - tools - platform-tools - - build-tools-25.0.2 - - android-25 + - build-tools-27.0.3 + - android-27 - extra-android-m2repository -before_cache: - - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock -cache: - directories: - - $HOME/.gradle/caches/ - - $HOME/.gradle/wrapper/ +before_install: + - yes | sdkmanager "platforms;android-27" diff --git a/build.gradle b/build.gradle index d9e083c..2e22fb5 100644 --- a/build.gradle +++ b/build.gradle @@ -17,26 +17,29 @@ buildscript { repositories { jcenter() + google() } dependencies { - classpath 'com.android.tools.build:gradle:2.3.1' + classpath 'com.android.tools.build:gradle:3.0.1' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1' } } allprojects { apply plugin: 'idea' - ext.androidBuildVersionTools = "25.0.2" + ext.androidBuildVersionTools = "27.0.3" + ext.supportLibraryVersion = "27.0.2" } -def androidCompileSdk() { return 25 } +def androidCompileSdk() { return 27 } -def androidTargetSdk() { return 23 } +def androidTargetSdk() { return 27 } def androidMinSdk() { return 9 } subprojects { repositories { jcenter() + maven { url "https://maven.google.com" } } } diff --git a/extern/MicroGUiTools b/extern/MicroGUiTools index 2ae6aa2..0dedff9 160000 --- a/extern/MicroGUiTools +++ b/extern/MicroGUiTools @@ -1 +1 @@ -Subproject commit 2ae6aa2b492f92ef101cbf82fb81e36b8002a6c2 +Subproject commit 0dedff974617604b61e78c22bd57a8f1b5b14512 diff --git a/extern/UnifiedNlpApi b/extern/UnifiedNlpApi index 85e7869..59b6741 160000 --- a/extern/UnifiedNlpApi +++ b/extern/UnifiedNlpApi @@ -1 +1 @@ -Subproject commit 85e786947af84a581ea97bc02af3583f1b0747ad +Subproject commit 59b6741166571bfcaf64e5feec7469190c7852aa diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f766b3e..f5c485b 100755 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-all.zip diff --git a/unifiednlp-app/build.gradle b/unifiednlp-app/build.gradle index e07ba44..f82a821 100644 --- a/unifiednlp-app/build.gradle +++ b/unifiednlp-app/build.gradle @@ -53,16 +53,21 @@ android { targetSdkVersion androidTargetSdk() } + flavorDimensions 'tier' + productFlavors { NetworkLocation { applicationId = 'com.google.android.gms' minSdkVersion 19 + dimension 'tier' } LegacyNetworkLocation { applicationId = 'com.google.android.location' + dimension 'tier' } UnifiedNlp { applicationId = 'org.microg.nlp' + dimension 'tier' } } @@ -71,12 +76,13 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_6 + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 } } dependencies { - compile project(':unifiednlp-base') + implementation project(':unifiednlp-base') } if (file('user.gradle').exists()) { diff --git a/unifiednlp-app/src/main/AndroidManifest.xml b/unifiednlp-app/src/main/AndroidManifest.xml index b3da17b..6da019f 100644 --- a/unifiednlp-app/src/main/AndroidManifest.xml +++ b/unifiednlp-app/src/main/AndroidManifest.xml @@ -15,7 +15,11 @@ --> + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools"> + + +