movemeet/movemeet

View on GitHub
app/build.gradle

Summary

Maintainability
Test Coverage
plugins {
    id 'com.android.application'
    id 'com.google.gms.google-services'
    id 'jacoco'
}

android {
    compileSdkVersion 30
    buildToolsVersion "30.0.2"

    defaultConfig {
        applicationId "com.sdp.movemeet"
        minSdkVersion 23
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
        debug {
            testCoverageEnabled true
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    testOptions {
        unitTests.returnDefaultValues = true
        animationsDisabled = true
    }
}

dependencies {
    implementation 'org.apache.commons:commons-lang3:3.5'
    implementation 'com.google.code.gson:gson:2.8.5'
    // Import the BoM for the Firebase platform
    //implementation platform('com.google.firebase:firebase-bom:26.6.0')
    implementation platform('com.google.firebase:firebase-bom:27.1.0')
    implementation 'com.google.firebase:firebase-analytics'
    // Declare the dependency for the Firebase Authentication library
    // (When using the BoM, you don't specify versions in Firebase library dependencies)
    implementation 'com.google.firebase:firebase-auth'
    // Declare the dependency for the Cloud Firestore library
    // (When using the BoM, you don't specify versions in Firebase library dependencies)
    implementation 'com.google.firebase:firebase-firestore'
    // Declare the dependency for the Cloud Storage library
    // When using the BoM, you don't specify versions in Firebase library dependencies
    implementation 'com.google.firebase:firebase-storage'
    // Declare the dependency for the Firebase Realtime Database library
    //implementation 'com.google.firebase:firebase-database'
    // Firebase UI Library
    implementation 'com.firebaseui:firebase-ui-database:7.1.1'
    // Picasso is a library used to display an image from its URI (cf.: https://github.com/square/picasso)
    implementation 'com.squareup.picasso:picasso:2.71828'

    implementation "androidx.fragment:fragment:1.3.2"

    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'com.google.android.material:material:1.3.0'
    implementation 'com.github.bumptech.glide:glide:4.12.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    implementation 'com.google.android.gms:play-services-maps:17.0.0'
    implementation 'com.google.android.gms:play-services-location:18.0.0'
    implementation "androidx.fragment:fragment:1.3.2"
    implementation 'androidx.room:room-runtime:2.2.6'

    implementation 'com.google.firebase:firebase-database:19.7.0'
    implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'


    testImplementation 'junit:junit:4.13.2'
    testImplementation 'org.mockito:mockito-core:1.+'
    androidTestImplementation "org.mockito:mockito-core:1.+"
    androidTestImplementation "com.crittercism.dexmaker:dexmaker:1.4"
    androidTestImplementation "com.crittercism.dexmaker:dexmaker-mockito:1.4"
    androidTestImplementation "com.crittercism.dexmaker:dexmaker-dx:1.4"
    androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
    androidTestImplementation 'androidx.test:runner:1.3.0'
    androidTestImplementation 'androidx.test:rules:1.3.0'
    androidTestImplementation 'androidx.test.espresso:espresso-intents:3.3.0'
    androidTestImplementation 'com.21buttons:fragment-test-rule:2.0.1'
    debugImplementation 'com.21buttons:fragment-test-rule-extras:1.1.0'
    debugImplementation 'androidx.fragment:fragment-testing:1.3.2'
    androidTestImplementation("com.android.support.test.espresso:espresso-contrib:2.2.2") {
        exclude group: 'com.android.support', module: 'appcompat'
        exclude group: 'com.android.support', module: 'support-v4'
        exclude group: 'com.android.support', module: 'support-v7'
        exclude group: 'com.android.support', module: 'design'
        exclude module: 'support-annotations'
        exclude module: 'recyclerview-v7'
    }
    annotationProcessor 'androidx.room:room-compiler:2.2.6'
    implementation 'de.hdodenhof:circleimageview:3.1.0'

    // https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind
    implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.0.1'

    implementation 'com.google.android.material:material:1.2.1'
}

tasks.withType(Test) {
    jacoco.includeNoLocationClasses = true
    jacoco.excludes = ['jdk.internal.*']
}

task jacocoTestReport(type: JacocoReport, dependsOn: ['testDebugUnitTest', 'createDebugCoverageReport']) {
    reports {
        xml.enabled = true
        html.enabled = true
    }

    def fileFilter = [
            '**/R.class',
            '**/R$*.class',
            '**/BuildConfig.*',
            '**/Manifest*.*',
            '**/*Test*.*',
            'android/**/*.*',
            // Exclude Hilt generated classes
            '**/*Hilt*.*',
            'hilt_aggregated_deps/**',
            '**/*_Factory.class',
            '**/*_MembersInjector.class'
    ]
    def debugTree = fileTree(dir: "$project.buildDir/intermediates/javac/debug/classes", excludes: fileFilter)
    def mainSrc = "$project.projectDir/src/main/java"

    sourceDirectories.setFrom(files([mainSrc]))
    classDirectories.setFrom(files([debugTree]))
    executionData.setFrom(fileTree(dir: project.buildDir, includes: [
            'jacoco/testDebugUnitTest.exec', 'outputs/code_coverage/debugAndroidTest/connected/*coverage.ec'
    ]))
}

connectedCheck {
    finalizedBy jacocoTestReport
}