Twidere-App-Android-Twitter.../build.gradle

94 lines
3.1 KiB
Groovy
Raw Normal View History

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()
maven { url 'https://plugins.gradle.org/m2/' }
2014-07-03 07:48:39 +02:00
}
dependencies {
2016-08-20 12:59:10 +02:00
classpath 'com.github.ben-manes:gradle-versions-plugin:0.13.0'
classpath 'com.android.tools.build:gradle:2.2.3'
2016-06-21 08:43:11 +02:00
classpath 'com.google.gms:google-services:3.0.0'
2015-10-05 12:00:07 +02:00
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
2015-11-30 06:32:05 +01:00
classpath('fr.avianey.androidsvgdrawable:gradle-plugin:3.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 {
2016-04-27 12:51:06 +02:00
mavenLocal()
2014-07-03 07:48:39 +02:00
jcenter()
maven { url 'https://jitpack.io' }
}
2015-03-11 15:15:32 +01:00
2015-11-22 15:55:29 +01:00
}
subprojects {
2016-12-07 10:50:44 +01:00
buildscript {
2016-12-28 07:29:29 +01:00
ext.kotlin_version = '1.0.6'
2016-12-15 06:11:32 +01:00
ext.android_support_lib_version = '25.1.0'
2016-12-07 10:50:44 +01:00
ext.mariotaku_commons_library_version = '0.9.11'
ext.mariotaku_restfu_version = '0.9.34'
2016-12-15 13:15:58 +01:00
ext.play_services_version = '10.0.1'
2016-12-07 10:50:44 +01:00
}
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 {
2016-10-23 14:51:08 +02:00
compileSdkVersion 25
buildToolsVersion '25.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-26 05:15:04 +01:00
if (System.getenv('TRAVIS') == 'true') {
2015-11-26 04:45:37 +01:00
dexOptions {
preDexLibraries = false;
}
}
2015-11-25 14:21:12 +01:00
if (android.hasProperty('buildTypes') && project.plugins.hasPlugin('com.android.application')) {
android.buildTypes.each { buildType ->
2015-11-30 06:32:05 +01:00
def file = rootProject.file('signing.properties')
2015-11-25 14:42:34 +01:00
if (file.exists()) {
2015-11-30 06:32:05 +01:00
def cfg = signingConfigs.maybeCreate(buildType.name)
2015-11-25 14:42:34 +01:00
loadSigningConfig(cfg, file)
buildType.signingConfig = cfg
}
2015-11-25 14:21:12 +01:00
}
}
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
}
2015-11-30 06:32:05 +01:00
def loadSigningConfig(def cfg, def file) {
2015-11-25 13:14:18 +01:00
Properties signingProp = new Properties()
2015-12-01 02:39:08 +01:00
signingProp.load(file.newInputStream())
2017-01-19 14:05:33 +01:00
cfg.setStoreFile(rootProject.file(signingProp.get('storeFile')))
2015-11-25 13:14:18 +01:00
cfg.setStorePassword((String) signingProp.get('storePassword'))
cfg.setKeyAlias((String) signingProp.get('keyAlias'))
cfg.setKeyPassword((String) signingProp.get('keyPassword'))
}