vtm-android-gdx module, fix #435
This commit is contained in:
parent
1d44057198
commit
1aa5f24e11
15
README.md
15
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))
|
- HTML5/WebGL (using libGDX/GWT, [instructions](docs/web.md))
|
||||||
|
|
||||||
### Projects
|
### Projects
|
||||||
- **vtm** contains the core library
|
- **vtm** core library
|
||||||
- **vtm-android** Android backend
|
- **vtm-android** Android backend
|
||||||
- **vtm-android-example** provides examples using vtm-android
|
- **vtm-android-example** Android examples
|
||||||
- **vtm-gdx** common libGDX backend
|
- **vtm-gdx** common libGDX backend
|
||||||
- **vtm-android-gdx** Android backend (with libGDX)
|
- **vtm-android-gdx** Android libGDX backend
|
||||||
- **vtm-desktop** Desktop backend
|
- **vtm-desktop** Desktop libGDX backend
|
||||||
- **vtm-ios** iOS backend
|
- **vtm-playground** Desktop examples
|
||||||
- **vtm-ios-example** provides examples using vtm-ios
|
- **vtm-ios** iOS libGDX backend
|
||||||
- **vtm-web** HTML5/GWT backend
|
- **vtm-ios-example** iOS examples
|
||||||
|
- **vtm-web** HTML5/GWT libGDX backend
|
||||||
- **vtm-web-app** HTML5/GWT application
|
- **vtm-web-app** HTML5/GWT application
|
||||||
|
|
||||||
## WebGL Demo
|
## WebGL Demo
|
||||||
|
@ -4,13 +4,11 @@ if (project.hasProperty("android")) {
|
|||||||
task sourcesJar(type: Jar) {
|
task sourcesJar(type: Jar) {
|
||||||
classifier = 'sources'
|
classifier = 'sources'
|
||||||
from android.sourceSets.main.java.srcDirs
|
from android.sourceSets.main.java.srcDirs
|
||||||
exclude 'android-logger.properties'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
task javadoc(type: Javadoc) {
|
task javadoc(type: Javadoc) {
|
||||||
source = android.sourceSets.main.java.srcDirs
|
source = android.sourceSets.main.java.srcDirs
|
||||||
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
|
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
|
||||||
exclude 'android-logger.properties'
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
task sourcesJar(type: Jar) {
|
task sourcesJar(type: Jar) {
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
- PolyLabel default disabled [#402](https://github.com/mapsforge/vtm/issues/402)
|
- PolyLabel default disabled [#402](https://github.com/mapsforge/vtm/issues/402)
|
||||||
- vtm-theme-comparator module [#387](https://github.com/mapsforge/vtm/issues/387)
|
- vtm-theme-comparator module [#387](https://github.com/mapsforge/vtm/issues/387)
|
||||||
- Feature parameters [#403](https://github.com/mapsforge/vtm/issues/403)
|
- 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)
|
- 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)
|
- 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)
|
- Internal render themes various improvements [#41](https://github.com/mapsforge/vtm/issues/41)
|
||||||
|
@ -37,6 +37,9 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".ClusterMarkerOverlayActivity"
|
android:name=".ClusterMarkerOverlayActivity"
|
||||||
android:configChanges="keyboardHidden|orientation|screenSize" />
|
android:configChanges="keyboardHidden|orientation|screenSize" />
|
||||||
|
<activity
|
||||||
|
android:name=".GdxMapActivity"
|
||||||
|
android:configChanges="keyboardHidden|orientation|screenSize" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".JeoIndoorMapActivity"
|
android:name=".JeoIndoorMapActivity"
|
||||||
android:configChanges="keyboardHidden|orientation|screenSize" />
|
android:configChanges="keyboardHidden|orientation|screenSize" />
|
||||||
|
@ -25,6 +25,10 @@ dependencies {
|
|||||||
}
|
}
|
||||||
implementation 'com.android.support:support-v4:27.0.0'
|
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-core:master-SNAPSHOT'
|
||||||
implementation 'org.mapsforge:mapsforge-poi:master-SNAPSHOT'
|
implementation 'org.mapsforge:mapsforge-poi:master-SNAPSHOT'
|
||||||
implementation 'org.mapsforge:mapsforge-poi-android:master-SNAPSHOT'
|
implementation 'org.mapsforge:mapsforge-poi-android:master-SNAPSHOT'
|
||||||
@ -60,6 +64,9 @@ android {
|
|||||||
file("${rootDir}/vtm-android/natives").eachDir() { dir ->
|
file("${rootDir}/vtm-android/natives").eachDir() { dir ->
|
||||||
jniLibs.srcDirs += "${dir.path}/lib"
|
jniLibs.srcDirs += "${dir.path}/lib"
|
||||||
}
|
}
|
||||||
|
file("${rootDir}/vtm-android-gdx/natives").eachDir() { dir ->
|
||||||
|
jniLibs.srcDirs += "${dir.path}/lib"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
debug.setRoot('build-types/debug')
|
debug.setRoot('build-types/debug')
|
||||||
release.setRoot('build-types/release')
|
release.setRoot('build-types/release')
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* You should have received a copy of the GNU Lesser General Public License along with
|
* You should have received a copy of the GNU Lesser General Public License along with
|
||||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package org.oscim.gdx;
|
package org.oscim.android.test;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.util.DisplayMetrics;
|
import android.util.DisplayMetrics;
|
||||||
@ -28,10 +28,13 @@ import org.oscim.android.canvas.AndroidGraphics;
|
|||||||
import org.oscim.backend.CanvasAdapter;
|
import org.oscim.backend.CanvasAdapter;
|
||||||
import org.oscim.backend.GLAdapter;
|
import org.oscim.backend.GLAdapter;
|
||||||
import org.oscim.core.Tile;
|
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.TileSource;
|
||||||
import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
|
import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
|
||||||
|
|
||||||
public class MainActivity extends AndroidApplication {
|
public class GdxMapActivity extends AndroidApplication {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
@ -84,6 +84,7 @@ public class Samples extends Activity {
|
|||||||
linearLayout.addView(createButton(MapzenMvtMapActivity.class));
|
linearLayout.addView(createButton(MapzenMvtMapActivity.class));
|
||||||
linearLayout.addView(createButton(MapzenGeojsonMapActivity.class));
|
linearLayout.addView(createButton(MapzenGeojsonMapActivity.class));
|
||||||
linearLayout.addView(createButton(OpenMapTilesGeojsonMapActivity.class));
|
linearLayout.addView(createButton(OpenMapTilesGeojsonMapActivity.class));
|
||||||
|
linearLayout.addView(createButton(GdxMapActivity.class));
|
||||||
|
|
||||||
linearLayout.addView(createLabel("Features"));
|
linearLayout.addView(createLabel("Features"));
|
||||||
linearLayout.addView(createButton(null, "GraphHopper Routing", new View.OnClickListener() {
|
linearLayout.addView(createButton(null, "GraphHopper Routing", new View.OnClickListener() {
|
||||||
|
@ -1,26 +1,2 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest package="org.oscim.gdx" />
|
||||||
package="org.oscim.gdx"
|
|
||||||
android:installLocation="auto"
|
|
||||||
android:versionCode="1"
|
|
||||||
android:versionName="1.0">
|
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
|
||||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
|
||||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
|
||||||
|
|
||||||
<application
|
|
||||||
android:allowBackup="true"
|
|
||||||
android:icon="@drawable/ic_launcher"
|
|
||||||
android:label="@string/app_name">
|
|
||||||
<activity
|
|
||||||
android:name=".MainActivity"
|
|
||||||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="android.intent.action.MAIN" />
|
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
|
||||||
</intent-filter>
|
|
||||||
</activity>
|
|
||||||
</application>
|
|
||||||
|
|
||||||
</manifest>
|
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.library'
|
||||||
apply plugin: 'com.github.dcendents.android-maven'
|
apply plugin: 'com.github.dcendents.android-maven'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(':vtm-android')
|
api project(':vtm')
|
||||||
api project(':vtm-gdx')
|
|
||||||
implementation "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
|
|
||||||
runtimeOnly 'com.noveogroup.android:android-logger:1.3.6'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
@ -29,14 +26,6 @@ android {
|
|||||||
manifest.srcFile 'AndroidManifest.xml'
|
manifest.srcFile 'AndroidManifest.xml'
|
||||||
java.srcDirs = ['src']
|
java.srcDirs = ['src']
|
||||||
resources.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')
|
debug.setRoot('build-types/debug')
|
||||||
release.setRoot('build-types/release')
|
release.setRoot('build-types/release')
|
||||||
@ -45,7 +34,7 @@ android {
|
|||||||
lintOptions { abortOnError false }
|
lintOptions { abortOnError false }
|
||||||
}
|
}
|
||||||
|
|
||||||
android.applicationVariants.all { variant ->
|
android.libraryVariants.all { variant ->
|
||||||
def name = variant.buildType.name
|
def name = variant.buildType.name
|
||||||
if (name == "debug")
|
if (name == "debug")
|
||||||
return
|
return
|
||||||
@ -53,7 +42,6 @@ android.applicationVariants.all { variant ->
|
|||||||
def jar = project.tasks.create "jar${name.capitalize()}", Jar
|
def jar = project.tasks.create "jar${name.capitalize()}", Jar
|
||||||
jar.dependsOn variant.javaCompiler
|
jar.dependsOn variant.javaCompiler
|
||||||
jar.from variant.javaCompiler.destinationDir
|
jar.from variant.javaCompiler.destinationDir
|
||||||
jar.exclude 'android-logger.properties'
|
|
||||||
artifacts.add('archives', jar)
|
artifacts.add('archives', jar)
|
||||||
|
|
||||||
file('natives').eachDir() { dir ->
|
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")) {
|
if (project.hasProperty("SONATYPE_USERNAME")) {
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
project.apply from: "${rootProject.projectDir}/deploy.gradle"
|
project.apply from: "${rootProject.projectDir}/deploy.gradle"
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 41 KiB |
@ -1,7 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
@ -1,4 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<string name="app_name">VTM GDX</string>
|
|
||||||
</resources>
|
|
@ -1 +0,0 @@
|
|||||||
root=DEBUG:%logger
|
|
@ -9,7 +9,7 @@ dependencies {
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion androidCompileSdk()
|
compileSdkVersion androidCompileSdk()
|
||||||
buildToolsVersion = "$androidBuildVersionTools"
|
buildToolsVersion "$androidBuildVersionTools"
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_7
|
sourceCompatibility JavaVersion.VERSION_1_7
|
||||||
@ -28,8 +28,6 @@ android {
|
|||||||
manifest.srcFile 'AndroidManifest.xml'
|
manifest.srcFile 'AndroidManifest.xml'
|
||||||
java.srcDirs = ['src']
|
java.srcDirs = ['src']
|
||||||
resources.srcDirs = ['src']
|
resources.srcDirs = ['src']
|
||||||
res.srcDirs = ['res']
|
|
||||||
assets.srcDirs = ['assets']
|
|
||||||
}
|
}
|
||||||
debug.setRoot('build-types/debug')
|
debug.setRoot('build-types/debug')
|
||||||
release.setRoot('build-types/release')
|
release.setRoot('build-types/release')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user