build.gradle 4.68 KB
Newer Older
1 2 3 4 5
apply plugin: "com.android.application"
apply plugin: "kotlin-android"
apply plugin: "kotlin-android-extensions"
apply plugin: "kotlinx-serialization"
apply plugin: "kotlin-kapt"
6
apply plugin: "androidx.navigation.safeargs.kotlin"
7 8 9 10 11 12 13

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "fr.chenry.android.freshrss"
        minSdkVersion 21
        targetSdkVersion 28
Christophe Henry's avatar
Christophe Henry committed
14 15
        versionCode 4
        versionName "1.0.1"
16 17 18 19 20 21 22 23 24 25 26
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
        }
    }
    dataBinding {
        enabled = true
    }
Christophe Henry's avatar
Christophe Henry committed
27

28 29
    configurations.all {
        resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
30
        exclude group: 'com.google.guava', module: 'listenablefuture'
31 32
    }

33 34 35 36 37 38
    applicationVariants.all { variant ->
        if (variant.name.contains("elease")) {
            variant.mergeAssetsProvider.get().doLast {
                delete new FileNameFinder().getFileNames(buildDir.absolutePath, "**/config.properties")
            }
        }
Christophe Henry's avatar
Christophe Henry committed
39
    }
40 41 42 43

    androidExtensions {
        experimental = true
    }
44 45 46 47
}

dependencies {
    def lifecycle_version = "2.0.0"
48
    def room_version = "2.1.0-alpha04"
49
    def fuel_version = "2.0.1"
50
    def jackson_version = "2.9.6"
51 52 53 54
    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"
55
    def android_navigation = "1.0.0-rc02"
56

57 58
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation fileTree(include: ['*.jar'], dir: 'libs')
Christophe Henry's avatar
Christophe Henry committed
59 60

    // Kotlin stuff
61 62
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
Christophe Henry's avatar
Christophe Henry committed
63 64

    // Compat libraries
65 66 67 68
    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"
69
    implementation "com.android.support:support-compat:$android_support_version"
70
    implementation "com.android.support:support-core-ui:$android_support_version"
Christophe Henry's avatar
Christophe Henry committed
71 72

    // AndroidX layout
73 74 75 76 77
    implementation 'androidx.appcompat:appcompat:1.1.0-alpha02'
    implementation 'androidx.core:core-ktx:1.1.0-alpha03'
    implementation 'com.google.android.material:material:1.0.0-beta01'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'androidx.recyclerview:recyclerview:1.0.0'
78 79

    // ViewModel and LiveData
80
    implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
81 82
    implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
    implementation "androidx.lifecycle:lifecycle-reactivestreams-ktx:$lifecycle_version"
83
    annotationProcessor "androidx.lifecycle:lifecycle-compiler:$lifecycle_version"
84 85
    testImplementation "androidx.arch.core:core-testing:$lifecycle_version"

Christophe Henry's avatar
Christophe Henry committed
86
    // Room
87
    kapt "androidx.room:room-compiler:$room_version"
88
    implementation "androidx.room:room-runtime:$room_version"
89 90 91 92 93
    implementation "androidx.room:room-rxjava2:$room_version"
    implementation "androidx.room:room-guava:$room_version"
    implementation "androidx.room:room-coroutines:$room_version"
    testImplementation "androidx.room:room-testing:$room_version"

94
    // HTTP and promises
95 96
    implementation "com.github.kittinunf.fuel:fuel:$fuel_version"
    implementation "com.github.kittinunf.fuel:fuel-android:$fuel_version"
97 98
    implementation("com.github.kittinunf.fuel:fuel-jackson:$fuel_version") { transitive = false }
    implementation "com.fasterxml.jackson.module:jackson-module-kotlin:$jackson_version"
99
    implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version"
100 101 102
    implementation "nl.komponents.kovenant:kovenant:$promise_version"
    implementation "nl.komponents.kovenant:kovenant-android:$promise_version"

103 104 105 106
    // Navigation
    implementation "android.arch.navigation:navigation-fragment-ktx:$android_navigation"
    implementation "android.arch.navigation:navigation-ui-ktx:$android_navigation"

Christophe Henry's avatar
Christophe Henry committed
107
    // Utils
108 109
    implementation 'org.apache.commons:commons-text:1.4'
    implementation 'joda-time:joda-time:2.10.1'
Christophe Henry's avatar
Christophe Henry committed
110 111

    // Tests
112
    testImplementation 'junit:junit:4.12'
Christophe Henry's avatar
Christophe Henry committed
113
    androidTestImplementation "androidx.test:runner:$test_runnner_version"
114
    androidTestImplementation "androidx.test.espresso:espresso-core:$espresso_version"
115 116

    // Debug
117
    // implementation "com.facebook.stetho:stetho:1.5.0"
118
}