apply plugin: "com.android.application" apply plugin: "kotlin-android" apply plugin: "kotlin-android-extensions" apply plugin: "kotlin-kapt" apply plugin: "androidx.navigation.safeargs.kotlin" apply plugin: "com.diffplug.gradle.spotless" android { def schema_location = "$projectDir/src/main/java/fr/chenry/android/freshrss/store/database/migrations".toString() compileSdkVersion 28 defaultConfig { applicationId "fr.chenry.android.freshrss" minSdkVersion 21 targetSdkVersion 28 versionCode 11 versionName "1.2.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" javaCompileOptions { annotationProcessorOptions { arguments = ["room.schemaLocation": schema_location] } } } testOptions { unitTests.all { testLogging { events "passed", "skipped", "failed", "standardOut", "standardError" outputs.upToDateWhen { false } showStandardStreams = true } } } lintOptions { disable "AllowBackup", "VectorPath", "GradleDependency", "MissingTranslation" } sourceSets { androidTest.assets.srcDirs += files(schema_location) } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" } } dataBinding { enabled = true } configurations.all { resolutionStrategy.force "com.google.code.findbugs:jsr305:1.3.9" exclude group: "com.google.guava", module: "listenablefuture" } applicationVariants.all { variant -> if (variant.name.contains("elease")) { variant.mergeAssetsProvider.get().doLast { delete new FileNameFinder().getFileNames(buildDir.absolutePath, "**/config.properties") } } } androidExtensions { experimental = true } } configurations { ktlint } spotless { format "misc", { target "**/*.gradle", "**/*.md", "**/.gitignore", "**/*.kt" trimTrailingWhitespace() endWithNewline() } kotlin { ktlint().userData([ "trim_trailing_whitespace": true, "insert_final_newline" : true, "max_line_length" : 120, ]) } format "xml", { target fileTree(".") { include "**/*.xml" exclude "**/build/**" } eclipseWtp("xml").configFile "$rootDir/freshrss.xmlformat.prefs".toString() } } dependencies { def lifecycle_version = "2.0.0" def room_version = "2.1.0-alpha04" def roomigrant_version = "0.1.7" def fuel_version = "2.0.1" def jackson_version = "2.9.6" def espresso_version = "3.1.1" def test_runnner_version = "1.1.1" def promise_version = "3.3.0" def android_support_version = "28.0.0" def android_navigation = "1.0.0" // Linter ktlint "com.github.shyiko:ktlint:0.31.0" implementation "androidx.legacy:legacy-support-v4:1.0.0" implementation fileTree(include: ["*.jar"], dir: "libs") // Kotlin stuff implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" // Compat libraries implementation "com.android.support:appcompat-v7:$android_support_version" implementation "com.android.support:preference-v7:$android_support_version" implementation "com.android.support:support-core-utils:$android_support_version" implementation "com.android.support:support-fragment:$android_support_version" implementation "com.android.support:support-compat:$android_support_version" implementation "com.android.support:support-core-ui:$android_support_version" // AndroidX layout implementation "androidx.appcompat:appcompat:1.1.0-alpha04" implementation "androidx.core:core-ktx:1.1.0-alpha05" implementation "com.google.android.material:material:1.1.0-alpha05" implementation "androidx.constraintlayout:constraintlayout:1.1.3" implementation "androidx.recyclerview:recyclerview:1.0.0" // ViewModel and LiveData implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version" implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version" implementation "androidx.lifecycle:lifecycle-reactivestreams-ktx:$lifecycle_version" kapt "androidx.lifecycle:lifecycle-compiler:$lifecycle_version" androidTestImplementation "androidx.arch.core:core-testing:$lifecycle_version" // Room kapt "androidx.room:room-compiler:$room_version" implementation "androidx.room:room-runtime:$room_version" implementation "androidx.room:room-rxjava2:$room_version" implementation "androidx.room:room-guava:$room_version" implementation "androidx.room:room-coroutines:$room_version" androidTestImplementation "androidx.room:room-testing:$room_version" // roomigrant implementation "com.github.MatrixDev.Roomigrant:RoomigrantLib:$roomigrant_version" kapt "com.github.MatrixDev.Roomigrant:RoomigrantCompiler:$roomigrant_version" // HTTP and promises implementation "com.github.kittinunf.fuel:fuel:$fuel_version" implementation "com.github.kittinunf.fuel:fuel-android:$fuel_version" implementation("com.github.kittinunf.fuel:fuel-jackson:$fuel_version") { transitive = false } implementation "com.fasterxml.jackson.module:jackson-module-kotlin:$jackson_version" implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version" implementation "nl.komponents.kovenant:kovenant:$promise_version" implementation "nl.komponents.kovenant:kovenant-android:$promise_version" // Navigation implementation "android.arch.navigation:navigation-fragment-ktx:$android_navigation" implementation "android.arch.navigation:navigation-ui-ktx:$android_navigation" // Utils implementation "org.apache.commons:commons-text:1.4" implementation "joda-time:joda-time:2.10.1" implementation "com.squareup.picasso:picasso:2.71828" implementation "com.x5dev:chunk-templates:3.4.0" implementation "eu.davidea:flexible-adapter:5.1.0" implementation "eu.davidea:flexible-adapter-ui:1.0.0" // Tests testImplementation "junit:junit:4.12" androidTestImplementation "androidx.test:runner:$test_runnner_version" androidTestImplementation "androidx.test.espresso:espresso-core:$espresso_version" // Debug debugImplementation "com.facebook.stetho:stetho:1.5.0" }