1
0
mirror of https://github.com/TwidereProject/Twidere-Android synced 2025-01-31 17:04:59 +01:00

99 lines
3.3 KiB
Groovy
Raw Normal View History

apply plugin: 'com.github.ben-manes.versions'
2014-07-03 13:48:39 +08: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 13:48:39 +08:00
}
dependencies {
2016-08-20 18:59:10 +08:00
classpath 'com.github.ben-manes:gradle-versions-plugin:0.13.0'
classpath 'com.android.tools.build:gradle:2.2.3'
2016-06-21 14:43:11 +08:00
classpath 'com.google.gms:google-services:3.0.0'
2015-10-05 18:00:07 +08:00
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
2015-11-30 13:32:05 +08:00
classpath('fr.avianey.androidsvgdrawable:gradle-plugin:3.0.0') {
2015-05-04 23:53:52 +08:00
// should be excluded to avoid conflict
exclude group: 'xerces'
}
2014-07-03 13:48:39 +08:00
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
2016-04-27 18:51:06 +08:00
mavenLocal()
2014-07-03 13:48:39 +08:00
jcenter()
maven { url 'https://jitpack.io' }
}
2015-03-11 22:15:32 +08:00
2015-11-22 22:55:29 +08:00
}
subprojects {
2016-12-07 17:50:44 +08:00
buildscript {
2016-12-28 14:29:29 +08:00
ext.kotlin_version = '1.0.6'
2017-02-01 23:16:26 +08:00
ext.android_support_lib_version = '25.1.1'
2016-12-07 17:50:44 +08:00
ext.mariotaku_commons_library_version = '0.9.11'
2017-02-10 23:38:59 +08:00
ext.mariotaku_restfu_version = '0.9.35'
2016-12-15 20:15:58 +08:00
ext.play_services_version = '10.0.1'
2017-01-21 15:14:26 +08:00
ext.crashlyrics_version = '2.6.6'
ext.fabric_plugin_version = '1.22.0'
ext.dropbox_core_sdk_version = '2.1.2'
ext.google_api_drive_version = 'v3-rev55-1.22.0'
2016-12-07 17:50:44 +08:00
}
2015-11-22 23:38:11 +08:00
afterEvaluate { project ->
2015-11-25 20:14:18 +08:00
2015-11-22 23:38:11 +08:00
if (project.hasProperty('android')) {
android {
2016-10-23 20:51:08 +08:00
compileSdkVersion 25
buildToolsVersion '25.0.2'
2015-11-22 22:55:29 +08:00
2015-11-22 23:38:11 +08:00
lintOptions {
abortOnError false
lintConfig rootProject.file('lint.xml')
}
2015-11-22 22:55:29 +08:00
2015-11-22 23:38:11 +08: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 22:55:29 +08:00
2015-11-26 12:15:04 +08:00
if (System.getenv('TRAVIS') == 'true') {
2015-11-26 11:45:37 +08:00
dexOptions {
preDexLibraries = false;
}
}
2015-11-25 21:21:12 +08:00
if (android.hasProperty('buildTypes') && project.plugins.hasPlugin('com.android.application')) {
android.buildTypes.each { buildType ->
2015-11-30 13:32:05 +08:00
def file = rootProject.file('signing.properties')
2015-11-25 21:42:34 +08:00
if (file.exists()) {
2015-11-30 13:32:05 +08:00
def cfg = signingConfigs.maybeCreate(buildType.name)
2015-11-25 21:42:34 +08:00
loadSigningConfig(cfg, file)
buildType.signingConfig = cfg
}
2015-11-25 21:21:12 +08:00
}
}
2015-11-22 22:55:29 +08:00
}
}
2015-11-22 23:38:11 +08:00
2015-11-25 20:14:18 +08:00
2015-11-22 22:55:29 +08:00
}
2015-11-22 23:38:11 +08:00
2015-11-22 23:29:00 +08:00
}
2015-11-30 13:32:05 +08:00
def loadSigningConfig(def cfg, def file) {
2015-11-25 20:14:18 +08:00
Properties signingProp = new Properties()
2015-12-01 09:39:08 +08:00
signingProp.load(file.newInputStream())
2017-01-19 21:05:33 +08:00
cfg.setStoreFile(rootProject.file(signingProp.get('storeFile')))
2015-11-25 20:14:18 +08:00
cfg.setStorePassword((String) signingProp.get('storePassword'))
cfg.setKeyAlias((String) signingProp.get('keyAlias'))
cfg.setKeyPassword((String) signingProp.get('keyPassword'))
}