2015-05-04 17:53:52 +02:00
|
|
|
import fr.avianey.androidsvgdrawable.gradle.SvgDrawableTask
|
|
|
|
|
2014-07-03 07:48:39 +02:00
|
|
|
apply plugin: 'com.android.application'
|
2016-06-29 15:47:52 +02:00
|
|
|
apply plugin: 'kotlin-android'
|
2017-01-09 06:16:23 +01:00
|
|
|
apply plugin: 'kotlin-kapt'
|
2016-06-29 15:47:52 +02:00
|
|
|
apply plugin: 'kotlin-android-extensions'
|
2015-11-21 08:26:10 +01:00
|
|
|
apply plugin: 'androidsvgdrawable'
|
2014-07-03 07:48:39 +02:00
|
|
|
|
2016-05-13 09:23:03 +02:00
|
|
|
// START Non-FOSS component
|
2017-03-15 10:14:02 +01:00
|
|
|
apply plugin: 'com.github.triplet.play'
|
2016-05-13 09:23:03 +02:00
|
|
|
// END Non-FOSS component
|
2016-05-12 03:37:56 +02:00
|
|
|
|
2016-01-07 05:17:03 +01:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
2016-06-29 15:47:52 +02:00
|
|
|
jcenter()
|
2016-01-07 05:17:03 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2017-06-20 03:42:36 +02:00
|
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}"
|
|
|
|
classpath "org.jetbrains.kotlin:kotlin-android-extensions:${kotlinVersion}"
|
|
|
|
classpath("fr.avianey.androidsvgdrawable:gradle-plugin:${pluginVersions['AndroidSvgDrawable']}") {
|
2017-04-25 19:54:47 +02:00
|
|
|
// should be excluded to avoid conflict
|
|
|
|
exclude group: 'xerces'
|
|
|
|
}
|
2017-06-20 03:42:36 +02:00
|
|
|
|
|
|
|
// START Non-FOSS component
|
|
|
|
classpath "com.github.triplet.gradle:play-publisher:${pluginVersions['PlayPublisher']}"
|
|
|
|
classpath "com.google.gms:google-services:${pluginVersions['PlayServices']}"
|
|
|
|
// END Non-FOSS component
|
2016-01-07 05:17:03 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-07-03 07:48:39 +02:00
|
|
|
android {
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
applicationId "org.mariotaku.twidere"
|
2017-05-21 04:09:36 +02:00
|
|
|
minSdkVersion 14
|
2017-06-19 15:45:41 +02:00
|
|
|
targetSdkVersion 26
|
2017-06-09 17:09:04 +02:00
|
|
|
versionCode projectVersionCode
|
|
|
|
versionName projectVersionName
|
2015-01-17 19:58:29 +01:00
|
|
|
multiDexEnabled true
|
2015-11-25 01:47:30 +01:00
|
|
|
|
2016-12-09 11:53:10 +01:00
|
|
|
buildConfigField 'boolean', 'LEAK_CANARY_ENABLED', 'Boolean.parseBoolean("true")'
|
2016-03-04 04:54:27 +01:00
|
|
|
buildConfigField 'boolean', 'SHOW_CUSTOM_TOKEN_DIALOG', 'Boolean.parseBoolean("false")'
|
2016-01-01 11:57:18 +01:00
|
|
|
|
2016-01-29 05:13:38 +01:00
|
|
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
2014-07-03 07:48:39 +02:00
|
|
|
}
|
2016-03-05 16:16:17 +01:00
|
|
|
aaptOptions {
|
|
|
|
additionalParameters "--no-version-vectors"
|
|
|
|
}
|
|
|
|
|
2017-08-13 18:29:20 +02:00
|
|
|
flavorDimensions 'channel'
|
|
|
|
|
2014-10-26 14:38:48 +01:00
|
|
|
productFlavors {
|
2016-05-13 09:23:03 +02:00
|
|
|
// START Non-FOSS component
|
2017-08-13 18:29:20 +02:00
|
|
|
google {
|
|
|
|
dimension 'channel'
|
|
|
|
}
|
2016-05-13 09:23:03 +02:00
|
|
|
// END Non-FOSS component
|
2017-08-13 18:29:20 +02:00
|
|
|
fdroid {
|
|
|
|
dimension 'channel'
|
|
|
|
}
|
2015-01-30 15:27:22 +01:00
|
|
|
}
|
|
|
|
buildTypes {
|
|
|
|
debug {
|
2017-02-15 18:03:48 +01:00
|
|
|
minifyEnabled false
|
|
|
|
shrinkResources false
|
2015-12-29 13:25:16 +01:00
|
|
|
resValue("bool", "debug", "true")
|
2014-11-03 16:44:32 +01:00
|
|
|
}
|
2015-03-29 09:36:51 +02:00
|
|
|
release {
|
2015-11-22 15:55:29 +01:00
|
|
|
minifyEnabled false
|
2016-02-07 15:09:45 +01:00
|
|
|
shrinkResources false
|
2015-11-22 15:55:29 +01:00
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
2015-12-29 13:25:16 +01:00
|
|
|
resValue("bool", "debug", "false")
|
2015-03-29 09:36:51 +02:00
|
|
|
}
|
2014-10-26 14:38:48 +01:00
|
|
|
}
|
2016-07-06 15:21:34 +02: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 13:06:55 +02:00
|
|
|
}
|
2016-01-24 05:31:52 +01:00
|
|
|
testOptions {
|
|
|
|
unitTests.returnDefaultValues = true
|
|
|
|
}
|
2016-04-04 11:22:36 +02:00
|
|
|
|
2014-07-03 07:48:39 +02:00
|
|
|
}
|
|
|
|
|
2015-01-04 16:12:10 +01:00
|
|
|
repositories {
|
2016-06-29 15:47:52 +02:00
|
|
|
mavenLocal()
|
2015-10-06 18:45:39 +02:00
|
|
|
maven { url 'https://s3.amazonaws.com/repo.commonsware.com' }
|
2015-12-20 12:54:05 +01:00
|
|
|
flatDir { dirs "$projectDir/lib" }
|
2015-01-04 16:12:10 +01:00
|
|
|
}
|
|
|
|
|
2014-07-03 07:48:39 +02:00
|
|
|
dependencies {
|
2014-11-16 14:27:42 +01:00
|
|
|
// wearApp project(':twidere.wear')
|
2017-03-04 06:02:41 +01:00
|
|
|
kapt "com.bluelinelabs:logansquare-compiler:${libVersions['LoganSquare']}"
|
2017-04-06 05:55:04 +02:00
|
|
|
kapt "com.hannesdorfmann.parcelableplease:processor:${libVersions['ParcelablePlease']}"
|
2017-08-13 18:29:20 +02:00
|
|
|
kapt 'com.google.dagger:dagger-compiler:2.11'
|
2017-03-05 10:04:26 +01:00
|
|
|
kapt "com.github.mariotaku.ObjectCursor:processor:${libVersions['ObjectCursor']}"
|
2016-02-13 08:26:23 +01:00
|
|
|
|
2017-08-13 18:29:20 +02:00
|
|
|
implementation project(':twidere.component.common')
|
|
|
|
implementation project(':twidere.component.nyan')
|
2016-03-18 05:00:40 +01:00
|
|
|
|
2016-05-13 09:23:03 +02:00
|
|
|
// START Non-FOSS component
|
2017-08-13 18:29:20 +02:00
|
|
|
googleImplementation "com.google.android.gms:play-services-maps:${libVersions['PlayServices']}"
|
|
|
|
googleImplementation "com.google.android.gms:play-services-auth:${libVersions['PlayServices']}"
|
|
|
|
googleImplementation "com.google.maps.android:android-maps-utils:${libVersions['MapsUtils']}"
|
|
|
|
googleImplementation "com.anjlab.android.iab.v3:library:${libVersions['IABv3']}"
|
|
|
|
googleImplementation "com.dropbox.core:dropbox-core-sdk:${libVersions['DropboxCoreSdk']}"
|
|
|
|
googleImplementation("com.google.apis:google-api-services-drive:${libVersions['GoogleDriveApi']}") {
|
2017-01-21 17:33:20 +01:00
|
|
|
exclude group: 'org.apache.httpcomponents'
|
|
|
|
}
|
2016-05-13 09:23:03 +02:00
|
|
|
// END Non-FOSS component
|
2016-03-18 05:00:40 +01:00
|
|
|
|
2017-08-13 18:29:20 +02:00
|
|
|
fdroidImplementation "org.osmdroid:osmdroid-android:${libVersions['OSMDroid']}"
|
|
|
|
fdroidImplementation "ch.acra:acra:${libVersions['ACRA']}"
|
2016-03-18 05:00:40 +01:00
|
|
|
|
2017-08-13 18:29:20 +02:00
|
|
|
debugImplementation "com.facebook.stetho:stetho:${libVersions['Stetho']}"
|
|
|
|
debugImplementation "com.facebook.stetho:stetho-okhttp3:${libVersions['Stetho']}"
|
|
|
|
debugImplementation "com.facebook.stetho:stetho-js-rhino:${libVersions['Stetho']}"
|
|
|
|
debugImplementation "com.squareup.leakcanary:leakcanary-android:${libVersions['LeakCanary']}"
|
|
|
|
debugImplementation('com.jayway.jsonpath:json-path:2.2.0') {
|
2017-03-09 13:20:28 +01:00
|
|
|
exclude group: 'net.minidev', module: 'json-smart'
|
|
|
|
}
|
2017-08-13 18:29:20 +02:00
|
|
|
// Stetho dependency, see https://g.co/androidstudio/app-test-app-conflict
|
|
|
|
debugImplementation "com.google.code.findbugs:jsr305:3.0.1"
|
|
|
|
|
|
|
|
compileOnly 'javax.annotation:jsr250-api:1.0'
|
|
|
|
|
|
|
|
testImplementation 'junit:junit:4.12'
|
|
|
|
|
|
|
|
androidTestImplementation "com.android.support:support-annotations:${libVersions['SupportLib']}"
|
|
|
|
androidTestImplementation "com.android.support.test:runner:${libVersions['SupportTest']}"
|
|
|
|
androidTestImplementation "com.android.support.test:rules:${libVersions['SupportTest']}"
|
|
|
|
// https://g.co/androidstudio/app-test-app-conflict
|
|
|
|
androidTestImplementation "com.google.code.findbugs:jsr305:3.0.1"
|
|
|
|
|
|
|
|
implementation 'com.android.support:multidex:1.0.2'
|
|
|
|
implementation "com.android.support:support-annotations:${libVersions['SupportLib']}"
|
|
|
|
implementation "com.android.support:support-compat:${libVersions['SupportLib']}"
|
|
|
|
implementation "com.android.support:support-core-utils:${libVersions['SupportLib']}"
|
|
|
|
implementation "com.android.support:support-core-ui:${libVersions['SupportLib']}"
|
|
|
|
implementation "com.android.support:support-v13:${libVersions['SupportLib']}"
|
|
|
|
implementation "com.android.support:appcompat-v7:${libVersions['SupportLib']}"
|
|
|
|
implementation "com.android.support:cardview-v7:${libVersions['SupportLib']}"
|
|
|
|
implementation "com.android.support:recyclerview-v7:${libVersions['SupportLib']}"
|
|
|
|
implementation "com.android.support:palette-v7:${libVersions['SupportLib']}"
|
|
|
|
implementation "com.android.support:preference-v14:${libVersions['SupportLib']}"
|
|
|
|
implementation "com.android.support:customtabs:${libVersions['SupportLib']}"
|
|
|
|
implementation "com.android.support:design:${libVersions['SupportLib']}"
|
|
|
|
implementation "com.android.support:exifinterface:${libVersions['SupportLib']}"
|
|
|
|
implementation "com.twitter:twitter-text:${libVersions['TwitterText']}"
|
|
|
|
implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.6.0'
|
|
|
|
implementation 'com.squareup:otto:1.3.8'
|
|
|
|
implementation 'dnsjava:dnsjava:2.1.8'
|
|
|
|
implementation 'com.commonsware.cwac:layouts:0.4.3'
|
|
|
|
implementation 'com.rengwuxian.materialedittext:library:2.1.4'
|
|
|
|
implementation 'com.pnikosis:materialish-progress:1.7'
|
|
|
|
implementation 'com.github.mariotaku:MessageBubbleView:1.6'
|
|
|
|
implementation 'com.github.mariotaku:DragSortListView:0.6.1'
|
|
|
|
implementation 'com.github.uucky:ColorPicker-Android:0.9.7@aar'
|
|
|
|
implementation "pl.droidsonroids.gif:android-gif-drawable:${libVersions['AndroidGIFDrawable']}"
|
|
|
|
implementation 'com.sprylab.android.texturevideoview:texturevideoview:1.2.1'
|
|
|
|
implementation 'com.squareup:pollexor:2.0.4'
|
|
|
|
implementation 'org.apache.commons:commons-lang3:3.6'
|
|
|
|
implementation 'commons-primitives:commons-primitives:1.0'
|
|
|
|
implementation "org.apache.james:apache-mime4j-core:${libVersions['Mime4J']}"
|
|
|
|
implementation "org.apache.james:apache-mime4j-storage:${libVersions['Mime4J']}"
|
|
|
|
implementation "com.bluelinelabs:logansquare:${libVersions['LoganSquare']}"
|
|
|
|
implementation "com.hannesdorfmann.parcelableplease:annotation:${libVersions['ParcelablePlease']}"
|
|
|
|
implementation "com.github.mariotaku:PickNCrop:${libVersions['PickNCrop']}"
|
|
|
|
implementation "com.github.mariotaku.RestFu:library:${libVersions['RestFu']}"
|
|
|
|
implementation "com.github.mariotaku.RestFu:okhttp3:${libVersions['RestFu']}"
|
|
|
|
implementation "com.github.mariotaku.RestFu:logansquare:${libVersions['RestFu']}"
|
|
|
|
implementation "com.squareup.okhttp3:okhttp:${libVersions['OkHttp']}"
|
|
|
|
implementation 'com.lnikkila:extendedtouchview:0.1.1'
|
|
|
|
implementation 'com.google.dagger:dagger:2.11'
|
|
|
|
implementation 'org.attoparser:attoparser:2.0.4.RELEASE'
|
|
|
|
implementation 'com.getkeepsafe.taptargetview:taptargetview:1.9.1'
|
|
|
|
implementation 'net.ypresto.androidtranscoder:android-transcoder:0.2.0'
|
|
|
|
implementation "com.google.android.exoplayer:exoplayer:${libVersions['Exoplayer']}"
|
|
|
|
implementation "com.google.android.exoplayer:extension-okhttp:${libVersions['Exoplayer']}"
|
|
|
|
implementation "com.github.bumptech.glide:glide:${libVersions['Glide']}"
|
|
|
|
implementation "com.github.bumptech.glide:okhttp3-integration:${libVersions['GlideOkHttp3']}@aar"
|
|
|
|
implementation "jp.wasabeef:glide-transformations:${libVersions['GlideTransformations']}"
|
|
|
|
implementation "com.theartofdev.edmodo:android-image-cropper:${libVersions['AndroidImageCropper']}"
|
|
|
|
|
|
|
|
implementation "com.github.mariotaku.MediaViewerLibrary:base:${libVersions['MediaViewerLibrary']}"
|
|
|
|
implementation "com.github.mariotaku.MediaViewerLibrary:subsample-image-view:${libVersions['MediaViewerLibrary']}"
|
|
|
|
implementation "com.github.mariotaku:SQLiteQB:${libVersions['SQLiteQB']}"
|
|
|
|
implementation "com.github.mariotaku.ObjectCursor:core:${libVersions['ObjectCursor']}"
|
|
|
|
implementation "com.github.mariotaku.ExportablePreferences:core:${libVersions['ExportablePreferences']}"
|
|
|
|
implementation "com.github.mariotaku:AbstractTask:${libVersions['AbstractTask']}"
|
|
|
|
implementation "com.github.mariotaku.CommonsLibrary:parcel:${libVersions['MariotakuCommons']}"
|
|
|
|
implementation "com.github.mariotaku.CommonsLibrary:io:${libVersions['MariotakuCommons']}"
|
|
|
|
implementation "com.github.mariotaku.CommonsLibrary:text:${libVersions['MariotakuCommons']}"
|
|
|
|
implementation "com.github.mariotaku.CommonsLibrary:text-kotlin:${libVersions['MariotakuCommons']}"
|
|
|
|
implementation "com.github.mariotaku.CommonsLibrary:emojione:${libVersions['MariotakuCommons']}"
|
|
|
|
implementation "com.github.mariotaku:KPreferences:${libVersions['KPreferences']}"
|
|
|
|
implementation "com.github.mariotaku:Chameleon:${libVersions['Chameleon']}"
|
|
|
|
implementation "com.github.mariotaku.UniqR:android:${libVersions['UniqR']}"
|
|
|
|
|
|
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:${libVersions['Kotlin']}"
|
|
|
|
implementation "nl.komponents.kovenant:kovenant:${libVersions['Kovenant']}"
|
|
|
|
implementation "nl.komponents.kovenant:kovenant-android:${libVersions['Kovenant']}"
|
|
|
|
implementation "nl.komponents.kovenant:kovenant-functional:${libVersions['Kovenant']}"
|
|
|
|
implementation "nl.komponents.kovenant:kovenant-combine:${libVersions['Kovenant']}"
|
2015-05-04 17:53:52 +02:00
|
|
|
}
|
|
|
|
|
2015-06-24 17:13:03 +02:00
|
|
|
task svgToDrawable(type: SvgDrawableTask) {
|
2015-05-04 17:53:52 +02:00
|
|
|
// specify where to pick SVG from
|
2017-03-27 05:08:09 +02:00
|
|
|
from = files(android.sourceSets.collect { "src/${it.name}/svg/drawable" })
|
2015-05-04 17:53:52 +02:00
|
|
|
// specify the android res folder
|
|
|
|
to = file('src/main/res-svg2png')
|
|
|
|
// override files only if necessary
|
2015-11-30 06:32:05 +01:00
|
|
|
overwriteMode = 'ifModified'
|
2015-05-04 17:53:52 +02: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 17:13:03 +02:00
|
|
|
ninePatchConfig = file('src/main/svg/drawable/9patch.json')
|
2015-05-04 17:53:52 +02:00
|
|
|
// output format of the generated resources
|
|
|
|
outputFormat = 'PNG'
|
2015-06-24 17:13:03 +02:00
|
|
|
|
|
|
|
outputType = 'drawable'
|
2016-01-03 11:24:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
task svgToMipmap(type: SvgDrawableTask) {
|
|
|
|
// specify where to pick SVG from
|
2017-03-27 05:08:09 +02:00
|
|
|
from = files(android.sourceSets.collect { "src/${it.name}/svg/mipmap" })
|
2016-01-03 11:24:10 +01:00
|
|
|
// 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 14:30:31 +02:00
|
|
|
}
|
2016-05-12 03:37:56 +02:00
|
|
|
|
2017-03-15 10:14:02 +01:00
|
|
|
// START Non-FOSS component
|
|
|
|
play {
|
|
|
|
jsonFile = rootProject.file('private/google_play_publish.json')
|
|
|
|
track = 'beta'
|
|
|
|
}
|
2017-06-20 03:42:36 +02:00
|
|
|
// END Non-FOSS component
|