import fr.avianey.androidsvgdrawable.gradle.SvgDrawableTask apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-kapt' apply plugin: 'kotlin-android-extensions' apply plugin: 'androidsvgdrawable' // START Non-FOSS component apply plugin: 'io.fabric' apply plugin: 'com.github.triplet.play' // END Non-FOSS component buildscript { repositories { jcenter() // START Non-FOSS component maven { url 'https://maven.fabric.io/public' } // END Non-FOSS component } dependencies { // START Non-FOSS component classpath "io.fabric.tools:gradle:${libVersions['FabricPlugin']}" classpath "com.github.triplet.gradle:play-publisher:${libVersions['PlayPublisher']}" classpath 'com.google.gms:google-services:3.0.0' // END Non-FOSS component classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${libVersions['Kotlin']}" classpath "org.jetbrains.kotlin:kotlin-android-extensions:${libVersions['Kotlin']}" classpath('fr.avianey.androidsvgdrawable:gradle-plugin:3.0.0') { // should be excluded to avoid conflict exclude group: 'xerces' } } } android { defaultConfig { applicationId "org.mariotaku.twidere" minSdkVersion project.properties['overrideMinSdkVersion'] ?: 14 targetSdkVersion 25 versionCode 366 versionName '3.6.6' multiDexEnabled true buildConfigField 'boolean', 'LEAK_CANARY_ENABLED', 'Boolean.parseBoolean("true")' buildConfigField 'boolean', 'SHOW_CUSTOM_TOKEN_DIALOG', 'Boolean.parseBoolean("false")' testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } aaptOptions { additionalParameters "--no-version-vectors" } productFlavors { // START Non-FOSS component google {} // END Non-FOSS component fdroid {} } buildTypes { debug { minifyEnabled false shrinkResources false resValue("bool", "debug", "true") } release { minifyEnabled false shrinkResources false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' resValue("bool", "debug", "false") } } 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" } testOptions { unitTests.returnDefaultValues = true } } repositories { mavenLocal() maven { url 'https://s3.amazonaws.com/repo.commonsware.com' } // START Non-FOSS component maven { url 'https://maven.fabric.io/public' } // END Non-FOSS component flatDir { dirs "$projectDir/lib" } } dependencies { // wearApp project(':twidere.wear') kapt "com.bluelinelabs:logansquare-compiler:${libVersions['LoganSquare']}" kapt "com.hannesdorfmann.parcelableplease:processor:${libVersions['ParcelablePlease']}" kapt 'com.google.dagger:dagger-compiler:2.8' kapt "com.github.mariotaku.ObjectCursor:processor:${libVersions['ObjectCursor']}" compile project(':twidere.component.common') compile project(':twidere.component.nyan') // START Non-FOSS component 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") { transitive = true } 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']}") { exclude group: 'org.apache.httpcomponents' } // END Non-FOSS component fdroidCompile "org.osmdroid:osmdroid-android:${libVersions['OSMDroid']}" fdroidCompile "ch.acra:acra:${libVersions['ACRA']}" debugCompile "com.facebook.stetho:stetho:${libVersions['Stetho']}" debugCompile "com.facebook.stetho:stetho-okhttp3:${libVersions['Stetho']}" debugCompile "com.facebook.stetho:stetho-js-rhino:${libVersions['Stetho']}" debugCompile "com.squareup.leakcanary:leakcanary-android:${libVersions['LeakCanary']}" 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' 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' compile "com.android.support:support-v4:${libVersions['SupportLib']}" compile "com.android.support:support-v13:${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:palette-v7:${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.android.support:exifinterface:${libVersions['SupportLib']}" compile "com.twitter:twitter-text:${libVersions['TwitterText']}" compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.6.0' compile 'com.squareup:otto:1.3.8' compile 'dnsjava:dnsjava:2.1.8' compile 'com.commonsware.cwac:layouts:0.4.3' compile 'com.rengwuxian.materialedittext:library:2.1.4' compile 'com.pnikosis:materialish-progress:1.7' 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' compile "pl.droidsonroids.gif:android-gif-drawable:${libVersions['AndroidGIFDrawable']}" compile 'com.sprylab.android.texturevideoview:texturevideoview:1.2.1' compile 'com.squareup:pollexor:2.0.4' compile 'org.apache.commons:commons-lang3:3.5' compile 'commons-primitives:commons-primitives:1.0' compile "org.apache.james:apache-mime4j-core:${libVersions['Mime4J']}" compile "org.apache.james:apache-mime4j-storage:${libVersions['Mime4J']}" compile "com.bluelinelabs:logansquare:${libVersions['LoganSquare']}" compile "com.hannesdorfmann.parcelableplease:annotation:${libVersions['ParcelablePlease']}" compile "com.github.mariotaku:PickNCrop:${libVersions['PickNCrop']}" compile "com.github.mariotaku.RestFu:library:${libVersions['RestFu']}" compile "com.github.mariotaku.RestFu:okhttp3:${libVersions['RestFu']}" compile "com.github.mariotaku.RestFu:logansquare:${libVersions['RestFu']}" compile 'com.squareup.okhttp3:okhttp:3.6.0' compile 'com.lnikkila:extendedtouchview:0.1.0' compile 'com.google.dagger:dagger:2.8' compile 'org.attoparser:attoparser:2.0.3.RELEASE' compile 'com.getkeepsafe.taptargetview:taptargetview:1.8.0' compile 'net.ypresto.androidtranscoder:android-transcoder:0.2.0' compile "com.google.android.exoplayer:exoplayer:${libVersions['Exoplayer']}" compile "com.google.android.exoplayer:extension-okhttp:${libVersions['Exoplayer']}" compile "com.github.bumptech.glide:glide:${libVersions['Glide']}" compile "com.github.bumptech.glide:okhttp3-integration:${libVersions['GlideOkHttp3']}@aar" compile "jp.wasabeef:glide-transformations:${libVersions['GlideTransformations']}" compile "com.theartofdev.edmodo:android-image-cropper:${libVersions['AndroidImageCropper']}" compile "com.github.mariotaku.MediaViewerLibrary:base:${libVersions['MediaViewerLibrary']}" compile "com.github.mariotaku.MediaViewerLibrary:subsample-image-view:${libVersions['MediaViewerLibrary']}" compile "com.github.mariotaku:SQLiteQB:${libVersions['SQLiteQB']}" compile "com.github.mariotaku.ObjectCursor:core:${libVersions['ObjectCursor']}" compile "com.github.mariotaku.ExportablePreferences:core:${libVersions['ExportablePreferences']}" compile 'com.github.mariotaku:AbstractTask:0.9.4' 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']}" compile "com.github.mariotaku.CommonsLibrary:emojione:${libVersions['MariotakuCommons']}" compile "com.github.mariotaku:KPreferences:${libVersions['KPreferences']}" compile "com.github.mariotaku:Chameleon:${libVersions['Chameleon']}" compile 'com.github.mariotaku.QR-Code-generator:core:fcab3ea7f4' compile "com.github.mariotaku.UniqR:android:${libVersions['UniqR']}" compile "org.jetbrains.kotlin:kotlin-stdlib:${libVersions['Kotlin']}" compile "nl.komponents.kovenant:kovenant:${libVersions['Kovenant']}" compile "nl.komponents.kovenant:kovenant-android:${libVersions['Kovenant']}" compile "nl.komponents.kovenant:kovenant-functional:${libVersions['Kovenant']}" compile "nl.komponents.kovenant:kovenant-combine:${libVersions['Kovenant']}" } task svgToDrawable(type: SvgDrawableTask) { // specify where to pick SVG from from = files(android.sourceSets.collect { "src/${it.name}/svg/drawable" }) // 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'] // relative path of the file specifying nine patch specs ninePatchConfig = file('src/main/svg/drawable/9patch.json') // output format of the generated resources outputFormat = 'PNG' outputType = 'drawable' } task svgToMipmap(type: SvgDrawableTask) { // specify where to pick SVG from from = files(android.sourceSets.collect { "src/${it.name}/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' } // START Non-FOSS component play { jsonFile = rootProject.file('private/google_play_publish.json') track = 'beta' } // END Non-FOSS component // START Non-FOSS component apply plugin: 'com.google.gms.google-services' // END Non-FOSS component