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 {
|
2014-12-08 18:41:10 -05:00
|
|
|
classpath 'com.android.tools.build:gradle:1.0.0'
|
2014-09-18 09:18:41 -04:00
|
|
|
classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.12.0'
|
|
|
|
}
|
2013-05-25 17:14:46 -04:00
|
|
|
}
|
|
|
|
|
2014-08-29 00:09:56 -04:00
|
|
|
apply plugin: 'android-sdk-manager'
|
2014-07-26 12:06:20 -04:00
|
|
|
apply plugin: 'com.android.application'
|
2014-08-31 18:29:48 -04:00
|
|
|
apply plugin: 'checkstyle'
|
2014-12-18 01:51:34 -05:00
|
|
|
apply plugin: 'findbugs'
|
2013-05-25 17:14:46 -04:00
|
|
|
|
2014-08-29 00:09:56 -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')
|
2014-10-11 12:03:57 -04:00
|
|
|
compile 'org.apache.james:apache-mime4j-core:0.7.2'
|
|
|
|
compile 'org.apache.james:apache-mime4j-dom:0.7.2'
|
|
|
|
compile 'commons-io:commons-io:2.0.1'
|
2014-11-12 13:53:05 -05:00
|
|
|
compile 'com.jcraft:jzlib:1.0.7'
|
|
|
|
compile 'com.beetstra.jutf7:jutf7:1.0.0'
|
2014-12-04 00:57:50 -05:00
|
|
|
compile 'com.android.support:support-v4:21.0.2'
|
|
|
|
compile 'com.android.support:support-v13:21.0.2'
|
2014-11-12 13:53:05 -05:00
|
|
|
compile 'net.sourceforge.htmlcleaner:htmlcleaner:2.2'
|
2013-05-25 17:14:46 -04:00
|
|
|
}
|
|
|
|
|
2014-08-30 19:10:13 -04:00
|
|
|
project.ext.preDexLibs = !project.hasProperty('disablePreDex')
|
2014-12-18 06:50:33 -05:00
|
|
|
project.ext.testCoverage = project.hasProperty('testCoverage')
|
2014-08-30 19:10:13 -04:00
|
|
|
|
|
|
|
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-12-04 00:57:50 -05:00
|
|
|
compileSdkVersion 21
|
2014-12-18 06:50:33 -05:00
|
|
|
buildToolsVersion '21.1.2'
|
2014-08-30 19:10:13 -04:00
|
|
|
|
2014-10-10 13:15:48 -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
|
|
|
}
|
2013-05-25 19:46:55 -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']
|
|
|
|
}
|
2013-05-25 19:46:55 -04:00
|
|
|
}
|
2014-01-03 19:40:56 -05:00
|
|
|
|
2014-10-07 21:40:25 -04:00
|
|
|
signingConfigs {
|
|
|
|
release
|
|
|
|
}
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
release {
|
2014-12-17 06:47:39 -05:00
|
|
|
if (project.hasProperty('storeFile')) {
|
|
|
|
signingConfig signingConfigs.release
|
|
|
|
}
|
2014-10-07 21:40:25 -04:00
|
|
|
}
|
2014-12-18 06:50:33 -05:00
|
|
|
|
|
|
|
debug {
|
|
|
|
testCoverageEnabled rootProject.testCoverage
|
|
|
|
}
|
2014-10-07 21:40:25 -04:00
|
|
|
}
|
|
|
|
|
2014-09-18 09:18:41 -04:00
|
|
|
// Do not abort build if lint finds errors
|
|
|
|
lintOptions {
|
|
|
|
abortOnError false
|
|
|
|
}
|
2014-01-03 19:40:56 -05:00
|
|
|
|
2014-09-18 09:18:41 -04:00
|
|
|
packagingOptions {
|
|
|
|
exclude 'META-INF/DEPENDENCIES'
|
|
|
|
exclude 'META-INF/LICENSE'
|
2014-10-11 12:03:57 -04:00
|
|
|
exclude 'META-INF/LICENSE.txt'
|
2014-09-18 09:18:41 -04:00
|
|
|
exclude 'META-INF/NOTICE'
|
2014-10-11 12:03:57 -04:00
|
|
|
exclude 'META-INF/NOTICE.txt'
|
2014-09-18 09:18:41 -04:00
|
|
|
}
|
2014-12-18 04:07:18 -05:00
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility JavaVersion.VERSION_1_6
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_6
|
|
|
|
}
|
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")
|
|
|
|
|
2014-12-18 01:51:34 -05:00
|
|
|
source = project.android.sourceSets.main.java.getSrcDirs() +
|
|
|
|
project.android.sourceSets.androidTest.java.getSrcDirs()
|
2014-08-31 18:29:48 -04:00
|
|
|
include '**/*.java'
|
|
|
|
classpath = files()
|
|
|
|
}
|
|
|
|
|
2014-12-18 01:51:34 -05:00
|
|
|
check.dependsOn 'findbugs'
|
|
|
|
task findbugs(type: FindBugs, dependsOn: [':compileDebugJava', ':compileDebugTestJava']) {
|
|
|
|
ignoreFailures = true
|
|
|
|
classes = fileTree('build/intermediates/classes/debug/') +
|
|
|
|
fileTree('build/intermediates/classes/test/debug/')
|
|
|
|
source = project.android.sourceSets.main.java.getSrcDirs() +
|
|
|
|
project.android.sourceSets.androidTest.java.getSrcDirs()
|
|
|
|
classpath = files()
|
|
|
|
effort = 'max'
|
|
|
|
includeFilter = file("$rootProject.projectDir/config/findbugs/include_filter.xml")
|
|
|
|
excludeFilter = file("$rootProject.projectDir/config/findbugs/exclude_filter.xml")
|
|
|
|
}
|
|
|
|
|
2014-10-07 21:40:25 -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
|
|
|
|
}
|