diff --git a/deploy.gradle b/deploy.gradle index 0eae1b98..f0e820bf 100644 --- a/deploy.gradle +++ b/deploy.gradle @@ -9,6 +9,7 @@ if (project.hasProperty("android")) { // Android libraries task javadoc(type: Javadoc) { source = android.sourceSets.main.java.srcDirs classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) + exclude 'android-logger.properties' } } else { // Java libraries task sourcesJar(type: Jar) { diff --git a/vtm-android-example/build.gradle b/vtm-android-example/build.gradle index 5eb03343..c534c83d 100644 --- a/vtm-android-example/build.gradle +++ b/vtm-android-example/build.gradle @@ -5,7 +5,6 @@ dependencies { compile project(':vtm-extras') compile project(':vtm-jeo') compile project(':vtm-themes') - compile files("${rootDir}/vtm-android/vtm-natives-android.jar") compile 'com.android.support:support-v4:24.0.0' compile 'com.android.support:appcompat-v7:24.0.0' compile 'com.noveogroup.android:android-logger:1.3.6' @@ -33,6 +32,7 @@ android { resources.srcDirs = ['src', 'assets'] res.srcDirs = ['res'] assets.srcDirs = ['assets'] + jniLibs.srcDirs = ["${rootDir}/vtm-android/natives/lib"] } debug.setRoot('build-types/debug') release.setRoot('build-types/release') diff --git a/vtm-android-gdx/build.gradle b/vtm-android-gdx/build.gradle index f1839078..391638fc 100644 --- a/vtm-android-gdx/build.gradle +++ b/vtm-android-gdx/build.gradle @@ -4,9 +4,7 @@ apply plugin: 'com.github.dcendents.android-maven' dependencies { compile project(':vtm-gdx') compile project(':vtm-themes') - compile files("${rootDir}/vtm-android/vtm-natives-android.jar") compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion" - compile files('gdx-natives-android.jar') compile 'com.noveogroup.android:android-logger:1.3.6' } @@ -34,6 +32,7 @@ android { renderscript.srcDirs = ['src', 'assets'] res.srcDirs = ['res'] assets.srcDirs = ['assets'] + jniLibs.srcDirs = ['natives/lib', "${rootDir}/vtm-android/natives/lib"] } debug.setRoot('build-types/debug') release.setRoot('build-types/release') @@ -54,6 +53,18 @@ android.applicationVariants.all { variant -> artifacts.add('archives', task); } +android.applicationVariants.all { variant -> + def name = variant.buildType.name + if (name.equals("debug")) { + print "Skipping debug jar" + return; // Skip debug builds. + } + def task = project.tasks.create "nativesJar${name.capitalize()}", Jar + task.classifier = 'natives' + task.from('natives') + artifacts.add('archives', task); +} + task run(dependsOn: 'installDebug') { doFirst { println(">> adb run...") diff --git a/vtm-android-gdx/gdx-natives-android.jar b/vtm-android-gdx/gdx-natives-android.jar deleted file mode 100644 index 9624e3d3..00000000 Binary files a/vtm-android-gdx/gdx-natives-android.jar and /dev/null differ diff --git a/vtm-android-gdx/natives/lib/armeabi-v7a/libgdx.so b/vtm-android-gdx/natives/lib/armeabi-v7a/libgdx.so new file mode 100644 index 00000000..cf0792e1 Binary files /dev/null and b/vtm-android-gdx/natives/lib/armeabi-v7a/libgdx.so differ diff --git a/vtm-android-gdx/natives/lib/armeabi/libgdx.so b/vtm-android-gdx/natives/lib/armeabi/libgdx.so new file mode 100644 index 00000000..e73132da Binary files /dev/null and b/vtm-android-gdx/natives/lib/armeabi/libgdx.so differ diff --git a/vtm-android-gdx/natives/lib/x86/libgdx.so b/vtm-android-gdx/natives/lib/x86/libgdx.so new file mode 100644 index 00000000..285c9b19 Binary files /dev/null and b/vtm-android-gdx/natives/lib/x86/libgdx.so differ diff --git a/vtm-android-start/build.gradle b/vtm-android-start/build.gradle index 799133c6..2cf1444d 100644 --- a/vtm-android-start/build.gradle +++ b/vtm-android-start/build.gradle @@ -3,7 +3,6 @@ apply plugin: 'com.android.application' dependencies { compile project(':vtm-android') compile project(':vtm-themes') - compile files("${rootDir}/vtm-android/vtm-natives-android.jar") compile 'com.android.support:support-v4:24.0.0' compile 'com.android.support:appcompat-v7:24.0.0' compile 'com.noveogroup.android:android-logger:1.3.6' @@ -31,6 +30,7 @@ android { resources.srcDirs = ['src', 'assets'] res.srcDirs = ['res'] assets.srcDirs = ['assets'] + jniLibs.srcDirs = ["${rootDir}/vtm-android/natives/lib"] } debug.setRoot('build-types/debug') release.setRoot('build-types/release') diff --git a/vtm-android/build.gradle b/vtm-android/build.gradle index b9e63aaa..1bdc01d8 100644 --- a/vtm-android/build.gradle +++ b/vtm-android/build.gradle @@ -47,6 +47,18 @@ android.libraryVariants.all { variant -> artifacts.add('archives', task); } +android.libraryVariants.all { variant -> + def name = variant.buildType.name + if (name.equals("debug")) { + print "Skipping debug jar" + return; // Skip debug builds. + } + def task = project.tasks.create "nativesJar${name.capitalize()}", Jar + task.classifier = 'natives' + task.from('natives') + artifacts.add('archives', task); +} + // Automated Gradle project deployment to Sonatype OSSRH if (isReleaseVersion && project.hasProperty("SONATYPE_USERNAME")) { afterEvaluate { diff --git a/vtm-android/natives/lib/armeabi-v7a/libvtm-jni.so b/vtm-android/natives/lib/armeabi-v7a/libvtm-jni.so new file mode 100755 index 00000000..10377cb8 Binary files /dev/null and b/vtm-android/natives/lib/armeabi-v7a/libvtm-jni.so differ diff --git a/vtm-android/natives/lib/armeabi/libvtm-jni.so b/vtm-android/natives/lib/armeabi/libvtm-jni.so new file mode 100755 index 00000000..93bad8a8 Binary files /dev/null and b/vtm-android/natives/lib/armeabi/libvtm-jni.so differ diff --git a/vtm-android/natives/lib/x86/libvtm-jni.so b/vtm-android/natives/lib/x86/libvtm-jni.so new file mode 100755 index 00000000..98c24b79 Binary files /dev/null and b/vtm-android/natives/lib/x86/libvtm-jni.so differ diff --git a/vtm-android/vtm-natives-android.jar b/vtm-android/vtm-natives-android.jar deleted file mode 100644 index 02cd2622..00000000 Binary files a/vtm-android/vtm-natives-android.jar and /dev/null differ diff --git a/vtm-desktop/build.gradle b/vtm-desktop/build.gradle index a2cd892c..897d7555 100644 --- a/vtm-desktop/build.gradle +++ b/vtm-desktop/build.gradle @@ -5,14 +5,12 @@ apply plugin: 'application' dependencies { compile project(':vtm-gdx') compile project(':vtm-themes') - compile files('vtm-natives-desktop.jar') + compile files('natives') compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" compile "com.badlogicgames.gdx:gdx-backend-jglfw:$gdxVersion" compile 'org.slf4j:slf4j-simple:1.7.21' } -mainClassName = 'org.oscim.gdx.GdxMapApp' - sourceSets { main { java.srcDirs = ['src'] @@ -20,6 +18,16 @@ sourceSets { } } +task nativesJar(type: Jar) { + classifier = 'natives' + from('natives') +} + +artifacts { + archives nativesJar +} + +mainClassName = 'org.oscim.gdx.GdxMapApp' run { ignoreExitValue = true } // Automated Gradle project deployment to Sonatype OSSRH diff --git a/vtm-desktop/natives/libvtm-jni.dylib b/vtm-desktop/natives/libvtm-jni.dylib new file mode 100755 index 00000000..6dabd130 Binary files /dev/null and b/vtm-desktop/natives/libvtm-jni.dylib differ diff --git a/vtm-desktop/natives/libvtm-jni.so b/vtm-desktop/natives/libvtm-jni.so new file mode 100644 index 00000000..8fc3c58d Binary files /dev/null and b/vtm-desktop/natives/libvtm-jni.so differ diff --git a/vtm-desktop/natives/libvtm-jni64.dylib b/vtm-desktop/natives/libvtm-jni64.dylib new file mode 100755 index 00000000..6b800d0e Binary files /dev/null and b/vtm-desktop/natives/libvtm-jni64.dylib differ diff --git a/vtm-desktop/natives/libvtm-jni64.so b/vtm-desktop/natives/libvtm-jni64.so new file mode 100644 index 00000000..122eeb11 Binary files /dev/null and b/vtm-desktop/natives/libvtm-jni64.so differ diff --git a/vtm-desktop/natives/vtm-jni.dll b/vtm-desktop/natives/vtm-jni.dll new file mode 100644 index 00000000..f886bcba Binary files /dev/null and b/vtm-desktop/natives/vtm-jni.dll differ diff --git a/vtm-desktop/natives/vtm-jni64.dll b/vtm-desktop/natives/vtm-jni64.dll new file mode 100644 index 00000000..b19928bd Binary files /dev/null and b/vtm-desktop/natives/vtm-jni64.dll differ diff --git a/vtm-desktop/vtm-natives-desktop.jar b/vtm-desktop/vtm-natives-desktop.jar deleted file mode 100644 index a9f50cb6..00000000 Binary files a/vtm-desktop/vtm-natives-desktop.jar and /dev/null differ diff --git a/vtm-ios/build.gradle b/vtm-ios/build.gradle index 0a7bc75e..6c1e9b36 100644 --- a/vtm-ios/build.gradle +++ b/vtm-ios/build.gradle @@ -39,7 +39,7 @@ dependencies { } task copyLibs(type: Copy) { - from(zipTree("vtm-natives-ios.jar")) + from("natives") into("${buildDir}/natives") } @@ -65,6 +65,15 @@ tasks.withType(org.gradle.api.tasks.compile.JavaCompile) { compileTask -> compileTask.dependsOn copyVtmThemesResources } +task nativesJar(type: Jar) { + classifier = 'natives' + from('natives') +} + +artifacts { + archives nativesJar +} + // Automated Gradle project deployment to Sonatype OSSRH if (isReleaseVersion && project.hasProperty("SONATYPE_USERNAME")) { afterEvaluate { diff --git a/vtm-ios/natives/libvtm-jni.a b/vtm-ios/natives/libvtm-jni.a new file mode 100644 index 00000000..0288ac94 Binary files /dev/null and b/vtm-ios/natives/libvtm-jni.a differ diff --git a/vtm-ios/natives/libvtm-jni.a.386 b/vtm-ios/natives/libvtm-jni.a.386 new file mode 100644 index 00000000..c304531a Binary files /dev/null and b/vtm-ios/natives/libvtm-jni.a.386 differ diff --git a/vtm-ios/natives/libvtm-jni.a.arm64 b/vtm-ios/natives/libvtm-jni.a.arm64 new file mode 100644 index 00000000..129705a9 Binary files /dev/null and b/vtm-ios/natives/libvtm-jni.a.arm64 differ diff --git a/vtm-ios/natives/libvtm-jni.a.armv7 b/vtm-ios/natives/libvtm-jni.a.armv7 new file mode 100644 index 00000000..23c3dbce Binary files /dev/null and b/vtm-ios/natives/libvtm-jni.a.armv7 differ diff --git a/vtm-ios/natives/libvtm-jni.a.tvos b/vtm-ios/natives/libvtm-jni.a.tvos new file mode 100644 index 00000000..4c0ccc9f Binary files /dev/null and b/vtm-ios/natives/libvtm-jni.a.tvos differ diff --git a/vtm-ios/natives/libvtm-jni.a.tvos.arm64 b/vtm-ios/natives/libvtm-jni.a.tvos.arm64 new file mode 100644 index 00000000..6f356321 Binary files /dev/null and b/vtm-ios/natives/libvtm-jni.a.tvos.arm64 differ diff --git a/vtm-ios/natives/libvtm-jni.a.tvos.x86_64 b/vtm-ios/natives/libvtm-jni.a.tvos.x86_64 new file mode 100644 index 00000000..dea08832 Binary files /dev/null and b/vtm-ios/natives/libvtm-jni.a.tvos.x86_64 differ diff --git a/vtm-ios/natives/libvtm-jni.a.x86_64 b/vtm-ios/natives/libvtm-jni.a.x86_64 new file mode 100644 index 00000000..d0227e58 Binary files /dev/null and b/vtm-ios/natives/libvtm-jni.a.x86_64 differ diff --git a/vtm-ios/vtm-natives-ios.jar b/vtm-ios/vtm-natives-ios.jar deleted file mode 100644 index a6590d2b..00000000 Binary files a/vtm-ios/vtm-natives-ios.jar and /dev/null differ diff --git a/vtm-playground/build.gradle b/vtm-playground/build.gradle index 53b15768..4a66bb7d 100644 --- a/vtm-playground/build.gradle +++ b/vtm-playground/build.gradle @@ -7,8 +7,6 @@ dependencies { compile project(':vtm-jeo') } -mainClassName = 'org.oscim.gdx.GdxMapApp' - sourceSets { main { java.srcDirs = ['src'] @@ -16,4 +14,5 @@ sourceSets { } } +mainClassName = 'org.oscim.gdx.GdxMapApp' run { ignoreExitValue = true }