build.gradle 2.01 KB
Newer Older
yogevbd's avatar
yogevbd committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
apply plugin: 'com.android.library'
apply from: '../prepare-robolectric.gradle'

android {
    compileSdkVersion 27
    buildToolsVersion '28.0.3'

    defaultConfig {
        minSdkVersion 19
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
19 20 21
        debug {
            debuggable true
        }
yogevbd's avatar
yogevbd committed
22
    }
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
    testOptions {
        unitTests.all { t ->
            reports {
                html.enabled true
            }
            testLogging {
                events "PASSED", "SKIPPED", "FAILED", "standardOut", "standardError"
            }
            afterSuite { desc, result ->
                if (!desc.parent) { // will match the outermost suite
                    def output = "      ${result.resultType} (${result.successfulTestCount} successes, ${result.failedTestCount} failures, ${result.skippedTestCount} skipped)     "
                    def repeatLength = output.length()
                    println '\n\n' + ('-' * repeatLength) + '\n' + output + '\n' + ('-' * repeatLength) + '\n'

                    println "see report at file://${t.reports.html.destination}/index.html"
                }
            }
        }
    }
42 43 44 45 46 47 48 49 50 51

    flavorDimensions "RNNotifications.reactNativeVersion"
    productFlavors {
        reactNative59 {
            dimension "RNNotifications.reactNativeVersion"
        }
        reactNative60 {
            dimension "RNNotifications.reactNativeVersion"
        }
    }
yogevbd's avatar
yogevbd committed
52 53 54 55 56 57 58 59 60 61 62 63 64
}

dependencies {
    implementation "com.google.firebase:firebase-messaging:17.3.0"
    implementation 'com.facebook.react:react-native:+'

    // tests
    testImplementation 'junit:junit:4.12'
    testImplementation 'org.robolectric:robolectric:3.5.1'
    testImplementation 'org.assertj:assertj-core:3.8.0'
    testImplementation 'com.squareup.assertj:assertj-android:1.1.1'
    testImplementation 'org.mockito:mockito-core:2.13.0'
}