gradle: update to 2.1 and android targetSdk 21
- add android-appcompat subproject
This commit is contained in:
parent
0bc45dfd74
commit
f4ffac44d2
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -6,3 +6,6 @@
|
|||||||
path = jni/jni/libtess2
|
path = jni/jni/libtess2
|
||||||
url = https://github.com/memononen/libtess2.git
|
url = https://github.com/memononen/libtess2.git
|
||||||
|
|
||||||
|
[submodule "appcompat"]
|
||||||
|
path = appcompat
|
||||||
|
url = https://github.com/hjanetzek/android-support-v7-appcompat.git
|
||||||
|
|||||||
51
.travis.yml
51
.travis.yml
@ -1,34 +1,63 @@
|
|||||||
# from https://github.com/Ruenzuo/android-cd-travis-example/blob/master/.travis.yml
|
# from https://github.com/Ruenzuo/android-cd-travis-example/blob/master/.travis.yml
|
||||||
|
|
||||||
language: java
|
language: java
|
||||||
jdk: openjdk7
|
jdk:
|
||||||
|
- openjdk7
|
||||||
|
|
||||||
env:
|
env:
|
||||||
matrix:
|
matrix:
|
||||||
- ANDROID_SDKS=android-19 ANDROID_TARGET=android-19 ANDROID_ABI=armeabi-v7a
|
- ANDROID_SDKS=android-21 ANDROID_TARGET=android-21 ANDROID_ABI=armeabi-v7a
|
||||||
#branches:
|
|
||||||
# only:
|
branches:
|
||||||
# - master
|
only:
|
||||||
|
- master
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- chmod +x gradlew
|
- chmod +x gradlew
|
||||||
# Install base Android SDK
|
# Install base Android SDK
|
||||||
- sudo apt-get update
|
- sudo apt-get update
|
||||||
- if [ `uname -m` = x86_64 ]; then sudo apt-get install --force-yes libgd2-xpm ia32-libs ia32-libs-multiarch > /dev/null; fi
|
- if [ `uname -m` = x86_64 ]; then sudo apt-get install --force-yes libgd2-xpm ia32-libs ia32-libs-multiarch > /dev/null; fi
|
||||||
- wget http://dl.google.com/android/android-sdk_r23-linux.tgz
|
- wget http://dl.google.com/android/android-sdk_r23.0.2-linux.tgz
|
||||||
- tar xzf android-sdk_r23-linux.tgz
|
- tar xzf android-sdk_r23.0.2-linux.tgz
|
||||||
- export ANDROID_HOME=$PWD/android-sdk-linux
|
- export ANDROID_HOME=$PWD/android-sdk-linux
|
||||||
- export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
|
- export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
|
||||||
# install android build tools
|
# install android build tools
|
||||||
- wget https://dl-ssl.google.com/android/repository/build-tools_r20-linux.zip
|
- wget https://dl-ssl.google.com/android/repository/build-tools_r21.0.2-linux.zip
|
||||||
- unzip build-tools_r20-linux.zip -d $ANDROID_HOME
|
- unzip build-tools_r21.0.2-linux.zip -d $ANDROID_HOME
|
||||||
- mkdir -p $ANDROID_HOME/build-tools/
|
- mkdir -p $ANDROID_HOME/build-tools/
|
||||||
- mv $ANDROID_HOME/android-4.4W $ANDROID_HOME/build-tools/20.0.0
|
- mv $ANDROID_HOME/android-5.0 $ANDROID_HOME/build-tools/21.0.2
|
||||||
# Install required components.
|
# Install required components.
|
||||||
# For a full list, run `android list sdk -a --extended`
|
# For a full list, run `android list sdk -a --extended`
|
||||||
# Note that sysimg-18 downloads the ARM, x86 and MIPS images (we should optimize this).
|
# Note that sysimg-18 downloads the ARM, x86 and MIPS images (we should optimize this).
|
||||||
# Other relevant API's
|
# Other relevant API's
|
||||||
- echo yes | android update sdk --filter platform-tools --no-ui --force
|
- echo yes | android update sdk --filter platform-tools --no-ui --force
|
||||||
- echo yes | android update sdk --filter android-19 --no-ui --force
|
- echo yes | android update sdk --filter android-21 --no-ui --force
|
||||||
- echo yes | android update sdk --filter extra-android-support --no-ui --force
|
- echo yes | android update sdk --filter extra-android-support --no-ui --force
|
||||||
- echo yes | android update sdk --filter extra-android-m2repository --no-ui --force
|
- echo yes | android update sdk --filter extra-android-m2repository --no-ui --force
|
||||||
# Create and start emulator
|
# Create and start emulator
|
||||||
#- echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI
|
#- echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI
|
||||||
#- emulator -avd test -no-skin -no-audio -no-window &
|
#- emulator -avd test -no-skin -no-audio -no-window &
|
||||||
|
|
||||||
|
|
||||||
|
# language: android
|
||||||
|
# android:
|
||||||
|
# components:
|
||||||
|
# # Uncomment the lines below if you want to
|
||||||
|
# # use the latest revision of Android SDK Tools
|
||||||
|
# - platform-tools
|
||||||
|
# - tools
|
||||||
|
# # The BuildTools version used by your project
|
||||||
|
# # - build-tools-21.0.1
|
||||||
|
# # The SDK version used to compile your project
|
||||||
|
# - android-21
|
||||||
|
# # Additional components
|
||||||
|
# - extra-android-support
|
||||||
|
# # - extra-google-google_play_services
|
||||||
|
# - extra-google-m2repository
|
||||||
|
# - extra-android-m2repository
|
||||||
|
# - addon-google_apis-google-21
|
||||||
|
# # Specify at least one system image,
|
||||||
|
# # if you need to run emulator(s) during your tests
|
||||||
|
# #- sys-img-armeabi-v7a-android-19
|
||||||
|
# #- sys-img-x86-android-17
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
export PATH=$PATH:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools
|
export PATH=$PATH:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools
|
||||||
echo yes | android update sdk --filter platform-tools --no-ui
|
echo yes | android update sdk --filter platform-tools --no-ui
|
||||||
echo yes | android update sdk --filter android-19 --no-ui
|
echo yes | android update sdk --filter android-21 --no-ui
|
||||||
echo yes | android update sdk --filter extra-android-support --no-ui
|
echo yes | android update sdk --filter extra-android-support --no-ui
|
||||||
echo yes | android update sdk --filter extra-android-m2repository --no-ui
|
echo yes | android update sdk --filter extra-android-m2repository --no-ui
|
||||||
|
|||||||
1
appcompat
Submodule
1
appcompat
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit eead2062deaeda844de58777247f517427459e0d
|
||||||
38
build.gradle
38
build.gradle
@ -6,32 +6,51 @@ buildscript {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'org.gradle.api.plugins:gradle-nexus-plugin:0.3'
|
classpath 'org.gradle.api.plugins:gradle-nexus-plugin:0.3'
|
||||||
|
|
||||||
|
classpath 'com.android.tools.build:gradle:0.13.1'
|
||||||
|
|
||||||
|
// for aar/maven stuff
|
||||||
|
// https://github.com/dcendents/android-maven-plugin
|
||||||
|
classpath 'com.github.dcendents:android-maven-plugin:1.1'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task wrapper(type: Wrapper) {
|
def filterProjects(filter) {
|
||||||
gradleVersion = '1.12'
|
return subprojects.findAll { project -> filter.contains(project.name) }
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from:'jdee.gradle'
|
task wrapper(type: Wrapper) {
|
||||||
|
gradleVersion = '2.1'
|
||||||
|
}
|
||||||
|
|
||||||
|
//apply from:'jdee.gradle'
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
group = 'org.oscim'
|
group = 'org.oscim'
|
||||||
version = '0.5.9-SNAPSHOT'
|
version = '0.6.0-SNAPSHOT'
|
||||||
|
|
||||||
ext.gdxVersion = "1.2.0"
|
ext.gdxVersion = "1.4.1"
|
||||||
|
ext.androidBuildVersionTools = "21.0.2"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
// Jeo
|
||||||
maven { url 'http://repo.boundlessgeo.com/main' }
|
maven { url 'http://repo.boundlessgeo.com/main' }
|
||||||
//maven { url 'https://github.com/hjanetzek/maven-repo/raw/master/' }
|
//maven { url 'https://github.com/hjanetzek/maven-repo/raw/master/' }
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
|
// Local andoird repo
|
||||||
|
maven { url "${System.env.ANDROID_HOME}/extras/android/m2repository" }
|
||||||
}
|
}
|
||||||
|
|
||||||
// create IntelliJ project settings - untested
|
// create IntelliJ project settings - untested
|
||||||
apply plugin: 'idea'
|
apply plugin: 'idea'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def androidMinSdk() { return 10 }
|
||||||
|
def androidTargetSdk() { return 21 }
|
||||||
|
def versionCode() { return 50 }
|
||||||
|
def versionName() { return version }
|
||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
// create eclipse project settings
|
// create eclipse project settings
|
||||||
apply plugin: 'eclipse'
|
apply plugin: 'eclipse'
|
||||||
@ -42,15 +61,14 @@ subprojects {
|
|||||||
include '**/*'
|
include '**/*'
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType(JavaCompile) {
|
tasks.withType(JavaCompile) {
|
||||||
sourceCompatibility = "1.7"
|
sourceCompatibility = JavaVersion.VERSION_1_7
|
||||||
targetCompatibility = "1.7"
|
targetCompatibility = JavaVersion.VERSION_1_7
|
||||||
}
|
}
|
||||||
|
|
||||||
eclipseProject.dependsOn copySettings
|
eclipseProject.dependsOn copySettings
|
||||||
|
|
||||||
// create emacs JDEE project settings
|
// create emacs JDEE project settings
|
||||||
// http://ignatyev-dev.blogspot.de/2013/07/gradle-projects-in-jdee.html
|
// http://ignatyev-dev.blogspot.de/2013/07/gradle-projects-in-jdee.html
|
||||||
apply from:'../jdee.gradle'
|
//apply from:'../jdee.gradle'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -18,4 +18,5 @@ org.gradle.jvmargs=-Xmx1024m -XX:MaxPermSize=512m
|
|||||||
|
|
||||||
# options to speed up compilation once everything else is working:
|
# options to speed up compilation once everything else is working:
|
||||||
org.gradle.parallel=false
|
org.gradle.parallel=false
|
||||||
org.gradle.configureondemand=true
|
org.gradle.configureondemand=false
|
||||||
|
|
||||||
|
|||||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
|||||||
#Mon Jun 09 05:36:37 CEST 2014
|
#Sun Oct 19 16:09:27 CEST 2014
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-1.12-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-2.1-bin.zip
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
include ':appcompat'
|
||||||
include ':vtm'
|
include ':vtm'
|
||||||
include ':vtm-tests'
|
include ':vtm-tests'
|
||||||
include ':vtm-extras'
|
include ':vtm-extras'
|
||||||
|
|||||||
@ -10,13 +10,13 @@
|
|||||||
|
|
||||||
<uses-sdk
|
<uses-sdk
|
||||||
android:minSdkVersion="10"
|
android:minSdkVersion="10"
|
||||||
android:targetSdkVersion="19" />
|
android:targetSdkVersion="21" />
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:icon="@drawable/ic_launcher"
|
android:icon="@drawable/ic_launcher"
|
||||||
android:label="@string/app_name" >
|
android:label="@string/app_name">
|
||||||
<!-- android:theme="@android:style/Theme.NoTitleBar.Fullscreen" -->
|
<!-- android:theme="@style/AppTheme" -->
|
||||||
<activity
|
<activity
|
||||||
android:name="org.oscim.android.test.Samples"
|
android:name="org.oscim.android.test.Samples"
|
||||||
android:label="@string/app_name" >
|
android:label="@string/app_name" >
|
||||||
|
|||||||
@ -1,28 +1,22 @@
|
|||||||
buildscript {
|
apply plugin: 'com.android.application'
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
dependencies {
|
|
||||||
classpath 'com.android.tools.build:gradle:0.12.+'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
configurations { providedCompile }
|
||||||
maven { url "${System.env.ANDROID_HOME}/extras/android/m2repository" }
|
|
||||||
}
|
|
||||||
|
|
||||||
apply plugin: 'android'
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project(':vtm-android')
|
compile project(':vtm-android')
|
||||||
compile project(':vtm-jeo')
|
compile project(':vtm-jeo')
|
||||||
compile project(':vtm-extras')
|
compile project(':vtm-extras')
|
||||||
compile project(':vtm-themes')
|
compile project(':vtm-themes')
|
||||||
|
|
||||||
|
compile project(':appcompat')
|
||||||
|
//compile 'com.android.support:support-v4:21.+'
|
||||||
|
|
||||||
|
compile 'com.noveogroup.android:android-logger:1.3.4'
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 19
|
compileSdkVersion androidTargetSdk()
|
||||||
buildToolsVersion '20.0'
|
buildToolsVersion "$androidBuildVersionTools"
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main {
|
||||||
@ -33,12 +27,17 @@ android {
|
|||||||
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
|
// remove duplicates
|
||||||
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'
|
||||||
}
|
}
|
||||||
@ -47,35 +46,52 @@ android {
|
|||||||
lintOptions.abortOnError false
|
lintOptions.abortOnError false
|
||||||
}
|
}
|
||||||
|
|
||||||
// Including configurations into Eclipse
|
eclipse {
|
||||||
|
classpath {
|
||||||
|
plusConfigurations += [ configurations.compile ]
|
||||||
|
|
||||||
|
defaultOutputDir = file('bin/classes')
|
||||||
|
|
||||||
// Configuring Eclipse classpath
|
containers = ['com.android.ide.eclipse.adt.ANDROID_FRAMEWORK',
|
||||||
eclipse.classpath {
|
'com.android.ide.eclipse.adt.LIBRARIES',
|
||||||
plusConfigurations += configurations.compile
|
'com.android.ide.eclipse.adt.DEPENDENCIES']
|
||||||
|
|
||||||
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'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
file {
|
// only used to explode jni .so into aar
|
||||||
// Direct manipulation of the generated classpath XML
|
whenMerged {
|
||||||
withXml {
|
classpath ->
|
||||||
def node = it.asNode()
|
classpath.entries.findAll { entry ->
|
||||||
node.appendNode('classpathentry kind="src" path="src"')
|
entry.path.contains('ANDROID_FRAMEWORK') ||
|
||||||
node.appendNode('classpathentry kind="src" path="gen"')
|
entry.path.contains('support')
|
||||||
|
}*.exported = false
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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'
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
task run (dependsOn: 'installDebug'){
|
task run (dependsOn: 'installDebug'){
|
||||||
doFirst {
|
doFirst {
|
||||||
println(">> adb run...")
|
println(">> adb run...")
|
||||||
|
|||||||
@ -11,5 +11,6 @@
|
|||||||
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
||||||
|
|
||||||
# Project target.
|
# Project target.
|
||||||
target=android-19
|
target=android-21
|
||||||
android.library.reference.1=../vtm-android
|
android.library.reference.1=../vtm-android
|
||||||
|
android.library.reference.2=../appcompat
|
||||||
|
|||||||
@ -1,24 +1,11 @@
|
|||||||
buildscript {
|
apply plugin: 'com.android.application'
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
dependencies {
|
|
||||||
classpath 'com.android.tools.build:gradle:0.12.+'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
|
|
||||||
}
|
|
||||||
|
|
||||||
apply plugin: 'android'
|
|
||||||
|
|
||||||
configurations { providedCompile }
|
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.1'
|
compile 'com.noveogroup.android:android-logger:1.3.4'
|
||||||
compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
|
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"
|
||||||
//compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
|
//compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
|
||||||
@ -36,8 +23,8 @@ dependencies {
|
|||||||
// compileTask.dependsOn copyLibs }
|
// compileTask.dependsOn copyLibs }
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 19
|
compileSdkVersion androidTargetSdk()
|
||||||
buildToolsVersion '20.0'
|
buildToolsVersion "$androidBuildVersionTools"
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main {
|
||||||
@ -50,6 +37,11 @@ android {
|
|||||||
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')
|
||||||
}
|
}
|
||||||
@ -57,28 +49,37 @@ android {
|
|||||||
|
|
||||||
// Including configurations into Eclipse
|
// Including configurations into Eclipse
|
||||||
eclipse {
|
eclipse {
|
||||||
jdt {
|
|
||||||
sourceCompatibility = 1.6
|
|
||||||
targetCompatibility = 1.6
|
|
||||||
}
|
|
||||||
|
|
||||||
// Configuring Eclipse classpath
|
// Configuring Eclipse classpath
|
||||||
classpath {
|
classpath {
|
||||||
plusConfigurations += configurations.compile
|
plusConfigurations += [ configurations.compile ]
|
||||||
|
|
||||||
defaultOutputDir = file('bin/classes')
|
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 {
|
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
|
// only used to explode jni .so into aar
|
||||||
whenMerged { classpath ->
|
whenMerged { classpath ->
|
||||||
classpath.entries.findAll { entry ->
|
classpath.entries.findAll { entry ->
|
||||||
entry.path.contains('native-libs') }*.exported = false
|
entry.path.contains('ANDROID_FRAMEWORK') ||
|
||||||
|
entry.path.contains('support') ||
|
||||||
|
entry.path.contains('native-libs')
|
||||||
|
}*.exported = false
|
||||||
|
|
||||||
classpath.entries.removeAll { entry ->
|
classpath.entries.removeAll { entry ->
|
||||||
entry.path.contains('gdx-2') }
|
entry.path.contains('gdx-2') }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Direct manipulation of the generated classpath XML
|
// Direct manipulation of the generated classpath XML
|
||||||
withXml {
|
withXml {
|
||||||
def node = it.asNode()
|
def node = it.asNode()
|
||||||
|
|||||||
@ -8,4 +8,4 @@
|
|||||||
# project structure.
|
# project structure.
|
||||||
|
|
||||||
# Project target.
|
# Project target.
|
||||||
target=android-19
|
target=android-21
|
||||||
|
|||||||
@ -9,13 +9,13 @@
|
|||||||
|
|
||||||
<uses-sdk
|
<uses-sdk
|
||||||
android:minSdkVersion="10"
|
android:minSdkVersion="10"
|
||||||
android:targetSdkVersion="19" />
|
android:targetSdkVersion="21" />
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:label="VTM Start"
|
android:label="VTM Start"
|
||||||
android:icon="@drawable/ic_launcher"
|
android:icon="@drawable/ic_launcher"
|
||||||
android:allowBackup="true"
|
android:allowBackup="true" >
|
||||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
|
<!-- android:theme="@style/AppTheme" -->
|
||||||
<activity
|
<activity
|
||||||
android:name="org.oscim.android.start.TestActivity"
|
android:name="org.oscim.android.start.TestActivity"
|
||||||
android:label="VTM Start" >
|
android:label="VTM Start" >
|
||||||
|
|||||||
@ -1,26 +1,21 @@
|
|||||||
buildscript {
|
apply plugin: 'com.android.application'
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
dependencies {
|
|
||||||
classpath 'com.android.tools.build:gradle:0.12.+'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
configurations { providedCompile }
|
||||||
maven { url "${System.env.ANDROID_HOME}/extras/android/m2repository" }
|
|
||||||
}
|
|
||||||
|
|
||||||
apply plugin: 'android'
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project(':vtm-android')
|
compile project(':vtm-android')
|
||||||
compile project(':vtm-themes')
|
compile project(':vtm-themes')
|
||||||
|
|
||||||
|
compile project(':appcompat')
|
||||||
|
//compile 'com.android.support:support-v4:21.+'
|
||||||
|
//compile 'com.android.support:appcompat-v7:21.0.0'
|
||||||
|
|
||||||
|
compile 'com.noveogroup.android:android-logger:1.3.4'
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 19
|
compileSdkVersion androidTargetSdk()
|
||||||
buildToolsVersion '20.0'
|
buildToolsVersion "$androidBuildVersionTools"
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main {
|
||||||
@ -31,6 +26,11 @@ android {
|
|||||||
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')
|
||||||
}
|
}
|
||||||
@ -39,16 +39,38 @@ android {
|
|||||||
lintOptions.abortOnError false
|
lintOptions.abortOnError false
|
||||||
}
|
}
|
||||||
|
|
||||||
// Including configurations into Eclipse
|
//Including configurations into Eclipse
|
||||||
eclipse {
|
eclipse {
|
||||||
|
|
||||||
// Configuring Eclipse classpath
|
// Configuring Eclipse classpath
|
||||||
classpath {
|
classpath {
|
||||||
plusConfigurations += configurations.compile
|
plusConfigurations += [ configurations.compile ]
|
||||||
|
|
||||||
defaultOutputDir = file('bin/classes')
|
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 {
|
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('ANDROID_FRAMEWORK') ||
|
||||||
|
entry.path.contains('support')
|
||||||
|
}*.exported = false
|
||||||
|
}
|
||||||
|
|
||||||
// Direct manipulation of the generated classpath XML
|
// Direct manipulation of the generated classpath XML
|
||||||
withXml {
|
withXml {
|
||||||
def node = it.asNode()
|
def node = it.asNode()
|
||||||
@ -61,7 +83,6 @@ eclipse {
|
|||||||
project {
|
project {
|
||||||
natures = ['com.android.ide.eclipse.adt.AndroidNature',
|
natures = ['com.android.ide.eclipse.adt.AndroidNature',
|
||||||
'org.eclipse.jdt.core.javanature']
|
'org.eclipse.jdt.core.javanature']
|
||||||
|
|
||||||
buildCommand 'com.android.ide.eclipse.adt.ResourceManagerBuilder'
|
buildCommand 'com.android.ide.eclipse.adt.ResourceManagerBuilder'
|
||||||
buildCommand 'com.android.ide.eclipse.adt.PreCompilerBuilder'
|
buildCommand 'com.android.ide.eclipse.adt.PreCompilerBuilder'
|
||||||
buildCommand 'com.android.ide.eclipse.adt.ApkBuilder'
|
buildCommand 'com.android.ide.eclipse.adt.ApkBuilder'
|
||||||
@ -70,9 +91,9 @@ eclipse {
|
|||||||
|
|
||||||
task run (dependsOn: 'installDebug'){
|
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.jeo.android/.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)}
|
||||||
|
|||||||
@ -11,5 +11,6 @@
|
|||||||
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
||||||
|
|
||||||
# Project target.
|
# Project target.
|
||||||
target=android-19
|
target=android-21
|
||||||
android.library.reference.1=../vtm-android
|
android.library.reference.1=../appcompat
|
||||||
|
android.library.reference.2=../vtm-android
|
||||||
|
|||||||
@ -4,6 +4,6 @@
|
|||||||
|
|
||||||
<uses-sdk
|
<uses-sdk
|
||||||
android:minSdkVersion="10"
|
android:minSdkVersion="10"
|
||||||
android:targetSdkVersion="19" />
|
android:targetSdkVersion="21" />
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
@ -1,41 +1,17 @@
|
|||||||
buildscript {
|
apply plugin: 'com.android.library'
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
dependencies {
|
|
||||||
classpath 'com.android.tools.build:gradle:0.12.+'
|
|
||||||
// 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'
|
apply plugin: 'android-maven'
|
||||||
|
|
||||||
repositories {
|
|
||||||
maven { url "${System.env.ANDROID_HOME}/extras/android/m2repository" }
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
//compile 'org.oscim:vtm:0.5.9-SNAPSHOT'
|
|
||||||
compile project(':vtm')
|
compile project(':vtm')
|
||||||
|
provided files("${rootDir}/vtm-ext-libs/native-libs.jar")
|
||||||
|
|
||||||
compile 'com.android.support:support-v4:19.+'
|
//compile 'com.android.support:support-v4:21.+'
|
||||||
|
compile project(':appcompat')
|
||||||
// -> might be more efficient, but configuring
|
|
||||||
// log-levels is way too complicated...
|
|
||||||
// compile 'org.slf4j:slf4j-android:1.7.6'
|
|
||||||
|
|
||||||
compile 'com.noveogroup.android:android-logger:1.3.1'
|
|
||||||
|
|
||||||
// local jars will be packaged into the aar
|
|
||||||
compile files("${rootDir}/vtm-ext-libs/native-libs.jar")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 19
|
compileSdkVersion androidTargetSdk()
|
||||||
buildToolsVersion '20.0'
|
buildToolsVersion = "$androidBuildVersionTools"
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main {
|
||||||
@ -54,25 +30,31 @@ android {
|
|||||||
|
|
||||||
eclipse {
|
eclipse {
|
||||||
classpath {
|
classpath {
|
||||||
plusConfigurations += configurations.compile
|
plusConfigurations += [ configurations.compile, configurations.provided ]
|
||||||
|
//noExportConfigurations += [ configurations.provided ]
|
||||||
|
|
||||||
//customizing the classes output directory:
|
//customizing the classes output directory:
|
||||||
defaultOutputDir = file('bin/classes')
|
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 {
|
file {
|
||||||
// Manipulation of the classpath XML before merging local
|
// Manipulation of the classpath XML before merging local
|
||||||
// and generated copies
|
// and generated copies
|
||||||
beforeMerged { classpath ->
|
beforeMerged { classpath ->
|
||||||
// Remove all source entries to avoid overlap
|
// Remove all source entries to avoid overlap
|
||||||
classpath.entries.removeAll() { c ->
|
classpath.entries.removeAll() { c -> c.kind == 'src' }
|
||||||
c.kind == 'src'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// only used to explode jni .so into aar
|
// only used to explode jni .so into aar
|
||||||
whenMerged { classpath ->
|
whenMerged {
|
||||||
classpath.entries.findAll { entry ->
|
classpath ->
|
||||||
entry.path.contains('native-libs') }*.exported = false
|
classpath.entries.findAll { entry ->
|
||||||
|
entry.path.contains('native-libs') ||
|
||||||
|
entry.path.contains('ANDROID_FRAMEWORK')
|
||||||
|
}*.exported = false
|
||||||
}
|
}
|
||||||
|
|
||||||
// Direct manipulation of the generated classpath XML
|
// Direct manipulation of the generated classpath XML
|
||||||
@ -83,7 +65,6 @@ eclipse {
|
|||||||
// Main source directory and generated code directory
|
// Main source directory and generated code directory
|
||||||
node.appendNode('classpathentry kind="src" path="src"')
|
node.appendNode('classpathentry kind="src" path="src"')
|
||||||
node.appendNode('classpathentry kind="src" path="gen"')
|
node.appendNode('classpathentry kind="src" path="gen"')
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,8 +10,8 @@
|
|||||||
# Indicates whether an apk should be generated for each density.
|
# Indicates whether an apk should be generated for each density.
|
||||||
split.density=false
|
split.density=false
|
||||||
# Project target.
|
# Project target.
|
||||||
target=android-19
|
target=android-21
|
||||||
|
|
||||||
#proguard.config=proguard.cfg
|
#proguard.config=proguard.cfg
|
||||||
android.library=true
|
android.library=true
|
||||||
android.library.reference.1=../android-v7-appcompat
|
android.library.reference.1=../appcompat
|
||||||
|
|||||||
@ -50,6 +50,7 @@ public class Compass {
|
|||||||
private final SensorManager mSensorManager;
|
private final SensorManager mSensorManager;
|
||||||
private final Sensor mSensor;
|
private final Sensor mSensor;
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public Compass(Context context, Map map) {
|
public Compass(Context context, Map map) {
|
||||||
mMap = map;
|
mMap = map;
|
||||||
mSensorManager = (SensorManager) context
|
mSensorManager = (SensorManager) context
|
||||||
|
|||||||
@ -26,8 +26,8 @@ import org.oscim.map.Map;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Build;
|
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.util.DisplayMetrics;
|
import android.util.DisplayMetrics;
|
||||||
import android.view.GestureDetector;
|
import android.view.GestureDetector;
|
||||||
@ -89,6 +89,7 @@ public class MapView extends RelativeLayout {
|
|||||||
mMap.pause(false);
|
mMap.pause(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressLint("ClickableViewAccessibility")
|
||||||
@Override
|
@Override
|
||||||
public boolean onTouchEvent(android.view.MotionEvent motionEvent) {
|
public boolean onTouchEvent(android.view.MotionEvent motionEvent) {
|
||||||
|
|
||||||
|
|||||||
@ -20,9 +20,11 @@ mainClassName = 'org.oscim.gdx.GdxMapApp'
|
|||||||
//}
|
//}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main.java.srcDirs = ['src']
|
main {
|
||||||
//main.resources.srcDirs = ["${buildDir}/assets"]
|
java.srcDirs = ['src']
|
||||||
output.resourcesDir = 'assets'
|
//main.resources.srcDirs = ["${buildDir}/assets"]
|
||||||
|
output.resourcesDir = 'assets'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
@ -31,7 +33,7 @@ dependencies {
|
|||||||
//compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
|
//compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
|
||||||
compile "com.badlogicgames.gdx:gdx-backend-jglfw:$gdxVersion"
|
compile "com.badlogicgames.gdx:gdx-backend-jglfw:$gdxVersion"
|
||||||
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
|
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
|
||||||
compile 'org.slf4j:slf4j-simple:1.7.5'
|
compile 'org.slf4j:slf4j-simple:1.7.6'
|
||||||
compile files('../vtm-ext-libs/gdx/vtm-jni-natives.jar')
|
compile files('../vtm-ext-libs/gdx/vtm-jni-natives.jar')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -19,9 +19,11 @@ tasks.withType(JavaCompile) { compileTask ->
|
|||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main.java.srcDirs = ['src']
|
main {
|
||||||
main.resources.srcDirs = ["${buildDir}/assets"]
|
java.srcDirs = ['src']
|
||||||
output.resourcesDir = 'assets'
|
resources.srcDirs = ["${buildDir}/assets"]
|
||||||
|
output.resourcesDir = 'assets'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|||||||
@ -333,4 +333,10 @@ public class GwtGraphics implements Graphics {
|
|||||||
public GL30 getGL30() {
|
public GL30 getGL30() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getFrameId() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -944,4 +944,16 @@ public class GwtInput implements Input {
|
|||||||
private static final int KEY_BACKSLASH = 220;
|
private static final int KEY_BACKSLASH = 220;
|
||||||
private static final int KEY_CLOSE_BRACKET = 221;
|
private static final int KEY_CLOSE_BRACKET = 221;
|
||||||
private static final int KEY_SINGLE_QUOTE = 222;
|
private static final int KEY_SINGLE_QUOTE = 222;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isKeyJustPressed(int key) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isCatchBackKey() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,12 +15,20 @@ sourceSets {
|
|||||||
main.compileClasspath += configurations.providedCompile
|
main.compileClasspath += configurations.providedCompile
|
||||||
}
|
}
|
||||||
|
|
||||||
//... there is probably a better way
|
|
||||||
eclipse.classpath {
|
eclipse.classpath {
|
||||||
plusConfigurations += configurations.providedCompile
|
//you can tweak the classpath of the Eclipse project by adding extra configurations:
|
||||||
|
plusConfigurations += [ configurations.providedCompile ]
|
||||||
|
|
||||||
file.whenMerged { classpath ->
|
file.whenMerged { classpath ->
|
||||||
classpath.entries.findAll { entry ->
|
classpath.entries.findAll { entry ->
|
||||||
entry.path.contains('annotations') }*.exported = false
|
entry.path.contains('annotations') }*.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
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user