forked from mapsforge/vtm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create eclipse configuration with gradle
- Loading branch information
Showing
23 changed files
with
759 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,35 @@ | ||
buildscript { | ||
repositories { | ||
mavenCentral() | ||
mavenLocal() | ||
} | ||
|
||
dependencies { | ||
classpath 'org.gradle.api.plugins:gradle-nexus-plugin:0.2' | ||
classpath 'com.android.tools.build:gradle:0.7.+' | ||
|
||
// https://github.com/dcendents/android-maven-plugin | ||
classpath 'com.github.dcendents:android-maven-plugin:1.0' | ||
} | ||
repositories { | ||
mavenCentral() | ||
mavenLocal() | ||
} | ||
|
||
dependencies { | ||
classpath 'org.gradle.api.plugins:gradle-nexus-plugin:0.2' | ||
} | ||
} | ||
|
||
allprojects { | ||
group = 'org.oscim' | ||
version = '0.5.9-SNAPSHOT' | ||
apply plugin: 'idea' | ||
|
||
group = 'org.oscim' | ||
version = '0.5.9-SNAPSHOT' | ||
|
||
repositories { | ||
mavenCentral() | ||
mavenLocal() | ||
} | ||
repositories { | ||
mavenCentral() | ||
mavenLocal() | ||
} | ||
} | ||
|
||
subprojects { | ||
apply plugin: 'eclipse' | ||
|
||
task copySettings(type: Copy) { | ||
from "$rootDir/eclipse" | ||
into ".settings" | ||
include '**/*' | ||
} | ||
|
||
eclipseProject.dependsOn copySettings | ||
|
||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
eclipse.preferences.version=1 | ||
formatter_profile=_eclipse-vtm | ||
formatter_settings_version=12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
include ':vtm' | ||
include ':vtm-extras' | ||
include ':vtm-android' | ||
include ':vtm-android-example' | ||
include ':vtm-gdx' | ||
include ':vtm-gdx-desktop' | ||
include ':vtm-gdx-html' | ||
include ':vtm-gdx-android' | ||
include ':vtm-android-app' |
Submodule vtm-android-app
updated
20 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,95 @@ | ||
buildscript { | ||
repositories { | ||
mavenCentral() | ||
} | ||
dependencies { | ||
classpath 'com.android.tools.build:gradle:0.8.+' | ||
} | ||
} | ||
|
||
apply plugin: 'android' | ||
|
||
dependencies { | ||
compile project(':vtm-android') | ||
compile fileTree(dir: 'libs', include: '*.jar') | ||
compile project(':vtm-android') | ||
compile fileTree(dir: 'libs', include: '*.jar') | ||
} | ||
|
||
task copyAssets(type: Copy) { | ||
from "$rootDir/vtm/assets" | ||
into "assets" | ||
include '**/*' | ||
from "$rootDir/vtm/assets" | ||
into "assets" | ||
include '**/*' | ||
} | ||
|
||
tasks.withType(JavaCompile) { compileTask -> compileTask.dependsOn copyAssets } | ||
tasks.withType(JavaCompile) { compileTask -> | ||
compileTask.dependsOn copyAssets } | ||
|
||
android { | ||
compileSdkVersion 19 | ||
buildToolsVersion '19.0.1' | ||
|
||
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'] | ||
} | ||
|
||
debug.setRoot('build-types/debug') | ||
release.setRoot('build-types/release') | ||
} | ||
} | ||
compileSdkVersion 19 | ||
buildToolsVersion '19.0.1' | ||
|
||
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'] | ||
} | ||
|
||
debug.setRoot('build-types/debug') | ||
release.setRoot('build-types/release') | ||
} | ||
} | ||
|
||
// Including configurations into Eclipse | ||
eclipse.classpath.plusConfigurations += configurations.compile | ||
|
||
eclipse.jdt{ | ||
sourceCompatibility = 1.6 | ||
targetCompatibility = 1.6 | ||
} | ||
|
||
// Configuring Eclipse classpath | ||
eclipse.classpath { | ||
//customizing the classes output directory: | ||
defaultOutputDir = file('bin/classes') | ||
|
||
file { | ||
|
||
// Manipulation of the classpath XML before merging local | ||
// and generated copies | ||
beforeMerged { classpath -> | ||
// Remove all source entries to avoid overlap | ||
classpath.entries.removeAll() { c -> | ||
c.kind == 'src' | ||
} | ||
} | ||
|
||
// 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 | ||
node.appendNode('classpathentry kind="src" path="src"') | ||
// Generated code directory | ||
node.appendNode('classpathentry kind="src" path="gen"') | ||
} | ||
} | ||
} | ||
|
||
eclipse.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' | ||
|
||
linkedResource name: 'assets', type: '2', | ||
locationUri: 'PARENT-1-PROJECT_LOC/vtm/assets' | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,96 @@ | ||
buildscript { | ||
repositories { | ||
mavenCentral() | ||
} | ||
dependencies { | ||
classpath 'com.android.tools.build:gradle:0.8.+' | ||
|
||
// for aar/maven stuff | ||
// https://github.com/dcendents/android-maven-plugin | ||
classpath 'com.github.dcendents:android-maven-plugin:1.0' | ||
} | ||
} | ||
|
||
apply plugin: 'android-library' | ||
apply plugin: 'android-maven' | ||
|
||
dependencies { | ||
compile fileTree(dir: "../vtm-ext-libs/vtm-android", include: 'native-libs-*.jar') | ||
compile project(':vtm') | ||
compile 'com.android.support:support-v4:19.0.1' | ||
compile 'org.slf4j:slf4j-android:1.7.6' | ||
compile project(':vtm') | ||
compile files("${rootDir}/vtm-ext-libs/native-libs.jar") | ||
compile 'com.android.support:support-v4:19.0.1' | ||
compile 'org.slf4j:slf4j-android:1.7.6' | ||
} | ||
|
||
android { | ||
compileSdkVersion 19 | ||
buildToolsVersion '19.0.1' | ||
|
||
sourceSets { | ||
main { | ||
manifest.srcFile 'AndroidManifest.xml' | ||
java.srcDirs = ['src'] | ||
resources.srcDirs = ['src'] | ||
aidl.srcDirs = ['src'] | ||
renderscript.srcDirs = ['src'] | ||
res.srcDirs = ['res'] | ||
assets.srcDirs = ['assets'] | ||
} | ||
|
||
debug.setRoot('build-types/debug') | ||
release.setRoot('build-types/release') | ||
} | ||
compileSdkVersion 19 | ||
buildToolsVersion '19.0.1' | ||
sourceSets { | ||
main { | ||
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') | ||
} | ||
} | ||
|
||
|
||
|
||
// Including configurations into Eclipse | ||
eclipse.classpath.plusConfigurations += configurations.compile | ||
|
||
eclipse.jdt{ | ||
sourceCompatibility = 1.6 | ||
targetCompatibility = 1.6 | ||
} | ||
|
||
eclipse.classpath { | ||
|
||
//customizing the classes output directory: | ||
defaultOutputDir = file('bin/classes') | ||
|
||
file { | ||
// Manipulation of the classpath XML before merging local | ||
// and generated copies | ||
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('native-libs') }*.exported = false | ||
} | ||
|
||
// 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"') | ||
|
||
} | ||
} | ||
} | ||
|
||
eclipse.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' | ||
} | ||
|
Submodule vtm-ext-libs
updated
16 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
apply plugin: 'java' | ||
apply plugin: 'maven' | ||
|
||
sourceSets { | ||
main.java.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' | ||
} | ||
|
Oops, something went wrong.