diff --git a/settings.gradle b/settings.gradle index 93f56fc4..0c12edc5 100644 --- a/settings.gradle +++ b/settings.gradle @@ -9,3 +9,6 @@ include ':vtm-gdx-desktop' include ':vtm-gdx-android' include ':vtm-gdx-html' include ':vtm-gdx-ios' +include ':vtm-jeo' +include ':vtm-jeo-desktop' +include ':vtm-jeo-android' diff --git a/vtm-jeo-android/build.gradle b/vtm-jeo-android/build.gradle new file mode 100644 index 00000000..0cac9e9f --- /dev/null +++ b/vtm-jeo-android/build.gradle @@ -0,0 +1,91 @@ +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:0.8.+' + } +} + +apply plugin: 'android' + +dependencies { + compile project(':vtm-jeo') + compile 'org.oscim:vtm-android:0.5.9-SNAPSHOT' + compile 'org.oscim:vtm-themes:0.5.9-SNAPSHOT' +} + +android { + compileSdkVersion 19 + buildToolsVersion '19.0.1' + + sourceSets { + main { + manifest.srcFile 'AndroidManifest.xml' + java.srcDirs = ['src'] + resources.srcDirs = ['src', 'assets'] + res.srcDirs = ['res'] + assets.srcDirs = ['assets'] + } + + debug.setRoot('build-types/debug') + release.setRoot('build-types/release') + } + + packagingOptions { + //exclude 'META-INF/**/*' + exclude 'META-INF/services/org.jeo.data.Driver' + } + // ignore deprecated + lintOptions.abortOnError false +} + +// Including configurations into Eclipse +eclipse { + sourceCompatibility = 1.6 + targetCompatibility = 1.6 + + // Configuring Eclipse classpath + classpath { + plusConfigurations += configurations.compile + + defaultOutputDir = file('bin/classes') + + file { + // Direct manipulation of the generated classpath XML + withXml { + def node = it.asNode() + node.appendNode('classpathentry kind="src" path="src"') + node.appendNode('classpathentry kind="src" path="gen"') + } + + whenMerged { classpath -> + classpath.entries.removeAll { entry -> + entry.path.contains('vtm-android-0.5.9') } + classpath.entries.removeAll { entry -> + entry.path.contains('vtm-0.5.9') } + } + } + } + + project { + natures = ['com.android.ide.eclipse.adt.AndroidNature', + 'org.eclipse.jdt.core.javanature'] + + buildCommand 'com.android.ide.eclipse.adt.ResourceManagerBuilder' + buildCommand 'com.android.ide.eclipse.adt.PreCompilerBuilder' + buildCommand 'com.android.ide.eclipse.adt.ApkBuilder' + } +} + +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.jeo.android/.TestActivity" + def proc = cmd.execute() + proc.in.eachLine {line -> println line} + proc.err.eachLine {line -> System.err.println( 'ERROR: ' + line)} + proc.waitFor() + } +} \ No newline at end of file diff --git a/vtm-jeo-desktop/build.gradle b/vtm-jeo-desktop/build.gradle new file mode 100644 index 00000000..dd104bcc --- /dev/null +++ b/vtm-jeo-desktop/build.gradle @@ -0,0 +1,22 @@ +repositories { + // libgdx + maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } +} + +apply plugin: 'java' +apply plugin: 'maven' +apply plugin: 'application' + +mainClassName = 'org.oscim.jeo.test.LayerTest' + +sourceSets { + main.java.srcDirs = ['src'] + main.resources.srcDirs = ['resources'] +} + +dependencies { + compile project(':vtm-jeo') + compile 'org.oscim:vtm-gdx-desktop:0.5.9-SNAPSHOT' +} + +run { ignoreExitValue = true } diff --git a/vtm-jeo/build.gradle b/vtm-jeo/build.gradle new file mode 100644 index 00000000..5e980a98 --- /dev/null +++ b/vtm-jeo/build.gradle @@ -0,0 +1,27 @@ +apply plugin: 'java' +apply plugin: 'maven' + +repositories { + mavenCentral() + mavenLocal() +} + +sourceSets { + main.java.srcDirs = ['src'] + main.resources.srcDirs = ['src'] +} + +dependencies { + compile 'org.oscim:vtm:0.5.9-SNAPSHOT' + compile ('org.jeo:jeo:0-SNAPSHOT') { + exclude group: 'org.slf4j', module: 'slf4j-jdk14' + } + compile ('org.jeo:jeo-carto:0-SNAPSHOT') { + exclude group: 'org.slf4j', module: 'slf4j-jdk14' + } +} + +eclipse.classpath.file.whenMerged { classpath -> + classpath.entries.findAll { entry -> + entry.path.contains('vtm-0.5.9-SNAPSHOT.jar') }*.exported = false +}