1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-05 09:05:08 -05:00
k-9/build.gradle

117 lines
2.8 KiB
Groovy
Raw Normal View History

2013-05-25 17:14:46 -04:00
buildscript {
2014-09-18 09:18:41 -04:00
repositories {
mavenCentral()
}
2013-05-25 17:14:46 -04:00
2014-09-18 09:18:41 -04:00
dependencies {
classpath 'com.android.tools.build:gradle:0.12.2'
classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.12.0'
}
2013-05-25 17:14:46 -04:00
}
apply plugin: 'android-sdk-manager'
apply plugin: 'com.android.application'
2014-08-31 18:29:48 -04:00
apply plugin: 'checkstyle'
2013-05-25 17:14:46 -04:00
repositories {
jcenter()
}
2013-05-25 17:14:46 -04:00
dependencies {
2014-09-18 09:18:41 -04:00
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')
2013-05-25 17:14:46 -04:00
}
2014-08-30 19:10:13 -04:00
project.ext.preDexLibs = !project.hasProperty('disablePreDex')
subprojects {
2014-09-18 09:18:41 -04:00
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
}
2014-08-30 19:10:13 -04:00
}
}
2013-05-25 17:14:46 -04:00
android {
2014-09-18 09:18:41 -04:00
compileSdkVersion 19
buildToolsVersion '20.0.0'
2014-08-30 19:10:13 -04:00
defaultConfig {
minSdkVersion 15
targetSdkVersion 17
}
2014-09-18 09:18:41 -04:00
dexOptions {
preDexLibraries = rootProject.ext.preDexLibs
2013-05-25 17:14:46 -04:00
}
2014-09-18 09:18:41 -04:00
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
}
}
2014-09-18 09:18:41 -04:00
// Do not abort build if lint finds errors
lintOptions {
abortOnError false
}
2014-09-18 09:18:41 -04:00
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
}
2013-05-25 17:14:46 -04:00
}
2014-04-29 08:48:51 -04:00
2014-08-31 18:29:48 -04:00
check.dependsOn 'checkstyle'
task checkstyle(type: Checkstyle) {
ignoreFailures = true
configFile file("config/checkstyle/checkstyle.xml")
source 'src'
include '**/*.java'
classpath = files()
}
2014-09-18 09:18:41 -04:00
task testsOnJVM(type: GradleBuild, dependsOn: assemble) {
buildFile = 'tests-on-jvm/build.gradle'
tasks = ['test']
2014-04-29 08:48:51 -04:00
}
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
}