2015-11-25 13:14:18 +01:00
|
|
|
import com.android.builder.signing.DefaultSigningConfig;
|
|
|
|
|
2015-01-04 16:12:10 +01:00
|
|
|
apply plugin: 'com.github.ben-manes.versions'
|
|
|
|
|
2014-07-03 07:48:39 +02:00
|
|
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
jcenter()
|
2015-11-05 11:55:03 +01:00
|
|
|
maven { url 'https://plugins.gradle.org/m2/' }
|
2014-07-03 07:48:39 +02:00
|
|
|
}
|
|
|
|
dependencies {
|
2015-07-17 16:30:41 +02:00
|
|
|
classpath 'com.github.ben-manes:gradle-versions-plugin:0.11.3'
|
2015-11-21 08:26:10 +01:00
|
|
|
classpath 'com.android.tools.build:gradle:1.5.0'
|
2015-10-05 12:00:07 +02:00
|
|
|
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
|
|
|
|
classpath('fr.avianey.androidsvgdrawable:gradle-plugin:2.0.0') {
|
2015-05-04 17:53:52 +02:00
|
|
|
// should be excluded to avoid conflict
|
|
|
|
exclude group: 'xerces'
|
|
|
|
}
|
2014-07-03 07:48:39 +02:00
|
|
|
// NOTE: Do not place your application dependencies here; they belong
|
|
|
|
// in the individual module build.gradle files
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
allprojects {
|
|
|
|
repositories {
|
|
|
|
jcenter()
|
2015-11-05 11:55:03 +01:00
|
|
|
maven { url 'https://jitpack.io' }
|
2014-11-21 04:00:46 +01:00
|
|
|
}
|
2015-03-11 15:15:32 +01:00
|
|
|
|
2015-11-22 15:55:29 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
subprojects {
|
2015-11-22 16:38:11 +01:00
|
|
|
afterEvaluate { project ->
|
2015-11-25 13:14:18 +01:00
|
|
|
|
2015-11-22 16:38:11 +01:00
|
|
|
if (project.hasProperty('android')) {
|
|
|
|
android {
|
|
|
|
compileSdkVersion 23
|
2015-11-25 08:33:18 +01:00
|
|
|
buildToolsVersion '23.0.2'
|
2015-11-22 15:55:29 +01:00
|
|
|
|
2015-11-22 16:38:11 +01:00
|
|
|
lintOptions {
|
|
|
|
abortOnError false
|
|
|
|
lintConfig rootProject.file('lint.xml')
|
|
|
|
}
|
2015-11-22 15:55:29 +01:00
|
|
|
|
2015-11-22 16:38:11 +01:00
|
|
|
packagingOptions {
|
|
|
|
exclude 'META-INF/DEPENDENCIES'
|
|
|
|
exclude 'META-INF/LICENSE'
|
|
|
|
exclude 'META-INF/LICENSE.txt'
|
|
|
|
exclude 'META-INF/license.txt'
|
|
|
|
exclude 'META-INF/NOTICE'
|
|
|
|
exclude 'META-INF/NOTICE.txt'
|
|
|
|
exclude 'META-INF/notice.txt'
|
|
|
|
exclude 'META-INF/ASL2.0'
|
|
|
|
}
|
2015-11-22 15:55:29 +01:00
|
|
|
|
2015-11-25 14:21:12 +01:00
|
|
|
if (android.hasProperty('buildTypes') && project.plugins.hasPlugin('com.android.application')) {
|
|
|
|
android.buildTypes.each { buildType ->
|
|
|
|
def cfg = signingConfigs.maybeCreate(buildType.name)
|
|
|
|
loadSigningConfig(cfg, rootProject.file('signing.properties'))
|
|
|
|
buildType.signingConfig = cfg
|
|
|
|
}
|
|
|
|
}
|
2015-11-22 15:55:29 +01:00
|
|
|
}
|
|
|
|
}
|
2015-11-22 16:38:11 +01:00
|
|
|
|
2015-11-25 13:14:18 +01:00
|
|
|
|
2015-11-22 15:55:29 +01:00
|
|
|
}
|
2015-11-22 16:38:11 +01:00
|
|
|
|
2015-11-22 16:29:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
task clean(type: Delete) {
|
|
|
|
delete(rootProject.buildDir)
|
|
|
|
}
|
|
|
|
|
|
|
|
task wrapper(type: Wrapper) {
|
|
|
|
gradleVersion = '2.9'
|
2015-11-25 13:14:18 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
def loadSigningConfig(DefaultSigningConfig cfg, File file) {
|
|
|
|
Properties signingProp = new Properties()
|
|
|
|
signingProp.load(file.newDataInputStream())
|
|
|
|
cfg.setStoreFile(new File((String) signingProp.get('storeFile')))
|
|
|
|
cfg.setStorePassword((String) signingProp.get('storePassword'))
|
|
|
|
cfg.setKeyAlias((String) signingProp.get('keyAlias'))
|
|
|
|
cfg.setKeyPassword((String) signingProp.get('keyPassword'))
|
2014-11-21 04:00:46 +01:00
|
|
|
}
|