Gradle build refactoring, closes #46

This commit is contained in:
Emux 2016-07-03 19:09:56 +03:00
parent 11d7002841
commit eca77a0afc
18 changed files with 377 additions and 760 deletions

View File

@ -1,70 +1,39 @@
buildscript { buildscript {
repositories { repositories {
mavenCentral() jcenter()
mavenLocal()
} }
dependencies { dependencies {
classpath 'org.gradle.api.plugins:gradle-nexus-plugin:0.3'
classpath 'com.android.tools.build:gradle:2.1.2' classpath 'com.android.tools.build:gradle:2.1.2'
// for aar/maven stuff
// https://github.com/dcendents/android-maven-gradle-plugin
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
} }
} }
def filterProjects(filter) {
return subprojects.findAll { project -> filter.contains(project.name) }
}
//apply from:'jdee.gradle'
allprojects { allprojects {
group = 'org.oscim' group = 'org.oscim'
version = '0.6.0-SNAPSHOT' version = '0.6.0-SNAPSHOT'
ext.gdxVersion = "1.9.3"
ext.androidBuildVersionTools = "23.0.3" ext.androidBuildVersionTools = "23.0.3"
ext.gdxVersion = "1.9.3"
repositories {
maven { url 'https://github.com/hjanetzek/maven-repo/raw/master/' }
mavenCentral()
// Jeo
// maven { url 'http://repo.boundlessgeo.com/main' }
mavenLocal()
// Local andoird repo
maven { url "${System.env.ANDROID_HOME}/extras/android/m2repository" }
}
// create IntelliJ project settings - untested
apply plugin: 'idea'
} }
def androidCompileSdk() { return 23 }
def androidMinSdk() { return 10 } def androidMinSdk() { return 10 }
def androidTargetSdk() { return 23 }
def androidTargetSdk() { return 22 }
def versionCode() { return 50 } def versionCode() { return 50 }
def versionName() { return version } def versionName() { return version }
subprojects { subprojects {
// create eclipse project settings repositories {
apply plugin: 'eclipse' maven { url 'https://github.com/opensciencemap/maven-repo/raw/master/' }
jcenter()
task copySettings(type: Copy) {
from "$rootDir/eclipse"
into ".settings"
include '**/*'
} }
tasks.withType(JavaCompile) { tasks.withType(JavaCompile) {
sourceCompatibility = JavaVersion.VERSION_1_7 sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7 targetCompatibility = JavaVersion.VERSION_1_7
} }
eclipseProject.dependsOn copySettings
// create emacs JDEE project settings
// http://ignatyev-dev.blogspot.de/2013/07/gradle-projects-in-jdee.html
//apply from:'../jdee.gradle'
} }

View File

@ -1,16 +1,10 @@
repositories {
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
apply plugin: 'java' apply plugin: 'java'
sourceSets {
main.java.srcDirs = ['src']
main.resources.srcDirs = ['src']
}
dependencies { dependencies {
compile "com.badlogicgames.gdx:gdx-jnigen:$gdxVersion" compile "com.badlogicgames.gdx:gdx-jnigen:$gdxVersion"
} }
eclipse.project.name = 'vtm-jni' sourceSets {
main.java.srcDirs = ['src']
main.resources.srcDirs = ['src']
}

View File

@ -1,28 +1,30 @@
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
configurations {
providedCompile
eclipseCompile
}
dependencies { dependencies {
compile project(':vtm-android') compile project(':vtm-android')
compile project(':vtm-jeo')
compile project(':vtm-extras') compile project(':vtm-extras')
compile project(':vtm-jeo')
compile project(':vtm-themes') compile project(':vtm-themes')
compile files("${rootDir}/vtm-android/vtm-natives-android.jar") compile files("${rootDir}/vtm-android/vtm-natives-android.jar")
compile 'com.android.support:support-v4:24.0.0'
compile 'com.android.support:support-v4:22.+' compile 'com.android.support:appcompat-v7:24.0.0'
compile 'com.android.support:appcompat-v7:22.+'
//eclipseCompile project(':appcompat')
compile 'com.noveogroup.android:android-logger:1.3.4'
} }
android { android {
compileSdkVersion androidTargetSdk() compileSdkVersion androidCompileSdk()
buildToolsVersion "$androidBuildVersionTools" buildToolsVersion "$androidBuildVersionTools"
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
defaultConfig {
versionCode versionCode()
versionName versionName()
minSdkVersion androidMinSdk()
}
sourceSets { sourceSets {
main { main {
manifest.srcFile 'AndroidManifest.xml' manifest.srcFile 'AndroidManifest.xml'
@ -31,82 +33,27 @@ android {
res.srcDirs = ['res'] res.srcDirs = ['res']
assets.srcDirs = ['assets'] assets.srcDirs = ['assets']
} }
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
debug.setRoot('build-types/debug') debug.setRoot('build-types/debug')
release.setRoot('build-types/release') release.setRoot('build-types/release')
} }
// remove duplicates
lintOptions { abortOnError false }
packagingOptions { packagingOptions {
exclude 'META-INF/services/org.jeo.data.Driver' exclude 'META-INF/services/org.jeo.data.Driver'
exclude 'META-INF/LICENSE' exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE' exclude 'META-INF/NOTICE'
} }
// ignore deprecated
lintOptions.abortOnError false
} }
eclipse { task run(dependsOn: 'installDebug') {
classpath {
plusConfigurations += [ configurations.compile, configurations.eclipseCompile ]
defaultOutputDir = file('bin/classes')
containers = ['com.android.ide.eclipse.adt.ANDROID_FRAMEWORK',
'com.android.ide.eclipse.adt.LIBRARIES',
'com.android.ide.eclipse.adt.DEPENDENCIES']
file {
// Manipulation of the classpath XML before merging local
// and generated copies
beforeMerged { classpath ->
// Remove all source entries to avoid overlap
classpath.entries.removeAll() { e ->
e.kind == 'src'
}
}
// only used to explode jni .so into aar
whenMerged {
classpath ->
classpath.entries.findAll { e ->
e.path.contains('ANDROID_FRAMEWORK')
}*.exported = false
classpath.entries.removeAll() { e ->
e.path.contains('support')
}
}
// 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"')
}
}
}
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 { doFirst {
println(">> adb run...") println(">> adb run...")
String adb = System.getenv()['ANDROID_HOME'] + '/platform-tools/adb' String adb = System.getenv()['ANDROID_HOME'] + '/platform-tools/adb'
String cmd = "${adb} shell am start -n org.oscim.android.test/.Samples" String cmd = "${adb} shell am start -n org.oscim.android.test/.Samples"
def proc = cmd.execute() def proc = cmd.execute()
proc.in.eachLine {line -> println line} proc.in.eachLine { line -> println line }
proc.err.eachLine {line -> System.err.println( 'ERROR: ' + line)} proc.err.eachLine { line -> System.err.println('ERROR: ' + line) }
proc.waitFor() proc.waitFor()
} }
} }

View File

@ -1,118 +1,53 @@
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
configurations { providedCompile }
dependencies { dependencies {
compile project(':vtm-gdx') compile project(':vtm-gdx')
compile project(':vtm-themes') compile project(':vtm-themes')
compile 'com.noveogroup.android:android-logger:1.3.4'
compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
//compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
//compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
//compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
compile files('gdx-natives-android.jar')
compile files("${rootDir}/vtm-android/vtm-natives-android.jar") compile files("${rootDir}/vtm-android/vtm-natives-android.jar")
compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
compile files('gdx-natives-android.jar')
} }
//task copyLibs(type: Copy) {
// from "$rootDir/vtm-ext-libs/vtm-gdx-android"
// into "libs"
// include '**/*'
//}
//tasks.withType(JavaCompile) { compileTask ->
// compileTask.dependsOn copyLibs }
android { android {
compileSdkVersion androidTargetSdk() compileSdkVersion androidCompileSdk()
buildToolsVersion "$androidBuildVersionTools" buildToolsVersion "$androidBuildVersionTools"
lintOptions { abortOnError false }
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src', 'assets']
resources.srcDirs = ['src', 'assets']
aidl.srcDirs = ['src', 'assets']
renderscript.srcDirs = ['src', 'assets']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
compileOptions { compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7 sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7
} }
defaultConfig {
versionCode versionCode()
versionName versionName()
minSdkVersion androidMinSdk()
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src', 'assets']
aidl.srcDirs = ['src', 'assets']
renderscript.srcDirs = ['src', 'assets']
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')
} }
lintOptions { abortOnError false }
} }
// Including configurations into Eclipse task run(dependsOn: 'installDebug') {
eclipse {
// Configuring Eclipse classpath
classpath {
plusConfigurations += [ configurations.compile ]
defaultOutputDir = file('bin/classes')
containers = ['com.android.ide.eclipse.adt.ANDROID_FRAMEWORK',
'com.android.ide.eclipse.adt.LIBRARIES',
'com.android.ide.eclipse.adt.DEPENDENCIES']
file {
beforeMerged { classpath ->
// Remove all source entries to avoid overlap
classpath.entries.removeAll() { c ->
c.kind == 'src'
}
}
// only used to explode jni .so into aar
whenMerged { classpath ->
classpath.entries.findAll { entry ->
entry.path.contains('ANDROID_FRAMEWORK') ||
entry.path.contains('support') ||
entry.path.contains('native-libs')
}*.exported = false
classpath.entries.removeAll { entry ->
entry.path.contains('gdx-2') }
}
// 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"')
}
}
}
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'
// use extracted jni .so in eclipse
linkedResource name: 'libs', type: '2',
locationUri: 'PARENT-1-PROJECT_LOC/vtm-ext-libs/vtm-gdx-android'
}
}
task run (dependsOn: 'installDebug'){
doFirst { doFirst {
println(">> adb run...") println(">> adb run...")
String adb = System.getenv()['ANDROID_HOME'] + '/platform-tools/adb' String adb = System.getenv()['ANDROID_HOME'] + '/platform-tools/adb'
String cmd = "${adb} shell am start -n org.oscim.gdx/.MainActivity" String cmd = "${adb} shell am start -n org.oscim.gdx/.MainActivity"
def proc = cmd.execute() def proc = cmd.execute()
proc.in.eachLine {line -> println line} proc.in.eachLine { line -> println line }
proc.err.eachLine {line -> System.err.println( 'ERROR: ' + line)} proc.err.eachLine { line -> System.err.println('ERROR: ' + line) }
proc.waitFor() proc.waitFor()
} }
} }

View File

@ -1,26 +1,28 @@
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
configurations {
providedCompile
eclipseCompile
}
dependencies { dependencies {
compile project(':vtm-android') compile project(':vtm-android')
compile project(':vtm-themes') compile project(':vtm-themes')
compile files("${rootDir}/vtm-android/vtm-natives-android.jar") compile files("${rootDir}/vtm-android/vtm-natives-android.jar")
compile 'com.android.support:support-v4:24.0.0'
compile 'com.android.support:support-v4:22.+' compile 'com.android.support:appcompat-v7:24.0.0'
compile 'com.android.support:appcompat-v7:22.+'
//eclipseCompile project(':appcompat')
compile 'com.noveogroup.android:android-logger:1.3.4'
} }
android { android {
compileSdkVersion androidTargetSdk() compileSdkVersion androidCompileSdk()
buildToolsVersion "$androidBuildVersionTools" buildToolsVersion "$androidBuildVersionTools"
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
defaultConfig {
versionCode versionCode()
versionName versionName()
minSdkVersion androidMinSdk()
}
sourceSets { sourceSets {
main { main {
manifest.srcFile 'AndroidManifest.xml' manifest.srcFile 'AndroidManifest.xml'
@ -29,80 +31,21 @@ android {
res.srcDirs = ['res'] res.srcDirs = ['res']
assets.srcDirs = ['assets'] assets.srcDirs = ['assets']
} }
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
debug.setRoot('build-types/debug') debug.setRoot('build-types/debug')
release.setRoot('build-types/release') release.setRoot('build-types/release')
} }
// ignore deprecated lintOptions { abortOnError false }
lintOptions.abortOnError false
} }
//Including configurations into Eclipse task run(dependsOn: 'installDebug') {
eclipse {
// Configuring Eclipse classpath
classpath {
plusConfigurations += [ configurations.compile, configurations.eclipseCompile ]
defaultOutputDir = file('bin/classes')
containers = ['com.android.ide.eclipse.adt.ANDROID_FRAMEWORK',
'com.android.ide.eclipse.adt.LIBRARIES',
'com.android.ide.eclipse.adt.DEPENDENCIES']
file {
// Manipulation of the classpath XML before merging local
// and generated copies
beforeMerged { classpath ->
// Remove all source entries to avoid overlap
classpath.entries.removeAll() { e ->
e.kind == 'src'
}
}
// only used to explode jni .so into aar
whenMerged {
classpath ->
classpath.entries.findAll { e ->
e.path.contains('ANDROID_FRAMEWORK')
}*.exported = false
classpath.entries.removeAll() { e ->
e.path.contains('support')
}
}
// 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"')
}
}
}
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 { doFirst {
println(">> adb run <<") println(">> adb run <<")
String adb = System.getenv()['ANDROID_HOME'] + '/platform-tools/adb' String adb = System.getenv()['ANDROID_HOME'] + '/platform-tools/adb'
String cmd = "${adb} shell am start -n org.oscim.android.start/.TestActivity" String cmd = "${adb} shell am start -n org.oscim.android.start/.TestActivity"
def proc = cmd.execute() def proc = cmd.execute()
proc.in.eachLine {line -> println line} proc.in.eachLine { line -> println line }
proc.err.eachLine {line -> System.err.println( 'ERROR: ' + line)} proc.err.eachLine { line -> System.err.println('ERROR: ' + line) }
proc.waitFor() proc.waitFor()
} }
} }

View File

@ -1,22 +1,25 @@
apply plugin: 'com.android.library' apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven' apply plugin: 'com.github.dcendents.android-maven'
configurations {
eclipseCompile
}
dependencies { dependencies {
compile project(':vtm') compile project(':vtm')
provided files('vtm-natives-android.jar')
compile 'com.android.support:support-v4:21.+'
//eclipseCompile project(':appcompat')
} }
android { android {
compileSdkVersion androidTargetSdk() compileSdkVersion androidCompileSdk()
buildToolsVersion = "$androidBuildVersionTools" buildToolsVersion = "$androidBuildVersionTools"
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
defaultConfig {
versionCode versionCode()
versionName versionName()
minSdkVersion androidMinSdk()
}
sourceSets { sourceSets {
main { main {
manifest.srcFile 'AndroidManifest.xml' manifest.srcFile 'AndroidManifest.xml'
@ -29,66 +32,7 @@ android {
release.setRoot('build-types/release') release.setRoot('build-types/release')
} }
lintOptions.abortOnError false lintOptions { abortOnError false }
}
eclipse {
classpath {
plusConfigurations += [ configurations.compile, configurations.eclipseCompile ]
//noExportConfigurations += [ configurations.provided ]
//customizing the classes output directory:
defaultOutputDir = file('bin/classes')
containers = ['com.android.ide.eclipse.adt.ANDROID_FRAMEWORK',
'com.android.ide.eclipse.adt.LIBRARIES',
'com.android.ide.eclipse.adt.DEPENDENCIES']
file {
// Manipulation of the classpath XML before merging local
// and generated copies
beforeMerged { classpath ->
// Remove all source entries to avoid overlap
classpath.entries.removeAll() { e ->
e.kind == 'src'
}
}
// only used to explode jni .so into aar
whenMerged {
classpath ->
classpath.entries.findAll { e ->
e.path.contains('native-libs') ||
e.path.contains('ANDROID_FRAMEWORK')
}*.exported = false
classpath.entries.removeAll() { e ->
e.path.contains('support')
}
}
// Direct manipulation of the generated classpath XML
withXml {
// Since non-default source directories are used
// they need to be manually added to the classpath XML
def node = it.asNode()
// Main source directory and generated code directory
node.appendNode('classpathentry kind="src" path="src"')
node.appendNode('classpathentry kind="src" path="gen"')
}
}
}
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'
// use extracted jni .so in eclipse
linkedResource name: 'libs', type: '2',
locationUri: 'PARENT-1-PROJECT_LOC/vtm-ext-libs/vtm-android'
}
} }
android.libraryVariants.all { variant -> android.libraryVariants.all { variant ->

View File

@ -1,40 +1,23 @@
repositories {
// libgdx
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
apply plugin: 'java' apply plugin: 'java'
apply plugin: 'maven' apply plugin: 'maven'
apply plugin: 'application' apply plugin: 'application'
dependencies {
compile project(':vtm-gdx')
compile project(':vtm-themes')
compile files('vtm-natives-desktop.jar')
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' mainClassName = 'org.oscim.gdx.GdxMapApp'
// package vtm native libs into jar
//task copyLibs(type: Copy) {
// from(zipTree("../vtm-ext-libs/gdx/vtm-jni-natives.jar"))
// into("${buildDir}/assets")
//}
//tasks.withType(JavaCompile) { compileTask ->
// compileTask.dependsOn copyLibs
//}
sourceSets { sourceSets {
main { main {
java.srcDirs = ['src'] java.srcDirs = ['src']
//main.resources.srcDirs = ["${buildDir}/assets"]
output.resourcesDir = 'assets' output.resourcesDir = 'assets'
} }
} }
dependencies {
compile project(':vtm-gdx')
compile project(':vtm-themes')
//compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-backend-jglfw:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
compile 'org.slf4j:slf4j-simple:1.7.6'
compile files('vtm-natives-desktop.jar')
}
run { ignoreExitValue = true } run { ignoreExitValue = true }

View File

@ -1,16 +1,15 @@
apply plugin: 'java' apply plugin: 'java'
apply plugin: 'maven' apply plugin: 'maven'
dependencies {
compile project(':vtm')
compile 'com.fasterxml.jackson.core:jackson-core:2.3.0'
compile 'com.google.protobuf:protobuf-java:2.4.1'
compile 'com.vividsolutions:jts:1.13'
compile 'org.openstreetmap.osmosis:osmosis-osm-binary:0.44.1'
}
sourceSets { sourceSets {
main.java.srcDirs = ['src'] main.java.srcDirs = ['src']
main.resources.srcDirs = ['src'] main.resources.srcDirs = ['src']
} }
dependencies {
compile project(':vtm')
compile 'com.google.protobuf:protobuf-java:2.4.1'
compile 'org.openstreetmap.osmosis:osmosis-osm-binary:0.43.1'
compile 'com.fasterxml.jackson.core:jackson-core:2.3.0'
compile 'com.vividsolutions:jts:1.13'
}

View File

@ -1,17 +1,13 @@
repositories {
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
apply plugin: 'java' apply plugin: 'java'
apply plugin: 'maven' apply plugin: 'maven'
sourceSets {
main.java.srcDirs = ['src']
main.resources.srcDirs = ['src']
}
dependencies { dependencies {
compile project(':vtm') compile project(':vtm')
compile project(':vtm-themes') compile project(':vtm-themes')
compile "com.badlogicgames.gdx:gdx:$gdxVersion" compile "com.badlogicgames.gdx:gdx:$gdxVersion"
} }
sourceSets {
main.java.srcDirs = ['src']
main.resources.srcDirs = ['src']
}

View File

@ -1,8 +1,5 @@
buildscript { buildscript {
repositories { repositories {
mavenLocal()
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
jcenter() jcenter()
} }
dependencies { dependencies {
@ -10,8 +7,8 @@ buildscript {
} }
} }
apply plugin: "java" apply plugin: 'java'
apply plugin: "robovm" apply plugin: 'robovm'
sourceSets.main.java.srcDirs = ["src/"] sourceSets.main.java.srcDirs = ["src/"]
@ -33,40 +30,36 @@ dependencies {
compile project(':vtm') compile project(':vtm')
compile project(':vtm-gdx') compile project(':vtm-gdx')
compile project(':vtm-themes') compile project(':vtm-themes')
compile 'org.slf4j:slf4j-simple:1.7.5' compile 'org.slf4j:slf4j-simple:1.7.21'
compile "com.mobidevelop.robovm:robovm-rt:$roboVMVersion" compile "com.mobidevelop.robovm:robovm-rt:$roboVMVersion"
compile "com.mobidevelop.robovm:robovm-cocoatouch:$roboVMVersion" compile "com.mobidevelop.robovm:robovm-cocoatouch:$roboVMVersion"
compile "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion" compile "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios" compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios"
} }
task copyLibs(type: Copy) {
from(zipTree("vtm-natives-ios.jar"))
into("${buildDir}/natives")
task copyLibs(type: Copy){
from (zipTree("vtm-natives-ios.jar"))
into ("${buildDir}/natives")
} }
task copyVtmResources(type: Copy){ task copyVtmResources(type: Copy) {
from ("../vtm/resources") from("../vtm/resources")
into ("${buildDir}") into("${buildDir}")
} }
task copyVtmThemesResources(type: Copy){ task copyVtmThemesResources(type: Copy) {
from ("../vtm-themes/resources") from("../vtm-themes/resources")
into ("${buildDir}") into("${buildDir}")
} }
tasks.withType(org.gradle.api.tasks.compile.JavaCompile){ tasks.withType(org.gradle.api.tasks.compile.JavaCompile) {
compileTask -> compileTask.dependsOn copyLibs compileTask -> compileTask.dependsOn copyLibs
} }
tasks.withType(org.gradle.api.tasks.compile.JavaCompile){ tasks.withType(org.gradle.api.tasks.compile.JavaCompile) {
compileTask -> compileTask.dependsOn copyVtmResources compileTask -> compileTask.dependsOn copyVtmResources
} }
tasks.withType(org.gradle.api.tasks.compile.JavaCompile){ tasks.withType(org.gradle.api.tasks.compile.JavaCompile) {
compileTask -> compileTask.dependsOn copyVtmThemesResources compileTask -> compileTask.dependsOn copyVtmThemesResources
} }

View File

@ -1,23 +1,17 @@
apply plugin: 'java' apply plugin: 'java'
apply plugin: 'maven' apply plugin: 'maven'
dependencies {
compile project(':vtm')
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'
}
}
sourceSets { sourceSets {
main.java.srcDirs = ['src'] main.java.srcDirs = ['src']
main.resources.srcDirs = ['src'] main.resources.srcDirs = ['src']
} }
dependencies {
compile project(':vtm')
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
// }

View File

@ -1,23 +1,14 @@
repositories {
// libgdx
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
apply plugin: 'java' apply plugin: 'java'
apply plugin: 'application' apply plugin: 'application'
dependencies {
compile project(':vtm-desktop')
compile project(':vtm-extras')
compile project(':vtm-jeo')
}
mainClassName = 'org.oscim.gdx.GdxMapApp' mainClassName = 'org.oscim.gdx.GdxMapApp'
// package vtm native libs into jar
task copyLibs(type: Copy) {
from(zipTree("../vtm-desktop/vtm-natives-desktop.jar"))
into("${buildDir}/assets")
}
tasks.withType(JavaCompile) { compileTask ->
compileTask.dependsOn copyLibs
}
sourceSets { sourceSets {
main { main {
java.srcDirs = ['src'] java.srcDirs = ['src']
@ -25,10 +16,4 @@ sourceSets {
} }
} }
dependencies {
compile project(':vtm-desktop')
compile project(':vtm-extras')
compile project(':vtm-jeo')
}
run { ignoreExitValue = true } run { ignoreExitValue = true }

View File

@ -3,10 +3,10 @@ apply plugin: 'java'
dependencies { dependencies {
compile project(':vtm') compile project(':vtm')
compile 'com.squareup.okhttp:okhttp:1.5.2' compile 'com.squareup.okhttp:okhttp:1.5.2'
testCompile 'junit:junit:4.11'
testCompile 'org.mockito:mockito-all:1.9.5'
testCompile 'org.easytesting:fest-assert-core:2.0M10'
testCompile 'com.squareup.okhttp:mockwebserver:1.5.2' testCompile 'com.squareup.okhttp:mockwebserver:1.5.2'
testCompile 'junit:junit:4.11'
testCompile 'org.easytesting:fest-assert-core:2.0M10'
testCompile 'org.mockito:mockito-all:1.9.5'
} }
sourceSets { sourceSets {

View File

@ -1,7 +1,6 @@
apply plugin: 'java' apply plugin: 'java'
apply plugin: 'maven' apply plugin: 'maven'
dependencies { dependencies {
compile project(':vtm') compile project(':vtm')
} }

View File

@ -16,7 +16,6 @@ repositories {
apply plugin: 'war' apply plugin: 'war'
apply plugin: 'jetty' apply plugin: 'jetty'
apply plugin: 'gwt' apply plugin: 'gwt'
apply plugin: 'eclipse'
sourceSets { sourceSets {
//main.java.srcDirs = ['src', 'src/org/oscim/gdx/emu'] //main.java.srcDirs = ['src', 'src/org/oscim/gdx/emu']
@ -38,13 +37,12 @@ evaluationDependsOn(':vtm-themes')
evaluationDependsOn(':vtm-gdx') evaluationDependsOn(':vtm-gdx')
evaluationDependsOn(':vtm-web') evaluationDependsOn(':vtm-web')
gwt { gwt {
gwtVersion='2.6.1' gwtVersion = '2.6.1'
modules 'org.oscim.web.VtmWebApp' modules 'org.oscim.web.VtmWebApp'
superDev { superDev {
noPrecompile=true noPrecompile = true
} }
compiler { compiler {
enableClosureCompiler = false; // activates -XenableClosureCompiler enableClosureCompiler = false; // activates -XenableClosureCompiler
@ -64,7 +62,7 @@ gwt {
task jettyDraftWar(type: JettyRunWar) { task jettyDraftWar(type: JettyRunWar) {
dependsOn draftWar dependsOn draftWar
dependsOn.remove('war') dependsOn.remove('war')
webApp=draftWar.archivePath webApp = draftWar.archivePath
} }
task copyThemeAssets(type: Copy) { task copyThemeAssets(type: Copy) {
@ -90,16 +88,3 @@ tasks.withType(JavaCompile) { compileTask ->
compileTask.dependsOn copyVtmAssets compileTask.dependsOn copyVtmAssets
compileTask.dependsOn copyWarSources compileTask.dependsOn copyWarSources
} }
// Configuring Eclipse classpath
eclipse.classpath {
defaultOutputDir = file('war/WEB-INF/classes')
//file {
// whenMerged { classpath ->
// classpath.entries.findAll { entry ->
// entry.path == 'src' }*.excludes = ['main','org/oscim/gdx/emu/']
// }
//}
}

View File

@ -16,7 +16,6 @@ repositories {
apply plugin: 'war' apply plugin: 'war'
apply plugin: 'jetty' apply plugin: 'jetty'
apply plugin: 'gwt' apply plugin: 'gwt'
apply plugin: 'eclipse'
sourceSets { sourceSets {
main.java.srcDirs = ['src'] main.java.srcDirs = ['src']
@ -40,11 +39,11 @@ evaluationDependsOn(':vtm-gdx')
evaluationDependsOn(':vtm-web') evaluationDependsOn(':vtm-web')
gwt { gwt {
gwtVersion='2.6.1' gwtVersion = '2.6.1'
modules 'org.oscim.web.VtmWebJs' modules 'org.oscim.web.VtmWebJs'
superDev { superDev {
noPrecompile=true noPrecompile = true
} }
compiler { compiler {
enableClosureCompiler = false; // activates -XenableClosureCompiler enableClosureCompiler = false; // activates -XenableClosureCompiler
@ -64,7 +63,7 @@ gwt {
task jettyDraftWar(type: JettyRunWar) { task jettyDraftWar(type: JettyRunWar) {
dependsOn draftWar dependsOn draftWar
//dependsOn.remove('war') //dependsOn.remove('war')
webApp=draftWar.archivePath webApp = draftWar.archivePath
} }
task copyThemeAssets(type: Copy) { task copyThemeAssets(type: Copy) {
@ -92,16 +91,3 @@ tasks.withType(JavaCompile) { compileTask ->
compileTask.dependsOn copyVtmAssets compileTask.dependsOn copyVtmAssets
compileTask.dependsOn copyWarSources compileTask.dependsOn copyWarSources
} }
// Configuring Eclipse classpath
eclipse.classpath {
defaultOutputDir = file('war/WEB-INF/classes')
//file {
// whenMerged { classpath ->
// classpath.entries.findAll { entry ->
// entry.path == 'src' }*.excludes = ['main','org/oscim/gdx/emu/']
// }
//}
}

View File

@ -17,7 +17,6 @@ repositories {
//apply plugin: 'jetty' //apply plugin: 'jetty'
apply plugin: 'java' apply plugin: 'java'
apply plugin: 'gwt-base' apply plugin: 'gwt-base'
apply plugin: 'eclipse'
sourceSets { sourceSets {
main.java.srcDirs = ['src', 'src/org/oscim/gdx/emu'] main.java.srcDirs = ['src', 'src/org/oscim/gdx/emu']
@ -40,11 +39,11 @@ evaluationDependsOn(':vtm-gdx')
evaluationDependsOn(':vtm-extras') evaluationDependsOn(':vtm-extras')
gwt { gwt {
gwtVersion='2.6.1' gwtVersion = '2.6.1'
modules 'org.oscim.gdx.VtmWeb' modules 'org.oscim.gdx.VtmWeb'
superDev { superDev {
noPrecompile=true noPrecompile = true
} }
compiler { compiler {
enableClosureCompiler = false; // activates -XenableClosureCompiler enableClosureCompiler = false; // activates -XenableClosureCompiler
@ -82,16 +81,3 @@ gwt {
// compileTask.dependsOn copyThemeAssets // compileTask.dependsOn copyThemeAssets
// compileTask.dependsOn copyVtmAssets // compileTask.dependsOn copyVtmAssets
//} //}
// Configuring Eclipse classpath
eclipse.classpath {
defaultOutputDir = file('war/WEB-INF/classes')
file {
whenMerged { classpath ->
classpath.entries.findAll { entry ->
entry.path == 'src' }*.excludes = ['main','org/oscim/gdx/emu/']
}
}
}

View File

@ -4,10 +4,10 @@ apply plugin: 'maven'
configurations { providedCompile } configurations { providedCompile }
dependencies { dependencies {
compile 'org.slf4j:slf4j-api:1.7.6'
compile 'com.vividsolutions:jts:1.13' compile 'com.vividsolutions:jts:1.13'
providedCompile 'com.squareup.okhttp:okhttp:1.5.2' compile 'org.slf4j:slf4j-api:1.7.21'
providedCompile 'com.google.code.findbugs:annotations:2.0.1' providedCompile 'com.google.code.findbugs:annotations:2.0.1'
providedCompile 'com.squareup.okhttp:okhttp:1.5.2'
} }
sourceSets { sourceSets {
@ -15,24 +15,3 @@ sourceSets {
main.resources.srcDirs = ['resources'] main.resources.srcDirs = ['resources']
main.compileClasspath += configurations.providedCompile main.compileClasspath += configurations.providedCompile
} }
eclipse.classpath {
//you can tweak the classpath of the Eclipse project by adding extra configurations:
plusConfigurations += [ configurations.providedCompile ]
file.whenMerged { classpath ->
classpath.entries.findAll { entry ->
entry.path.contains('annotations') ||
entry.path.contains('okhttp') ||
entry.path.contains('okio')
}*.exported = false
}
//if you don't want some classpath entries 'exported' in Eclipse
noExportConfigurations += [ configurations.providedCompile ]
//default settings for downloading sources and Javadoc:
//downloadSources = true
//downloadJavadoc = false
}