c3c8221d4a
Without this building with Gradle adds a 'maxSdkVersion' attribute to the manifest. This seems to cause the targetSdkVersion value being ignored. And with a targetSdkVersion value lower than 16 the permissions READ_CONTACTS/WRITE_CONTACTS imply READ_CALL_LOG/WRITE_CALL_LOG. But we don't need/want those permissions.
116 lines
2.8 KiB
Groovy
116 lines
2.8 KiB
Groovy
buildscript {
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
classpath 'com.android.tools.build:gradle:0.12.2'
|
|
classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.12.0'
|
|
}
|
|
}
|
|
|
|
apply plugin: 'android-sdk-manager'
|
|
apply plugin: 'com.android.application'
|
|
apply plugin: 'checkstyle'
|
|
|
|
repositories {
|
|
jcenter()
|
|
}
|
|
|
|
dependencies {
|
|
compile project(':plugins:Android-PullToRefresh:library')
|
|
compile project(':plugins:ckChangeLog:library')
|
|
compile project(':plugins:HoloColorPicker')
|
|
compile project(':plugins:openpgp-api-library')
|
|
compile 'com.android.support:support-v13:19.1.0'
|
|
compile fileTree(dir: 'libs', include: '*.jar')
|
|
}
|
|
|
|
project.ext.preDexLibs = !project.hasProperty('disablePreDex')
|
|
|
|
subprojects {
|
|
project.plugins.whenPluginAdded { plugin ->
|
|
if ("com.android.build.gradle.AppPlugin".equals(plugin.class.name) ||
|
|
"com.android.build.gradle.LibraryPlugin".equals(plugin.class.name)) {
|
|
project.android.dexOptions.preDexLibraries = rootProject.ext.preDexLibs
|
|
}
|
|
}
|
|
}
|
|
|
|
android {
|
|
compileSdkVersion 19
|
|
buildToolsVersion '20.0.0'
|
|
|
|
defaultConfig {
|
|
minSdkVersion 15
|
|
targetSdkVersion 17
|
|
}
|
|
|
|
dexOptions {
|
|
preDexLibraries = rootProject.ext.preDexLibs
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
manifest.srcFile 'AndroidManifest.xml'
|
|
java.srcDirs = ['src']
|
|
res.srcDirs = ['res']
|
|
assets.srcDirs = ['assets']
|
|
}
|
|
|
|
androidTest {
|
|
manifest.srcFile 'tests/AndroidManifest.xml'
|
|
java.srcDirs = ['tests/src']
|
|
assets.srcDirs = ['tests/assets']
|
|
}
|
|
}
|
|
|
|
signingConfigs {
|
|
release
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
signingConfig signingConfigs.release
|
|
}
|
|
}
|
|
|
|
// Do not abort build if lint finds errors
|
|
lintOptions {
|
|
abortOnError false
|
|
}
|
|
|
|
packagingOptions {
|
|
exclude 'META-INF/DEPENDENCIES'
|
|
exclude 'META-INF/LICENSE'
|
|
exclude 'META-INF/NOTICE'
|
|
}
|
|
}
|
|
|
|
check.dependsOn 'checkstyle'
|
|
task checkstyle(type: Checkstyle) {
|
|
ignoreFailures = true
|
|
configFile file("config/checkstyle/checkstyle.xml")
|
|
|
|
source 'src'
|
|
include '**/*.java'
|
|
classpath = files()
|
|
}
|
|
|
|
task testsOnJVM(type: GradleBuild, dependsOn: assemble) {
|
|
buildFile = 'tests-on-jvm/build.gradle'
|
|
tasks = ['test']
|
|
}
|
|
|
|
if (project.hasProperty('keyAlias')) {
|
|
android.signingConfigs.release.keyAlias = keyAlias
|
|
}
|
|
if (project.hasProperty('keyPassword')) {
|
|
android.signingConfigs.release.keyPassword = keyPassword
|
|
}
|
|
if (project.hasProperty('storeFile')) {
|
|
android.signingConfigs.release.storeFile = file(storeFile)
|
|
}
|
|
if (project.hasProperty('storePassword')) {
|
|
android.signingConfigs.release.storePassword = storePassword
|
|
}
|