Skip to content

Commit

Permalink
Gradle 4 and Android plugin 3 improvements #433, fix #436
Browse files Browse the repository at this point in the history
  • Loading branch information
devemux86 committed Oct 30, 2017
1 parent 53dbb73 commit d23bca9
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 230 deletions.
6 changes: 0 additions & 6 deletions vtm-android-example/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@
<activity
android:name=".LocationActivity"
android:configChanges="keyboardHidden|orientation|screenSize" />
<activity
android:name=".MapFragmentActivity"
android:configChanges="keyboardHidden|orientation|screenSize" />
<activity
android:name=".MapPositionActivity"
android:configChanges="keyboardHidden|orientation|screenSize" />
<activity
android:name=".MapsforgeMapActivity"
android:configChanges="keyboardHidden|orientation|screenSize" />
Expand Down
21 changes: 10 additions & 11 deletions vtm-android-example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,23 @@ repositories {
dependencies {
implementation project(':vtm-android')
implementation project(':vtm-http')
implementation(project(':vtm-jeo')) {
exclude group: 'com.vividsolutions', module: 'jts'
}
implementation project(':vtm-jeo')
implementation project(':vtm-json')
implementation project(':vtm-jts')
implementation project(':vtm-themes')
implementation 'com.noveogroup.android:android-logger:1.3.6'
implementation 'com.vividsolutions:jts-core:1.14.0'
implementation('org.jeo:jeo:0-SNAPSHOT') {
exclude group: 'com.vividsolutions', module: 'jts'
exclude group: 'org.slf4j', module: 'slf4j-jdk14'
}
implementation('org.jeo:jeo-render:0-SNAPSHOT') {
exclude group: 'com.vividsolutions', module: 'jts'
exclude group: 'org.slf4j', module: 'slf4j-jdk14'
}
implementation 'com.android.support:support-v4:27.0.0'
implementation "org.slf4j:slf4j-android:$slf4jVersion"

implementation project(':vtm-android-gdx')
implementation project(':vtm-gdx')
implementation "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"

implementation 'org.mapsforge:mapsforge-core:master-SNAPSHOT'
implementation 'org.mapsforge:mapsforge-poi:master-SNAPSHOT'
implementation 'org.mapsforge:mapsforge-poi-android:master-SNAPSHOT'
implementation 'org.mapsforge:spatialite-android:master-SNAPSHOT'
implementation 'org.mapsforge:spatialite-android:master-SNAPSHOT:natives-armeabi'
implementation 'org.mapsforge:spatialite-android:master-SNAPSHOT:natives-armeabi-v7a'
implementation 'org.mapsforge:spatialite-android:master-SNAPSHOT:natives-x86'
Expand Down Expand Up @@ -79,6 +70,14 @@ android {
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
}

buildTypes {
all {
minifyEnabled true
useProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

task run(dependsOn: 'installDebug') {
Expand Down
10 changes: 10 additions & 0 deletions vtm-android-example/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
-keep class com.** { *; }
-dontwarn com.**
-keep class jsqlite.** { *; }
-dontwarn jsqlite.**
-keep class okhttp3.** { *; }
-dontwarn okhttp3.**
-keep class okio.** { *; }
-dontwarn okio.**
-keep class org.** { *; }
-dontwarn org.**
1 change: 0 additions & 1 deletion vtm-android-example/src/android-logger.properties

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions vtm-android-example/src/org/oscim/android/test/Samples.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,12 @@ public void onClick(View v) {
linearLayout.addView(createLabel("User Interaction"));
linearLayout.addView(createButton(NewGesturesActivity.class));
linearLayout.addView(createButton(LayerGroupActivity.class));
linearLayout.addView(createButton(MapFragmentActivity.class));

linearLayout.addView(createLabel("Dual Map Views"));
linearLayout.addView(createButton(MultiMapActivity.class));

linearLayout.addView(createLabel("Experiments"));
linearLayout.addView(createButton(ReverseGeocodeActivity.class));
linearLayout.addView(createButton(MapPositionActivity.class));
linearLayout.addView(createButton(S3DBMapActivity.class));
linearLayout.addView(createButton(ThemeStylerActivity.class));
linearLayout.addView(createButton(JeoIndoorMapActivity.class));
Expand Down
2 changes: 1 addition & 1 deletion vtm-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ dependencies {
implementation project(':vtm-android')
implementation project(':vtm-themes')
implementation project(':vtm-extras')
implementation 'com.noveogroup.android:android-logger:1.3.6'
implementation 'com.squareup.okhttp3:okhttp:3.8.0'
implementation "org.slf4j:slf4j-android:$slf4jVersion"
}

android {
Expand Down
1 change: 0 additions & 1 deletion vtm-app/src/android-logger.properties

This file was deleted.

2 changes: 1 addition & 1 deletion vtm-extras/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ dependencies {
api project(':vtm')
implementation 'com.fasterxml.jackson.core:jackson-core:2.8.4'
implementation 'com.google.protobuf:protobuf-java:2.6.1'
implementation 'com.vividsolutions:jts-core:1.14.0'
implementation 'com.vividsolutions:jts:1.13'
implementation 'org.openstreetmap.osmosis:osmosis-osm-binary:0.45'
implementation "org.slf4j:slf4j-api:$slf4jVersion"
}
Expand Down
2 changes: 1 addition & 1 deletion vtm-jts/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apply plugin: 'maven'

dependencies {
api project(':vtm')
implementation 'com.vividsolutions:jts-core:1.14.0'
implementation 'com.vividsolutions:jts:1.13'
implementation "org.slf4j:slf4j-api:$slf4jVersion"
}

Expand Down
16 changes: 4 additions & 12 deletions vtm-playground/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,15 @@ dependencies {
implementation project(':vtm-desktop')
implementation project(':vtm-extras')
implementation project(':vtm-http')
implementation(project(':vtm-jeo')) {
exclude group: 'com.vividsolutions', module: 'jts'
}
implementation project(':vtm-jeo')
implementation project(':vtm-json')
implementation project(':vtm-jts')
implementation "com.badlogicgames.gdx:gdx:$gdxVersion"
implementation "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
implementation 'com.squareup.okhttp3:okhttp:3.8.0'
implementation('org.jeo:jeo:0-SNAPSHOT') {
exclude group: 'com.vividsolutions', module: 'jts'
exclude group: 'org.slf4j', module: 'slf4j-jdk14'
}
implementation('org.jeo:jeo-render:0-SNAPSHOT') {
exclude group: 'com.vividsolutions', module: 'jts'
exclude group: 'org.slf4j', module: 'slf4j-jdk14'
}
implementation "org.slf4j:slf4j-simple:$slf4jVersion"
implementation 'org.jeo:jeo:0-SNAPSHOT'
implementation 'org.jeo:jeo-render:0-SNAPSHOT'
implementation "org.slf4j:slf4j-jdk14:$slf4jVersion"
}

sourceSets {
Expand Down
2 changes: 1 addition & 1 deletion vtm-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependencies {
testImplementation 'junit:junit:4.12'
testImplementation 'org.easytesting:fest-assert-core:2.0M10'
testImplementation 'org.mockito:mockito-all:1.10.19'
testImplementation "org.slf4j:slf4j-simple:$slf4jVersion"
testImplementation "org.slf4j:slf4j-jdk14:$slf4jVersion"
}

sourceSets {
Expand Down

0 comments on commit d23bca9

Please sign in to comment.