gradle: update to 2.1 and android targetSdk 21
- add android-appcompat subproject
This commit is contained in:
@@ -1,28 +1,22 @@
|
||||
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-jeo')
|
||||
compile project(':vtm-extras')
|
||||
compile project(':vtm-themes')
|
||||
|
||||
compile project(':appcompat')
|
||||
//compile 'com.android.support:support-v4:21.+'
|
||||
|
||||
compile 'com.noveogroup.android:android-logger:1.3.4'
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 19
|
||||
buildToolsVersion '20.0'
|
||||
compileSdkVersion androidTargetSdk()
|
||||
buildToolsVersion "$androidBuildVersionTools"
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
@@ -33,12 +27,17 @@ 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')
|
||||
}
|
||||
// remove duplicates
|
||||
packagingOptions {
|
||||
exclude 'META-INF/services/org.jeo.data.Driver'
|
||||
exclude 'META-INF/services/org.jeo.data.Driver'
|
||||
exclude 'META-INF/LICENSE'
|
||||
exclude 'META-INF/NOTICE'
|
||||
}
|
||||
@@ -47,35 +46,52 @@ android {
|
||||
lintOptions.abortOnError false
|
||||
}
|
||||
|
||||
// Including configurations into Eclipse
|
||||
eclipse {
|
||||
classpath {
|
||||
plusConfigurations += [ configurations.compile ]
|
||||
|
||||
defaultOutputDir = file('bin/classes')
|
||||
|
||||
// Configuring Eclipse classpath
|
||||
eclipse.classpath {
|
||||
plusConfigurations += configurations.compile
|
||||
containers = ['com.android.ide.eclipse.adt.ANDROID_FRAMEWORK',
|
||||
'com.android.ide.eclipse.adt.LIBRARIES',
|
||||
'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 {
|
||||
// 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"')
|
||||
// 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()
|
||||
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'){
|
||||
doFirst {
|
||||
println(">> adb run...")
|
||||
|
||||
Reference in New Issue
Block a user