gradle: update to 2.1 and android targetSdk 21
- add android-appcompat subproject
This commit is contained in:
@@ -9,13 +9,13 @@
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="10"
|
||||
android:targetSdkVersion="19" />
|
||||
android:targetSdkVersion="21" />
|
||||
|
||||
<application
|
||||
android:label="VTM Start"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:allowBackup="true"
|
||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
|
||||
android:allowBackup="true" >
|
||||
<!-- android:theme="@style/AppTheme" -->
|
||||
<activity
|
||||
android:name="org.oscim.android.start.TestActivity"
|
||||
android:label="VTM Start" >
|
||||
|
||||
@@ -1,26 +1,21 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.12.+'
|
||||
}
|
||||
}
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
repositories {
|
||||
maven { url "${System.env.ANDROID_HOME}/extras/android/m2repository" }
|
||||
}
|
||||
|
||||
apply plugin: 'android'
|
||||
configurations { providedCompile }
|
||||
|
||||
dependencies {
|
||||
compile project(':vtm-android')
|
||||
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 {
|
||||
compileSdkVersion 19
|
||||
buildToolsVersion '20.0'
|
||||
compileSdkVersion androidTargetSdk()
|
||||
buildToolsVersion "$androidBuildVersionTools"
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
@@ -31,6 +26,11 @@ android {
|
||||
assets.srcDirs = ['assets']
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
targetCompatibility JavaVersion.VERSION_1_7
|
||||
}
|
||||
|
||||
debug.setRoot('build-types/debug')
|
||||
release.setRoot('build-types/release')
|
||||
}
|
||||
@@ -39,16 +39,38 @@ android {
|
||||
lintOptions.abortOnError false
|
||||
}
|
||||
|
||||
// Including configurations into Eclipse
|
||||
//Including configurations into Eclipse
|
||||
eclipse {
|
||||
|
||||
// Configuring Eclipse classpath
|
||||
classpath {
|
||||
plusConfigurations += configurations.compile
|
||||
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 {
|
||||
// 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
|
||||
withXml {
|
||||
def node = it.asNode()
|
||||
@@ -61,7 +83,6 @@ 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'
|
||||
@@ -70,9 +91,9 @@ eclipse {
|
||||
|
||||
task run (dependsOn: 'installDebug'){
|
||||
doFirst {
|
||||
println(">> adb run...")
|
||||
println(">> adb run <<")
|
||||
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()
|
||||
proc.in.eachLine {line -> println 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
|
||||
|
||||
# Project target.
|
||||
target=android-19
|
||||
android.library.reference.1=../vtm-android
|
||||
target=android-21
|
||||
android.library.reference.1=../appcompat
|
||||
android.library.reference.2=../vtm-android
|
||||
|
||||
Reference in New Issue
Block a user