EPForumL/androidApp

View on GitHub
app/build.gradle

Summary

Maintainability
Test Coverage
plugins {
    id 'com.android.application'
    id 'org.jetbrains.kotlin.android'
    id 'jacoco'
    id 'com.google.gms.google-services'
    id 'kotlin-parcelize'

}

android {
    namespace 'com.github.ybecker.epforuml'
    compileSdk 33

    buildFeatures {
        compose true
        viewBinding true
    }
    composeOptions {
        kotlinCompilerExtensionVersion '1.4.0'
    }

    defaultConfig {
        applicationId "com.github.ybecker.epforuml"
        minSdk 28
        targetSdk 33
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        renderscriptTargetApi 21
        renderscriptSupportModeEnabled true
    }

    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
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
}

configurations.all {
    resolutionStrategy {
        force 'androidx.test:runner:1.5.2'
    }
}

dependencies {


    implementation 'androidx.camera:camera-view:1.2.1'
    implementation 'com.google.firebase:firebase-messaging-ktx:23.1.2'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'com.google.android.gms:play-services-maps:18.1.0'
    implementation 'io.github.iffanmajid:katexmathview:1.0.3'
    implementation 'com.google.firebase:firebase-storage-ktx:20.0.1'
    def camerax_version = "1.1.0-alpha06"
    implementation "androidx.camera:camera-core:$camerax_version"
    implementation "androidx.camera:camera-camera2:1.3.0-alpha04"
    implementation "androidx.camera:camera-lifecycle:1.3.0-alpha04"

    //implementation 'com.dsphotoeditor:dsphotoeditor:1.0.0'

    implementation platform("androidx.compose:compose-bom:2023.01.00")
    implementation 'com.google.firebase:firebase-database:20.1.0'
    implementation 'androidx.annotation:annotation:1.3.0'
    implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.5.1'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
    implementation 'com.google.firebase:firebase-auth-ktx:21.0.3'
    implementation 'com.google.firebase:firebase-auth:21.0.3'
    androidTestImplementation platform("androidx.compose:compose-bom:2023.01.00")
    androidTestImplementation 'org.hamcrest:hamcrest-core:1.3'

    implementation 'androidx.core:core-ktx:1.10.1'
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'com.google.android.material:material:1.8.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
    implementation 'com.google.code.gson:gson:2.8.8'

    implementation("androidx.compose.material3:material3")

    // Android Studio Preview support
    implementation("androidx.compose.ui:ui-tooling-preview")
    debugImplementation("androidx.compose.ui:ui-tooling")

    // UI Tests
    androidTestImplementation("androidx.compose.ui:ui-test-junit4")
    debugImplementation("androidx.compose.ui:ui-test-manifest")

    // Optional - Included automatically by material, only add when you need
    // the icons but not the material library (e.g. when using Material3 or a
    // custom design system based on Foundation)
    implementation("androidx.compose.material:material-icons-core")
    // Optional - Add full set of material icons
    implementation("androidx.compose.material:material-icons-extended")
    // Optional - Add window size utils
    implementation("androidx.compose.material3:material3-window-size-class")

    // Optional - Integration with activities
    implementation("androidx.activity:activity-compose:1.6.1")
    // Optional - Integration with ViewModels
    implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.6.0")
    // Optional - Integration with LiveData
    implementation("androidx.compose.runtime:runtime-livedata")
    // Optional - Integration with RxJava
    implementation("androidx.compose.runtime:runtime-rxjava2")

    implementation 'androidx.recyclerview:recyclerview:1.3.0'

    implementation 'androidx.core:core-ktx:1.6.0'

    implementation 'com.google.android.material:material:1.4.0'

    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.0-alpha01'
    androidTestImplementation 'androidx.test:runner:1.5.2'
    androidTestImplementation 'androidx.test:rules:1.5.0'
    androidTestImplementation 'androidx.test.espresso:espresso-intents:3.6.0-alpha01'
    androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.6.0-alpha01'
    implementation 'androidx.test.espresso:espresso-core:3.6.0-alpha01'
    implementation 'androidx.test.espresso:espresso-idling-resource:3.6.0-alpha01'

    implementation 'com.firebaseui:firebase-ui-auth:8.0.2'

    implementation files('libs/ds-photo-editor-sdk.aar')
    implementation 'com.github.bumptech.glide:glide:4.12.0'
    implementation 'com.google.firebase:firebase-database-ktx:20.0.0'
    implementation 'com.google.firebase:firebase-storage:20.0.0'


    implementation platform('com.google.firebase:firebase-bom:31.5.0')

    implementation 'com.google.firebase:firebase-messaging-ktx'
    implementation 'com.google.firebase:firebase-analytics-ktx'
    implementation 'com.google.firebase:firebase-messaging:23.1.2'
    implementation 'com.google.gms:google-services:4.3.8'
    implementation 'com.google.android.gms:play-services-maps:18.1.0'

    // Circular ImageView
    implementation 'de.hdodenhof:circleimageview:3.1.0'

    implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'

    implementation "androidx.fragment:fragment-ktx:1.5.7"

    implementation 'com.google.guava:guava:30.1.1-android'

    implementation 'com.android.volley:volley:1.2.1'

    implementation "com.google.android.gms:play-services-location:21.0.1"

    //video
    implementation 'com.google.android.exoplayer:exoplayer:2.18.6'

    implementation "androidx.camera:camera-core:1.2.2"

    // Latex
    implementation 'io.github.iffanmajid:katexmathview:1.0.3'
}

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

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

    def fileFilter = [
            '**/R.class',
            '**/R$*.class',
            '**/BuildConfig.*',
            '**/Manifest*.*',
            '**/*Test*.*',
            'android/**/*.*',
    ]
    def debugTree = fileTree(dir: "$project.buildDir/tmp/kotlin-classes/debug", excludes: fileFilter)
    def mainSrc = "$project.projectDir/src/main/java"

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

connectedCheck {
    finalizedBy jacocoTestReport
}