1
0
mirror of https://github.com/TwidereProject/Twidere-Android synced 2024-12-20 20:44:05 +01:00
Twidere-App-Android-Twitter.../build.gradle
Mariotaku Lee 337cf8acdb removed ignore ssl errors option
updating version code - fix #286
2016-02-07 22:09:45 +08:00

93 lines
2.9 KiB
Groovy

apply plugin: 'com.github.ben-manes.versions'
// 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/' }
}
dependencies {
classpath 'com.github.ben-manes:gradle-versions-plugin:0.12.0'
classpath 'com.android.tools.build:gradle:1.5.0'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath('fr.avianey.androidsvgdrawable:gradle-plugin:3.0.0') {
// should be excluded to avoid conflict
exclude group: 'xerces'
}
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven { url 'https://jitpack.io' }
}
}
subprojects {
afterEvaluate { project ->
if (project.hasProperty('android')) {
android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
lintOptions {
abortOnError false
lintConfig rootProject.file('lint.xml')
}
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'
}
if (System.getenv('TRAVIS') == 'true') {
dexOptions {
preDexLibraries = false;
}
}
if (android.hasProperty('buildTypes') && project.plugins.hasPlugin('com.android.application')) {
android.buildTypes.each { buildType ->
def file = rootProject.file('signing.properties')
if (file.exists()) {
def cfg = signingConfigs.maybeCreate(buildType.name)
loadSigningConfig(cfg, file)
buildType.signingConfig = cfg
}
}
}
}
}
}
}
task clean(type: Delete) {
delete(rootProject.buildDir)
}
task wrapper(type: Wrapper) {
gradleVersion = '2.9'
}
def loadSigningConfig(def cfg, def file) {
Properties signingProp = new Properties()
signingProp.load(file.newInputStream())
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'))
}