plugins {
    id "ndksamples.android.application"
    id "ndksamples.android.kotlin"
}

android {
    namespace 'com.example.unittest'

    defaultConfig {
        applicationId "com.example.unittest"
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

        ndk {
            // junit-gtest and googletest don't currently (August 2025) include
            // riscv64 libraries.
            abiFilters.remove("riscv64")
        }
    }

    externalNativeBuild {
        cmake {
            path file('src/main/cpp/CMakeLists.txt')
        }
    }

    buildFeatures {
        viewBinding true
        prefab true
    }

    packagingOptions {
        jniLibs {
            // Gradle has no way of knowing which of the libraries in our
            // CMakeLists.txt are for the app and which are for tests, so we
            // have to tell it which libraries are test libraries. Without
            // this, the test libraries will end up packaged in the real API
            // and not just the test APK.
            //
            // If you copy this project, be sure to update this to specify the
            // names of your own test libraries.
            testOnly += ["**/libapp_tests.so"]
        }
    }
}

dependencies {
    implementation project(":base")
    implementation libs.appcompat
    implementation libs.material
    implementation libs.androidx.constraintlayout
    implementation libs.androidx.junit.gtest
    implementation libs.googletest
    testImplementation libs.junit
    androidTestImplementation libs.ext.junit
    androidTestImplementation libs.espresso.core
}