diff --git a/README.md b/README.md
index 8c6698bf..fba53ffc 100644
--- a/README.md
+++ b/README.md
@@ -29,15 +29,16 @@ If you have any questions or problems, don't hesitate to ask our public [mailing
- HTML5/WebGL (using libGDX/GWT, [instructions](docs/web.md))
### Projects
-- **vtm** contains the core library
+- **vtm** core library
- **vtm-android** Android backend
-- **vtm-android-example** provides examples using vtm-android
+- **vtm-android-example** Android examples
- **vtm-gdx** common libGDX backend
-- **vtm-android-gdx** Android backend (with libGDX)
-- **vtm-desktop** Desktop backend
-- **vtm-ios** iOS backend
-- **vtm-ios-example** provides examples using vtm-ios
-- **vtm-web** HTML5/GWT backend
+- **vtm-android-gdx** Android libGDX backend
+- **vtm-desktop** Desktop libGDX backend
+- **vtm-playground** Desktop examples
+- **vtm-ios** iOS libGDX backend
+- **vtm-ios-example** iOS examples
+- **vtm-web** HTML5/GWT libGDX backend
- **vtm-web-app** HTML5/GWT application
## WebGL Demo
diff --git a/deploy.gradle b/deploy.gradle
index 571ac85e..d2d66530 100644
--- a/deploy.gradle
+++ b/deploy.gradle
@@ -4,13 +4,11 @@ if (project.hasProperty("android")) {
task sourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
- exclude 'android-logger.properties'
}
task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
- exclude 'android-logger.properties'
}
} else {
task sourcesJar(type: Jar) {
diff --git a/docs/Changelog.md b/docs/Changelog.md
index 180f1504..85d3b2de 100644
--- a/docs/Changelog.md
+++ b/docs/Changelog.md
@@ -21,6 +21,7 @@
- PolyLabel default disabled [#402](https://github.com/mapsforge/vtm/issues/402)
- vtm-theme-comparator module [#387](https://github.com/mapsforge/vtm/issues/387)
- Feature parameters [#403](https://github.com/mapsforge/vtm/issues/403)
+- vtm-android-gdx module enhancements [#435](https://github.com/mapsforge/vtm/issues/435)
- Gradle 4 / Android plugin 3 support [#433](https://github.com/mapsforge/vtm/issues/433)
- libGDX 1.9.7 [#434](https://github.com/mapsforge/vtm/issues/434)
- Internal render themes various improvements [#41](https://github.com/mapsforge/vtm/issues/41)
diff --git a/vtm-android-example/AndroidManifest.xml b/vtm-android-example/AndroidManifest.xml
index d1447096..15f21ff2 100644
--- a/vtm-android-example/AndroidManifest.xml
+++ b/vtm-android-example/AndroidManifest.xml
@@ -37,6 +37,9 @@
+
diff --git a/vtm-android-example/build.gradle b/vtm-android-example/build.gradle
index 1b9e3913..1a694fca 100644
--- a/vtm-android-example/build.gradle
+++ b/vtm-android-example/build.gradle
@@ -25,6 +25,10 @@ dependencies {
}
implementation 'com.android.support:support-v4:27.0.0'
+ 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'
@@ -60,6 +64,9 @@ android {
file("${rootDir}/vtm-android/natives").eachDir() { dir ->
jniLibs.srcDirs += "${dir.path}/lib"
}
+ file("${rootDir}/vtm-android-gdx/natives").eachDir() { dir ->
+ jniLibs.srcDirs += "${dir.path}/lib"
+ }
}
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
diff --git a/vtm-android-gdx/src/org/oscim/gdx/MainActivity.java b/vtm-android-example/src/org/oscim/android/test/GdxMapActivity.java
similarity index 92%
rename from vtm-android-gdx/src/org/oscim/gdx/MainActivity.java
rename to vtm-android-example/src/org/oscim/android/test/GdxMapActivity.java
index 2d7e4161..ddc99f22 100644
--- a/vtm-android-gdx/src/org/oscim/gdx/MainActivity.java
+++ b/vtm-android-example/src/org/oscim/android/test/GdxMapActivity.java
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see .
*/
-package org.oscim.gdx;
+package org.oscim.android.test;
import android.os.Bundle;
import android.util.DisplayMetrics;
@@ -28,10 +28,13 @@ import org.oscim.android.canvas.AndroidGraphics;
import org.oscim.backend.CanvasAdapter;
import org.oscim.backend.GLAdapter;
import org.oscim.core.Tile;
+import org.oscim.gdx.AndroidGL;
+import org.oscim.gdx.GdxAssets;
+import org.oscim.gdx.GdxMap;
import org.oscim.tiling.TileSource;
import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
-public class MainActivity extends AndroidApplication {
+public class GdxMapActivity extends AndroidApplication {
@Override
public void onCreate(Bundle savedInstanceState) {
diff --git a/vtm-android-example/src/org/oscim/android/test/Samples.java b/vtm-android-example/src/org/oscim/android/test/Samples.java
index b47f57d2..39affab9 100644
--- a/vtm-android-example/src/org/oscim/android/test/Samples.java
+++ b/vtm-android-example/src/org/oscim/android/test/Samples.java
@@ -84,6 +84,7 @@ public class Samples extends Activity {
linearLayout.addView(createButton(MapzenMvtMapActivity.class));
linearLayout.addView(createButton(MapzenGeojsonMapActivity.class));
linearLayout.addView(createButton(OpenMapTilesGeojsonMapActivity.class));
+ linearLayout.addView(createButton(GdxMapActivity.class));
linearLayout.addView(createLabel("Features"));
linearLayout.addView(createButton(null, "GraphHopper Routing", new View.OnClickListener() {
diff --git a/vtm-android-gdx/AndroidManifest.xml b/vtm-android-gdx/AndroidManifest.xml
index 9dfb7774..ee2523f8 100644
--- a/vtm-android-gdx/AndroidManifest.xml
+++ b/vtm-android-gdx/AndroidManifest.xml
@@ -1,26 +1,2 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/vtm-android-gdx/build.gradle b/vtm-android-gdx/build.gradle
index 3fdb143e..a6f46fa1 100644
--- a/vtm-android-gdx/build.gradle
+++ b/vtm-android-gdx/build.gradle
@@ -1,11 +1,8 @@
-apply plugin: 'com.android.application'
+apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
dependencies {
- api project(':vtm-android')
- api project(':vtm-gdx')
- implementation "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
- runtimeOnly 'com.noveogroup.android:android-logger:1.3.6'
+ api project(':vtm')
}
android {
@@ -29,14 +26,6 @@ android {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
- aidl.srcDirs = ['src', 'assets']
- renderscript.srcDirs = ['src', 'assets']
- res.srcDirs = ['res']
- assets.srcDirs = ['assets']
- file('natives').eachDir() { dir ->
- jniLibs.srcDirs += "${dir.path}/lib"
- jniLibs.srcDirs += "${rootDir}/vtm-android/natives/${dir.name}/lib"
- }
}
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
@@ -45,7 +34,7 @@ android {
lintOptions { abortOnError false }
}
-android.applicationVariants.all { variant ->
+android.libraryVariants.all { variant ->
def name = variant.buildType.name
if (name == "debug")
return
@@ -53,7 +42,6 @@ android.applicationVariants.all { variant ->
def jar = project.tasks.create "jar${name.capitalize()}", Jar
jar.dependsOn variant.javaCompiler
jar.from variant.javaCompiler.destinationDir
- jar.exclude 'android-logger.properties'
artifacts.add('archives', jar)
file('natives').eachDir() { dir ->
@@ -64,22 +52,6 @@ android.applicationVariants.all { variant ->
}
}
-afterEvaluate {
- configurations.archives.artifacts.removeAll { it.file =~ 'apk' }
-}
-
-task run(dependsOn: 'installDebug') {
- doFirst {
- println(">> adb run...")
- String adb = System.getenv()['ANDROID_HOME'] + '/platform-tools/adb'
- String cmd = "${adb} shell am start -n org.oscim.gdx/.MainActivity"
- def proc = cmd.execute()
- proc.in.eachLine { line -> println line }
- proc.err.eachLine { line -> System.err.println('ERROR: ' + line) }
- proc.waitFor()
- }
-}
-
if (project.hasProperty("SONATYPE_USERNAME")) {
afterEvaluate {
project.apply from: "${rootProject.projectDir}/deploy.gradle"
diff --git a/vtm-android-gdx/res/drawable/ic_launcher.png b/vtm-android-gdx/res/drawable/ic_launcher.png
deleted file mode 100644
index 6496c5ad..00000000
Binary files a/vtm-android-gdx/res/drawable/ic_launcher.png and /dev/null differ
diff --git a/vtm-android-gdx/res/layout/main.xml b/vtm-android-gdx/res/layout/main.xml
deleted file mode 100644
index a7f88043..00000000
--- a/vtm-android-gdx/res/layout/main.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/vtm-android-gdx/res/values/strings.xml b/vtm-android-gdx/res/values/strings.xml
deleted file mode 100644
index 7eca5512..00000000
--- a/vtm-android-gdx/res/values/strings.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
- VTM GDX
-
diff --git a/vtm-android-gdx/src/android-logger.properties b/vtm-android-gdx/src/android-logger.properties
deleted file mode 100644
index 47f60ed5..00000000
--- a/vtm-android-gdx/src/android-logger.properties
+++ /dev/null
@@ -1 +0,0 @@
-root=DEBUG:%logger
\ No newline at end of file
diff --git a/vtm-android/build.gradle b/vtm-android/build.gradle
index 5f9687d4..cb2964f5 100644
--- a/vtm-android/build.gradle
+++ b/vtm-android/build.gradle
@@ -9,7 +9,7 @@ dependencies {
android {
compileSdkVersion androidCompileSdk()
- buildToolsVersion = "$androidBuildVersionTools"
+ buildToolsVersion "$androidBuildVersionTools"
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
@@ -28,8 +28,6 @@ android {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
- res.srcDirs = ['res']
- assets.srcDirs = ['assets']
}
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')