1
0
mirror of https://github.com/TwidereProject/Twidere-Android synced 2025-01-31 08:54:57 +01:00

231 lines
9.5 KiB
Groovy
Raw Normal View History

2015-05-04 23:53:52 +08:00
import fr.avianey.androidsvgdrawable.gradle.SvgDrawableTask
2014-07-03 13:48:39 +08:00
apply plugin: 'com.android.application'
2016-06-29 21:47:52 +08:00
apply plugin: 'kotlin-android'
2017-01-09 13:16:23 +08:00
apply plugin: 'kotlin-kapt'
2016-06-29 21:47:52 +08:00
apply plugin: 'kotlin-android-extensions'
2015-11-21 15:26:10 +08:00
apply plugin: 'androidsvgdrawable'
2014-07-03 13:48:39 +08:00
2016-05-13 15:23:03 +08:00
// START Non-FOSS component
2016-05-12 09:37:56 +08:00
apply plugin: 'io.fabric'
2016-05-13 15:23:03 +08:00
// END Non-FOSS component
2016-05-12 09:37:56 +08:00
2016-01-07 12:17:03 +08:00
buildscript {
repositories {
2016-06-29 21:47:52 +08:00
jcenter()
2016-05-13 15:23:03 +08:00
// START Non-FOSS component
2016-01-07 12:17:03 +08:00
maven { url 'https://maven.fabric.io/public' }
2016-05-13 15:23:03 +08:00
// END Non-FOSS component
2016-01-07 12:17:03 +08:00
}
dependencies {
2016-05-13 15:23:03 +08:00
// START Non-FOSS component
2017-03-04 13:02:41 +08:00
classpath "io.fabric.tools:gradle:${libVersions["FabricPlugin"]}"
2016-05-13 15:23:03 +08:00
// END Non-FOSS component
2016-06-29 21:47:52 +08:00
2017-03-04 13:02:41 +08:00
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${libVersions['Kotlin']}"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:${libVersions['Kotlin']}"
2016-01-07 12:17:03 +08:00
}
}
2014-07-03 13:48:39 +08:00
android {
defaultConfig {
applicationId "org.mariotaku.twidere"
2016-03-17 11:58:41 +08:00
minSdkVersion 14
2016-10-23 20:51:08 +08:00
targetSdkVersion 25
versionCode 299
versionName '3.4.37'
multiDexEnabled true
2015-11-25 08:47:30 +08:00
2016-12-09 18:53:10 +08:00
buildConfigField 'boolean', 'LEAK_CANARY_ENABLED', 'Boolean.parseBoolean("true")'
2016-03-04 11:54:27 +08:00
buildConfigField 'boolean', 'SHOW_CUSTOM_TOKEN_DIALOG', 'Boolean.parseBoolean("false")'
2016-12-16 23:21:50 +08:00
buildConfigField 'boolean', 'HOTMOBI_LOG_ENABLED', 'Boolean.parseBoolean("false")'
2016-01-01 18:57:18 +08:00
2016-01-29 12:13:38 +08:00
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
2014-07-03 13:48:39 +08:00
}
2016-03-05 23:16:17 +08:00
aaptOptions {
additionalParameters "--no-version-vectors"
}
productFlavors {
2016-05-13 15:23:03 +08:00
// START Non-FOSS component
2016-01-07 12:17:03 +08:00
google {}
2016-05-13 15:23:03 +08:00
// END Non-FOSS component
2016-01-07 12:17:03 +08:00
fdroid {}
}
buildTypes {
debug {
2017-02-16 01:03:48 +08:00
minifyEnabled false
shrinkResources false
2015-12-29 20:25:16 +08:00
resValue("bool", "debug", "true")
}
2015-03-29 15:36:51 +08:00
release {
2015-11-22 22:55:29 +08:00
minifyEnabled false
shrinkResources false
2015-11-22 22:55:29 +08:00
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
2015-12-29 20:25:16 +08:00
resValue("bool", "debug", "false")
2015-03-29 15:36:51 +08:00
}
}
2016-07-06 21:21:34 +08:00
sourceSets.each {
it.res.srcDirs += project.files("src/${it.name}/res-localized")
it.res.srcDirs += project.files("src/${it.name}/res-svg2png")
it.java.srcDirs += "src/${it.name}/kotlin"
2015-03-29 19:06:55 +08:00
}
testOptions {
unitTests.returnDefaultValues = true
}
2016-04-04 17:22:36 +08:00
2014-07-03 13:48:39 +08:00
}
repositories {
2016-06-29 21:47:52 +08:00
mavenLocal()
maven { url 'https://s3.amazonaws.com/repo.commonsware.com' }
2016-05-13 15:23:03 +08:00
// START Non-FOSS component
2015-12-29 15:26:52 +08:00
maven { url 'https://maven.fabric.io/public' }
2016-05-13 15:23:03 +08:00
// END Non-FOSS component
2015-12-20 19:54:05 +08:00
flatDir { dirs "$projectDir/lib" }
}
2014-07-03 13:48:39 +08:00
dependencies {
// wearApp project(':twidere.wear')
2017-03-04 13:02:41 +08:00
kapt "com.bluelinelabs:logansquare-compiler:${libVersions['LoganSquare']}"
2016-06-29 21:47:52 +08:00
kapt 'com.hannesdorfmann.parcelableplease:processor:1.0.2'
2016-12-15 20:15:58 +08:00
kapt 'com.google.dagger:dagger-compiler:2.8'
2017-03-05 17:04:26 +08:00
kapt "com.github.mariotaku.ObjectCursor:processor:${libVersions['ObjectCursor']}"
2016-02-13 15:26:23 +08:00
compile project(':twidere.component.common')
compile project(':twidere.component.nyan')
2016-05-13 15:23:03 +08:00
// START Non-FOSS component
2017-03-04 13:02:41 +08:00
googleCompile "com.google.android.gms:play-services-maps:${libVersions['PlayServices']}"
googleCompile "com.google.android.gms:play-services-auth:${libVersions['PlayServices']}"
googleCompile "com.google.maps.android:android-maps-utils:${libVersions['MapsUtils']}"
googleCompile("com.crashlytics.sdk.android:crashlytics:${libVersions['Crashlyrics']}@aar") {
2017-01-22 00:33:20 +08:00
transitive = true
}
2017-03-04 13:02:41 +08:00
googleCompile "com.anjlab.android.iab.v3:library:${libVersions['IABv3']}"
googleCompile "com.dropbox.core:dropbox-core-sdk:${libVersions['DropboxCoreSdk']}"
googleCompile("com.google.apis:google-api-services-drive:${libVersions['GoogleDriveApi']}") {
2017-01-22 00:33:20 +08:00
exclude group: 'org.apache.httpcomponents'
}
2016-05-13 15:23:03 +08:00
// END Non-FOSS component
2017-03-04 02:19:08 +08:00
fdroidCompile 'org.osmdroid:osmdroid-android:5.6.4'
debugCompile "com.facebook.stetho:stetho:${libVersions['Stetho']}"
debugCompile "com.facebook.stetho:stetho-okhttp3:${libVersions['Stetho']}"
debugCompile "com.facebook.stetho:stetho-js-rhino:${libVersions['Stetho']}"
2016-12-09 18:53:10 +08:00
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5'
debugCompile('com.jayway.jsonpath:json-path:2.2.0') {
exclude group: 'net.minidev', module: 'json-smart'
}
provided 'javax.annotation:jsr250-api:1.0'
testCompile 'junit:junit:4.12'
2017-03-04 13:02:41 +08:00
androidTestCompile "com.android.support:support-annotations:${libVersions['SupportLib']}"
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support.test:rules:0.5'
compile 'com.android.support:multidex:1.0.1'
2017-03-04 13:02:41 +08:00
compile "com.android.support:support-v4:${libVersions['SupportLib']}"
compile "com.android.support:appcompat-v7:${libVersions['SupportLib']}"
compile "com.android.support:cardview-v7:${libVersions['SupportLib']}"
compile "com.android.support:recyclerview-v7:${libVersions['SupportLib']}"
compile "com.android.support:preference-v7:${libVersions['SupportLib']}"
compile "com.android.support:preference-v14:${libVersions['SupportLib']}"
compile "com.android.support:customtabs:${libVersions['SupportLib']}"
compile "com.android.support:design:${libVersions['SupportLib']}"
compile "com.android.support:percent:${libVersions['SupportLib']}"
compile 'com.twitter:twitter-text:1.14.3'
compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.6.0'
2015-08-16 17:34:49 +08:00
compile 'com.squareup:otto:1.3.8'
2017-03-04 02:19:08 +08:00
compile 'dnsjava:dnsjava:2.1.8'
2016-12-15 20:15:58 +08:00
compile 'com.commonsware.cwac:layouts:0.4.3'
2015-07-17 22:30:41 +08:00
compile 'com.rengwuxian.materialedittext:library:2.1.4'
2015-10-05 18:00:07 +08:00
compile 'com.pnikosis:materialish-progress:1.7'
2016-09-09 13:08:13 +08:00
compile 'com.github.mariotaku:MessageBubbleView:1.6'
compile 'com.github.mariotaku:DragSortListView:0.6.1'
compile 'com.github.uucky:ColorPicker-Android:0.9.7@aar'
2017-03-04 02:19:08 +08:00
compile 'pl.droidsonroids.gif:android-gif-drawable:1.2.3'
compile 'com.sprylab.android.texturevideoview:texturevideoview:1.2.1'
2015-10-05 18:00:07 +08:00
compile 'com.squareup:pollexor:2.0.4'
compile 'org.apache.commons:commons-lang3:3.5'
2015-10-05 19:09:54 +08:00
compile 'commons-primitives:commons-primitives:1.0'
2017-03-04 13:02:41 +08:00
compile "org.apache.james:apache-mime4j-core:${libVersions['Mime4J']}"
compile "org.apache.james:apache-mime4j-storage:${libVersions['Mime4J']}"
compile "com.bluelinelabs:logansquare:${libVersions['LoganSquare']}"
2015-10-05 18:00:07 +08:00
compile 'com.soundcloud.android:android-crop:1.0.1@aar'
2016-01-04 11:32:48 +08:00
compile 'com.hannesdorfmann.parcelableplease:annotation:1.0.2'
2017-03-03 23:30:02 +08:00
compile 'com.github.mariotaku:PickNCrop:0.9.21'
2017-03-04 13:02:41 +08:00
compile "com.github.mariotaku.RestFu:library:${libVersions['RestFu']}"
compile "com.github.mariotaku.RestFu:okhttp3:${libVersions['RestFu']}"
2017-03-04 02:19:08 +08:00
compile 'com.squareup.okhttp3:okhttp:3.6.0'
2015-09-02 15:03:17 +08:00
compile 'com.lnikkila:extendedtouchview:0.1.0'
2016-12-15 20:15:58 +08:00
compile 'com.google.dagger:dagger:2.8'
2017-03-04 02:19:08 +08:00
compile 'org.attoparser:attoparser:2.0.3.RELEASE'
compile 'com.getkeepsafe.taptargetview:taptargetview:1.8.0'
2017-01-23 13:27:29 +08:00
compile 'net.ypresto.androidtranscoder:android-transcoder:0.2.0'
2017-03-04 13:02:41 +08:00
compile "com.google.android.exoplayer:exoplayer:${libVersions['Exoplayer']}"
compile "com.google.android.exoplayer:extension-okhttp:${libVersions['Exoplayer']}"
2017-03-01 22:12:25 +08:00
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.github.bumptech.glide:okhttp3-integration:1.4.0@aar'
2017-03-02 09:08:54 +08:00
compile 'jp.wasabeef:glide-transformations:2.0.1'
2017-03-06 16:36:25 +08:00
compile 'com.github.mariotaku.MediaViewerLibrary:base:0.9.23'
compile 'com.github.mariotaku.MediaViewerLibrary:subsample-image-view:0.9.23'
compile 'com.github.mariotaku:SQLiteQB:0.9.10'
2017-03-04 13:02:41 +08:00
compile "com.github.mariotaku.ObjectCursor:core:${libVersions['ObjectCursor']}"
2016-08-19 16:45:22 +08:00
compile 'com.github.mariotaku:MultiValueSwitch:0.9.7'
2016-07-06 09:18:12 +08:00
compile 'com.github.mariotaku:AbstractTask:0.9.4'
2017-03-04 13:02:41 +08:00
compile "com.github.mariotaku.CommonsLibrary:parcel:${libVersions['MariotakuCommons']}"
compile "com.github.mariotaku.CommonsLibrary:io:${libVersions['MariotakuCommons']}"
compile "com.github.mariotaku.CommonsLibrary:text:${libVersions['MariotakuCommons']}"
compile "com.github.mariotaku.CommonsLibrary:text-kotlin:${libVersions['MariotakuCommons']}"
2016-12-17 12:10:24 +08:00
compile 'com.github.mariotaku:KPreferences:0.9.5'
2017-03-06 16:36:25 +08:00
compile 'com.github.mariotaku:Chameleon:0.9.16'
2017-03-04 13:02:41 +08:00
compile "org.jetbrains.kotlin:kotlin-stdlib:${libVersions['Kotlin']}"
compile 'nl.komponents.kovenant:kovenant:3.3.0'
compile 'nl.komponents.kovenant:kovenant-android:3.3.0'
compile 'nl.komponents.kovenant:kovenant-functional:3.3.0'
2016-12-02 12:36:50 +08:00
compile 'nl.komponents.kovenant:kovenant-combine:3.3.0'
2015-05-04 23:53:52 +08:00
}
2015-06-24 23:13:03 +08:00
task svgToDrawable(type: SvgDrawableTask) {
2015-05-04 23:53:52 +08:00
// specify where to pick SVG from
2015-11-30 13:32:05 +08:00
from = files('src/main/svg/drawable')
2015-05-04 23:53:52 +08:00
// specify the android res folder
to = file('src/main/res-svg2png')
// override files only if necessary
2015-11-30 13:32:05 +08:00
overwriteMode = 'ifModified'
2015-05-04 23:53:52 +08:00
// let generate PNG for the following densities only
targetedDensities = ['hdpi', 'mdpi', 'xhdpi', 'xxhdpi', 'xxxhdpi']
// relative path of the file specifying nine patch specs
2015-06-24 23:13:03 +08:00
ninePatchConfig = file('src/main/svg/drawable/9patch.json')
2015-05-04 23:53:52 +08:00
// output format of the generated resources
outputFormat = 'PNG'
2015-06-24 23:13:03 +08:00
outputType = 'drawable'
2016-01-03 18:24:10 +08:00
}
task svgToMipmap(type: SvgDrawableTask) {
// specify where to pick SVG from
from = files('src/main/svg/mipmap')
// specify the android res folder
to = file('src/main/res-svg2png')
// override files only if necessary
overwriteMode = 'ifModified'
// let generate PNG for the following densities only
targetedDensities = ['hdpi', 'mdpi', 'xhdpi', 'xxhdpi', 'xxxhdpi']
// output format of the generated resources
outputFormat = 'PNG'
outputType = 'mipmap'
2016-04-03 20:30:31 +08:00
}
2016-05-12 09:37:56 +08:00
2016-05-13 15:23:03 +08:00
// START Non-FOSS component
2016-05-12 09:37:56 +08:00
apply plugin: 'com.google.gms.google-services'
2016-05-13 15:23:03 +08:00
// END Non-FOSS component