Skip to content

Commit

Permalink
Use gradle 4.4 and Android plugin 3.1
Browse files Browse the repository at this point in the history
This would have been quite straight forward however google has decided
to make live difficult by changing the configuration handling in the
plugin, which reuired a hack to still be able to generate a working
classpath for eclipse.
  • Loading branch information
simonpoole committed Apr 27, 2018
1 parent 51c2e53 commit 0c05e00
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 48 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,4 @@ ehthumbs.db
Desktop.ini
$RECYCLE.BIN/
/.gitignore
/.checkstyle
88 changes: 41 additions & 47 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ buildscript {
mavenCentral()
maven { url 'https://dl.bintray.com/content/simonpoole/div' }
maven { url 'https://dl.bintray.com/content/simonpoole/osm' }
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.android.tools.build:gradle:3.1.0'
classpath 'org.kordamp:markdown-gradle-plugin:1.3.0'
classpath 'org.jacoco:org.jacoco.core:0.7.9'
classpath 'org.jacoco:org.jacoco.core:0.8.1'
// classpath 'com.trickyandroid:jacoco-everywhere:0.2.1'
classpath "ch.poole:preset-utils:0.1.2"
}
Expand All @@ -19,7 +20,7 @@ buildscript {
plugins {
id "de.undercouch.download" version "3.1.1"
id "org.sonarqube" version "2.6.1"
id "net.ltgt.apt" version "0.13"
id "net.ltgt.apt" version "0.15"
}
import de.undercouch.gradle.tasks.download.Download

Expand Down Expand Up @@ -137,7 +138,7 @@ updateSynonyms.description = 'Update synonym files from iD editor repo'

afterEvaluate{ // this task needs to be created after the uninstall tasks
task runSingleConnectedTest(dependsOn: ["installDebug","installDebugAndroidTest"], type: Exec) {
def toRun = "de.blau.android.layer.geojson.GeoJSONTest"
def toRun = "de.blau.android.layer.LayerDialogTest"
// commandLine adb, 'shell', 'pm', 'list', 'instrumentation'
commandLine adb, 'shell', 'am', 'instrument', '-w', '-e', 'class', toRun, 'de.blau.android.test/android.support.test.runner.AndroidJUnitRunner'
finalizedBy uninstallDebugAndroidTest,uninstallDebug
Expand All @@ -151,7 +152,7 @@ afterEvaluate{ // this task needs to be created after the uninstall tasks
connectedDebugAndroidTest.dependsOn installDebug
}

apply from: 'https://raw.githubusercontent.com/simonpoole/gradle-tasks/master/eclipse-android'
apply from: 'https://raw.githubusercontent.com/simonpoole/gradle-tasks/master/eclipse-android-3'

sonarqube {
properties {
Expand All @@ -166,7 +167,6 @@ sonarqube {

android {
compileSdkVersion 25
buildToolsVersion "24.0.3"

defaultConfig {
minSdkVersion project.getMinSdkVersion()
Expand Down Expand Up @@ -256,58 +256,52 @@ ext {
}

dependencies {
compile ("ch.acra:acra-http:$acraVersion") {
implementation ("ch.acra:acra-http:$acraVersion") {
exclude group: 'com.android.support'
}
compile ("ch.acra:acra-dialog:$acraVersion") {
implementation ("ch.acra:acra-dialog:$acraVersion") {
exclude group: 'com.android.support'
}
compile "com.android.support:appcompat-v7:$supportLibVersion"
compile "com.android.support:recyclerview-v7:$supportLibVersion"
compile "com.android.support:preference-v7:$supportLibVersion"
compile "com.android.support:design:$supportLibVersion"
compile "com.android.support:support-annotations:$supportLibVersion"
compile "com.nononsenseapps:filepicker:3.0.0"
compile "oauth.signpost:signpost-core:$signpostVersion"
compile 'se.akerfeldt:okhttp-signpost:1.1.0'
compile "com.squareup.okhttp3:okhttp:$okHttpVersion"
compile "com.squareup.okhttp3:logging-interceptor:$okHttpVersion"
compile "com.adobe.xmp:xmpcore:5.1.3"
compile "com.drewnoakes:metadata-extractor:2.10.1"
compile "com.google.code.gson:gson:2.8.1"
compile 'com.faendir.rhino:rhino-android:1.4'
compile 'com.mapbox.mapboxsdk:mapbox-java-services:2.2.9'
compile 'com.pavelsikun:vintage-chroma:1.5'
compile "ch.poole:PoParser:0.7.2"
compile "ch.poole:OpeningHoursParser:0.14.0"
compile "ch.poole:ConditionalRestrictionParser:0.2.2"
compile "ch.poole:OpeningHoursFragment:0.4.1"
compile 'ch.poole.android:numberpicker:1.0.8'
compile 'ch.poole.android:numberpickerpreference:1.0.1'
implementation "com.android.support:appcompat-v7:$supportLibVersion"
implementation "com.android.support:recyclerview-v7:$supportLibVersion"
implementation "com.android.support:preference-v7:$supportLibVersion"
implementation "com.android.support:design:$supportLibVersion"
implementation "com.android.support:support-annotations:$supportLibVersion"
implementation "com.nononsenseapps:filepicker:3.0.0"
implementation "oauth.signpost:signpost-core:$signpostVersion"
implementation 'se.akerfeldt:okhttp-signpost:1.1.0'
implementation "com.squareup.okhttp3:okhttp:$okHttpVersion"
implementation "com.squareup.okhttp3:logging-interceptor:$okHttpVersion"
implementation "com.adobe.xmp:xmpcore:5.1.3"
implementation "com.drewnoakes:metadata-extractor:2.10.1"
implementation "com.google.code.gson:gson:2.8.1"
implementation 'com.faendir.rhino:rhino-android:1.4'
implementation 'com.mapbox.mapboxsdk:mapbox-java-services:2.2.9'
implementation 'com.pavelsikun:vintage-chroma:1.5'
implementation "ch.poole:PoParser:0.7.2"
implementation "ch.poole:OpeningHoursParser:0.14.0"
implementation "ch.poole:ConditionalRestrictionParser:0.2.2"
implementation "ch.poole:OpeningHoursFragment:0.4.1"
implementation 'ch.poole.android:numberpicker:1.0.8'
implementation 'ch.poole.android:numberpickerpreference:1.0.1'
// for temp stuff during dev
// compile(name:'alibrary', ext:'jar')
// implementation(name:'alibrary', ext:'jar')

// Unit tests
testCompile "junit:junit:4.12"
testImplementation "junit:junit:4.12"

// Instrumentation tests
androidTestCompile "com.android.support:support-annotations:$supportLibVersion"
androidTestCompile "com.android.support.test:runner:0.5"
androidTestCompile "com.android.support.test:rules:0.5"
androidTestCompile "org.hamcrest:hamcrest-library:1.3"
androidTestCompile "com.android.support.test.espresso:espresso-core:2.2.2"
androidTestCompile "com.squareup.okhttp3:mockwebserver:$okHttpVersion"
androidTestCompile "pl.droidsonroids.yaml:snakeyaml:1.18.2"
androidTestCompile ("com.orhanobut:mockwebserverplus:1.0.0") {
androidTestImplementation "com.android.support:support-annotations:$supportLibVersion"
androidTestImplementation "com.android.support.test:runner:0.5"
androidTestImplementation "com.android.support.test:rules:0.5"
androidTestImplementation "org.hamcrest:hamcrest-library:1.3"
androidTestImplementation "com.android.support.test.espresso:espresso-core:2.2.2"
androidTestImplementation "com.squareup.okhttp3:mockwebserver:$okHttpVersion"
androidTestImplementation "pl.droidsonroids.yaml:snakeyaml:1.18.2"
androidTestImplementation ("com.orhanobut:mockwebserverplus:1.0.0") {
exclude group: 'org.yaml', module: 'snakeyaml'
}
androidTestCompile "com.android.support.test.uiautomator:uiautomator-v18:2.1.2"
androidTestCompile 'com.android.support.test.espresso:espresso-contrib:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'com.android.support', module: 'design'
exclude group: 'com.android.support', module: 'recyclerview-v7'
}
androidTestImplementation "com.android.support.test.uiautomator:uiautomator-v18:2.1.2"
}


Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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-2.14.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

0 comments on commit 0c05e00

Please sign in to comment.