gradle: update to 2.1 and android targetSdk 21
- add android-appcompat subproject
This commit is contained in:
@@ -4,6 +4,6 @@
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="10"
|
||||
android:targetSdkVersion="19" />
|
||||
android:targetSdkVersion="21" />
|
||||
|
||||
</manifest>
|
||||
@@ -1,41 +1,17 @@
|
||||
buildscript {
|
||||
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: 'com.android.library'
|
||||
apply plugin: 'android-maven'
|
||||
|
||||
repositories {
|
||||
maven { url "${System.env.ANDROID_HOME}/extras/android/m2repository" }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
//compile 'org.oscim:vtm:0.5.9-SNAPSHOT'
|
||||
compile project(':vtm')
|
||||
provided files("${rootDir}/vtm-ext-libs/native-libs.jar")
|
||||
|
||||
compile 'com.android.support:support-v4:19.+'
|
||||
|
||||
// -> 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")
|
||||
//compile 'com.android.support:support-v4:21.+'
|
||||
compile project(':appcompat')
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 19
|
||||
buildToolsVersion '20.0'
|
||||
compileSdkVersion androidTargetSdk()
|
||||
buildToolsVersion = "$androidBuildVersionTools"
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
@@ -54,25 +30,31 @@ android {
|
||||
|
||||
eclipse {
|
||||
classpath {
|
||||
plusConfigurations += configurations.compile
|
||||
plusConfigurations += [ configurations.compile, configurations.provided ]
|
||||
//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() { c ->
|
||||
c.kind == 'src'
|
||||
}
|
||||
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
|
||||
whenMerged {
|
||||
classpath ->
|
||||
classpath.entries.findAll { entry ->
|
||||
entry.path.contains('native-libs') ||
|
||||
entry.path.contains('ANDROID_FRAMEWORK')
|
||||
}*.exported = false
|
||||
}
|
||||
|
||||
// Direct manipulation of the generated classpath XML
|
||||
@@ -83,7 +65,6 @@ eclipse {
|
||||
// Main source directory and generated code directory
|
||||
node.appendNode('classpathentry kind="src" path="src"')
|
||||
node.appendNode('classpathentry kind="src" path="gen"')
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
# Indicates whether an apk should be generated for each density.
|
||||
split.density=false
|
||||
# Project target.
|
||||
target=android-19
|
||||
target=android-21
|
||||
|
||||
#proguard.config=proguard.cfg
|
||||
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 Sensor mSensor;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public Compass(Context context, Map map) {
|
||||
mMap = map;
|
||||
mSensorManager = (SensorManager) context
|
||||
|
||||
@@ -26,8 +26,8 @@ import org.oscim.map.Map;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.GestureDetector;
|
||||
@@ -89,6 +89,7 @@ public class MapView extends RelativeLayout {
|
||||
mMap.pause(false);
|
||||
}
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
@Override
|
||||
public boolean onTouchEvent(android.view.MotionEvent motionEvent) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user