2015-05-04 17:53:52 +02:00
|
|
|
import fr.avianey.androidsvgdrawable.gradle.SvgDrawableTask
|
|
|
|
|
2015-01-30 15:27:22 +01:00
|
|
|
import java.text.SimpleDateFormat
|
|
|
|
|
2014-07-03 07:48:39 +02:00
|
|
|
apply plugin: 'com.android.application'
|
2016-01-07 05:17:03 +01:00
|
|
|
apply plugin: 'io.fabric'
|
2015-04-26 18:39:49 +02:00
|
|
|
apply plugin: 'com.neenbedankt.android-apt'
|
2015-11-21 08:26:10 +01:00
|
|
|
apply plugin: 'androidsvgdrawable'
|
2014-07-03 07:48:39 +02:00
|
|
|
|
2016-01-07 05:17:03 +01:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
maven { url 'https://maven.fabric.io/public' }
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
classpath 'io.fabric.tools:gradle:1.21.2'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-07-03 07:48:39 +02:00
|
|
|
android {
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
applicationId "org.mariotaku.twidere"
|
2015-01-23 17:09:03 +01:00
|
|
|
minSdkVersion 14
|
2015-08-20 04:19:02 +02:00
|
|
|
targetSdkVersion 23
|
2015-11-22 04:26:59 +01:00
|
|
|
versionCode 135
|
2015-01-30 15:27:22 +01:00
|
|
|
versionName "0.3.0"
|
2015-01-17 19:58:29 +01:00
|
|
|
multiDexEnabled true
|
2015-11-25 01:47:30 +01:00
|
|
|
|
2016-01-01 11:57:18 +01:00
|
|
|
buildConfigField 'boolean', 'ENABLE_MEDIA_VIEWER', 'Boolean.parseBoolean("true")'
|
|
|
|
|
2016-01-29 05:13:38 +01:00
|
|
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
2014-07-03 07:48:39 +02:00
|
|
|
}
|
2014-07-27 14:58:15 +02:00
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility JavaVersion.VERSION_1_7
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_7
|
|
|
|
}
|
2014-10-26 14:38:48 +01:00
|
|
|
productFlavors {
|
2016-01-07 05:17:03 +01:00
|
|
|
google {}
|
|
|
|
fdroid {}
|
2015-01-30 15:27:22 +01:00
|
|
|
}
|
|
|
|
buildTypes {
|
|
|
|
debug {
|
2016-01-26 15:47:41 +01:00
|
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd")
|
2015-01-30 15:27:22 +01:00
|
|
|
versionNameSuffix String.format(" (dev %s)", format.format(new Date()))
|
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
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
2015-03-29 09:36:51 +02:00
|
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd")
|
|
|
|
versionNameSuffix String.format(" (dev %s)", format.format(new Date()))
|
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
|
|
|
}
|
2015-03-29 13:06:55 +02:00
|
|
|
sourceSets {
|
|
|
|
main {
|
2015-05-04 17:53:52 +02:00
|
|
|
res.srcDirs = [project.file("src/$name/res"), project.file("src/$name/res-localized"),
|
|
|
|
project.file("src/$name/res-svg2png")]
|
2015-03-29 13:06:55 +02:00
|
|
|
}
|
|
|
|
}
|
2016-01-24 05:31:52 +01:00
|
|
|
testOptions {
|
|
|
|
unitTests.returnDefaultValues = true
|
|
|
|
}
|
2014-07-03 07:48:39 +02:00
|
|
|
}
|
|
|
|
|
2015-01-04 16:12:10 +01:00
|
|
|
repositories {
|
2015-10-06 18:45:39 +02:00
|
|
|
maven { url 'https://s3.amazonaws.com/repo.commonsware.com' }
|
2015-12-29 08:26:52 +01:00
|
|
|
maven { url 'https://maven.fabric.io/public' }
|
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')
|
2015-12-13 13:17:26 +01:00
|
|
|
apt 'com.bluelinelabs:logansquare-compiler:1.3.4'
|
2016-01-04 04:32:48 +01:00
|
|
|
apt 'com.hannesdorfmann.parcelableplease:processor:1.0.2'
|
2015-11-25 01:47:30 +01:00
|
|
|
apt 'com.google.dagger:dagger-compiler:2.0.2'
|
2015-12-28 09:06:57 +01:00
|
|
|
apt "com.github.mariotaku.ObjectCursor:processor:0.9.3"
|
2015-01-11 10:28:45 +01:00
|
|
|
compile 'com.android.support:multidex:1.0.1'
|
2015-11-21 08:26:10 +01:00
|
|
|
compile 'com.android.support:support-v13:23.1.1'
|
|
|
|
compile 'com.android.support:appcompat-v7:23.1.1'
|
|
|
|
compile 'com.android.support:cardview-v7:23.1.1'
|
|
|
|
compile 'com.android.support:recyclerview-v7:23.1.1'
|
2015-11-30 06:32:05 +01:00
|
|
|
compile 'com.twitter:twitter-text:1.13.0'
|
|
|
|
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
|
2015-08-16 11:34:49 +02:00
|
|
|
compile 'com.squareup:otto:1.3.8'
|
2015-03-08 16:44:47 +01:00
|
|
|
compile 'dnsjava:dnsjava:2.1.7'
|
2015-01-04 16:12:10 +01:00
|
|
|
compile 'com.commonsware.cwac:merge:1.1.1'
|
2015-10-26 09:10:37 +01:00
|
|
|
compile 'com.commonsware.cwac:layouts:0.4.2'
|
2015-07-17 16:30:41 +02:00
|
|
|
compile 'com.rengwuxian.materialedittext:library:2.1.4'
|
2015-10-05 12:00:07 +02:00
|
|
|
compile 'com.pnikosis:materialish-progress:1.7'
|
2015-12-28 09:06:57 +01:00
|
|
|
compile 'com.squareup.okhttp:okhttp:2.7.0'
|
2015-05-26 13:19:03 +02:00
|
|
|
compile 'pl.droidsonroids.gif:android-gif-drawable:1.1.7'
|
2015-04-28 18:54:42 +02:00
|
|
|
compile 'com.github.johnpersano:supertoasts:1.3.4.1@aar'
|
2015-05-05 07:46:29 +02:00
|
|
|
compile 'com.github.mariotaku:MessageBubbleView:1.2'
|
2015-03-22 18:06:25 +01:00
|
|
|
compile 'com.github.mariotaku:DragSortListView:0.6.1'
|
2015-05-20 10:22:19 +02:00
|
|
|
compile 'com.github.uucky:ColorPicker-Android:0.9.7@aar'
|
2015-06-28 21:32:51 +02:00
|
|
|
compile 'com.github.boxme:asyncmanager:1.0.0'
|
2015-11-30 06:32:05 +01:00
|
|
|
compile 'com.sprylab.android.texturevideoview:texturevideoview:1.0.2'
|
2015-10-05 12:00:07 +02:00
|
|
|
compile 'com.squareup:pollexor:2.0.4'
|
2015-08-13 05:27:53 +02:00
|
|
|
compile 'com.squareup:tape:1.2.3'
|
2015-04-08 12:39:25 +02:00
|
|
|
compile 'org.apache.commons:commons-lang3:3.4'
|
2015-10-05 13:09:54 +02:00
|
|
|
compile 'commons-primitives:commons-primitives:1.0'
|
2015-12-13 13:17:26 +01:00
|
|
|
compile 'com.bluelinelabs:logansquare:1.3.4'
|
2015-05-19 19:54:56 +02:00
|
|
|
compile 'org.jraf:android-switch-backport:2.0.1'
|
2015-12-29 13:25:16 +01:00
|
|
|
compile 'com.github.mariotaku:jackson-jr-trees:7fe682ee09'
|
2015-07-17 16:30:41 +02:00
|
|
|
compile 'com.makeramen:roundedimageview:2.1.1'
|
2015-10-05 12:00:07 +02:00
|
|
|
compile 'com.soundcloud.android:android-crop:1.0.1@aar'
|
2016-01-04 04:32:48 +01:00
|
|
|
compile 'com.hannesdorfmann.parcelableplease:annotation:1.0.2'
|
2016-01-04 03:02:23 +01:00
|
|
|
compile 'com.github.mariotaku:PickNCrop:0.9.2'
|
2016-02-03 20:27:43 +01:00
|
|
|
compile 'com.github.mariotaku.RestFu:library:0.9.16'
|
|
|
|
compile 'com.github.mariotaku.RestFu:okhttp:0.9.16'
|
2016-01-22 08:14:26 +01:00
|
|
|
compile 'com.github.mariotaku:InetAddressJni:0.9.1'
|
2015-09-02 09:03:17 +02:00
|
|
|
compile 'com.lnikkila:extendedtouchview:0.1.0'
|
2015-11-25 01:47:30 +01:00
|
|
|
compile 'com.google.dagger:dagger:2.0.2'
|
2015-11-04 13:40:13 +01:00
|
|
|
compile 'org.attoparser:attoparser:1.4.0.RELEASE'
|
2016-01-02 10:48:24 +01:00
|
|
|
compile 'com.j256.simplemagic:simplemagic:1.6'
|
2016-02-04 14:25:05 +01:00
|
|
|
compile 'com.github.mariotaku.MediaViewerLibrary:base:0.9.4-SNAPSHOT'
|
|
|
|
compile 'com.github.mariotaku.MediaViewerLibrary:subsample-image-view:0.9.4-SNAPSHOT'
|
2015-12-23 09:00:59 +01:00
|
|
|
googleCompile 'com.google.android.gms:play-services-maps:8.4.0'
|
2016-01-29 15:46:22 +01:00
|
|
|
// googleCompile 'com.google.maps.android:android-maps-utils:0.4'
|
2016-01-07 05:17:03 +01:00
|
|
|
googleCompile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') { transitive = true }
|
2015-12-20 12:54:05 +01:00
|
|
|
googleCompile ':YouTubeAndroidPlayerApi:1.2.2@jar'
|
2015-11-30 06:32:05 +01:00
|
|
|
fdroidCompile 'org.osmdroid:osmdroid-android:5.0.1'
|
2015-10-05 12:00:07 +02:00
|
|
|
debugCompile 'com.facebook.stetho:stetho:1.2.0'
|
|
|
|
debugCompile 'com.facebook.stetho:stetho-okhttp:1.2.0'
|
2016-01-20 04:52:08 +01:00
|
|
|
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.4-beta1'
|
2015-01-11 10:28:45 +01:00
|
|
|
compile project(':twidere.component.common')
|
2015-01-06 16:46:07 +01:00
|
|
|
compile project(':twidere.component.nyan')
|
2015-12-28 09:06:57 +01:00
|
|
|
compile 'com.github.mariotaku.ObjectCursor:core:0.9.3'
|
2015-01-01 11:38:34 +01:00
|
|
|
compile fileTree(dir: 'libs/main', include: ['*.jar'])
|
2015-10-05 12:00:07 +02:00
|
|
|
provided 'javax.annotation:jsr250-api:1.0'
|
2016-01-23 09:24:38 +01:00
|
|
|
|
|
|
|
testCompile 'junit:junit:4.12'
|
2016-01-29 05:13:38 +01:00
|
|
|
|
|
|
|
androidTestCompile 'com.android.support:support-annotations:23.1.1'
|
|
|
|
androidTestCompile 'com.android.support.test:runner:0.4.1'
|
|
|
|
androidTestCompile 'com.android.support.test:rules:0.4.1'
|
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
|
2015-11-30 06:32:05 +01:00
|
|
|
from = files('src/main/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
|
|
|
|
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'
|
2015-03-09 12:56:36 +01:00
|
|
|
}
|