1import org.robolectric.gradle.AndroidProjectConfigPlugin 2import org.robolectric.gradle.GradleManagedDevicePlugin 3 4apply plugin: 'com.android.library' 5apply plugin: AndroidProjectConfigPlugin 6apply plugin: GradleManagedDevicePlugin 7 8android { 9 compileSdk 33 10 11 defaultConfig { 12 minSdk 16 13 targetSdk 33 14 multiDexEnabled true 15 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 16 testInstrumentationRunnerArguments useTestStorageService: 'true' 17 } 18 19 compileOptions { 20 sourceCompatibility = '1.8' 21 targetCompatibility = '1.8' 22 } 23 24 testOptions { 25 unitTests { 26 includeAndroidResources = true 27 } 28 } 29 sourceSets { 30 String sharedTestDir = 'src/sharedTest/' 31 String sharedTestSourceDir = sharedTestDir + 'java' 32 String sharedTestResourceDir = sharedTestDir + 'resources' 33 String sharedAndroidManifest = sharedTestDir + "AndroidManifest.xml" 34 test.resources.srcDirs += sharedTestResourceDir 35 test.java.srcDirs += sharedTestSourceDir 36 test.manifest.srcFile sharedAndroidManifest 37 androidTest.resources.srcDirs += sharedTestResourceDir 38 androidTest.java.srcDirs += sharedTestSourceDir 39 androidTest.manifest.srcFile sharedAndroidManifest 40 } 41} 42 43dependencies { 44 implementation "androidx.appcompat:appcompat:$appCompatVersion" 45 implementation "androidx.constraintlayout:constraintlayout:$constraintlayoutVersion" 46 implementation "androidx.multidex:multidex:$multidexVersion" 47 48 // Testing dependencies 49 testImplementation project(":robolectric") 50 testImplementation "androidx.test:runner:$axtRunnerVersion" 51 testImplementation "junit:junit:$junitVersion" 52 testImplementation "androidx.test:rules:$axtRulesVersion" 53 testImplementation "androidx.test.espresso:espresso-intents:$espressoVersion" 54 testImplementation "androidx.test.espresso:espresso-core:$espressoVersion" 55 testImplementation "androidx.test.ext:truth:$axtTruthVersion" 56 testImplementation "androidx.test:core:$axtCoreVersion" 57 testImplementation "androidx.fragment:fragment:$fragmentVersion" 58 testImplementation "androidx.fragment:fragment-testing:$fragmentVersion" 59 testImplementation "androidx.test.ext:junit:$axtJunitVersion" 60 testImplementation "com.google.truth:truth:$truthVersion" 61 62 androidTestImplementation project(':annotations') 63 androidTestImplementation "androidx.test:runner:$axtRunnerVersion" 64 androidTestImplementation "junit:junit:$junitVersion" 65 androidTestImplementation "androidx.test:rules:$axtRulesVersion" 66 androidTestImplementation "androidx.test.espresso:espresso-intents:$espressoVersion" 67 androidTestImplementation "androidx.test.espresso:espresso-core:$espressoVersion" 68 androidTestImplementation "androidx.test.ext:truth:$axtTruthVersion" 69 androidTestImplementation "androidx.test:core:$axtCoreVersion" 70 androidTestImplementation "androidx.test.ext:junit:$axtJunitVersion" 71 androidTestImplementation "com.google.truth:truth:$truthVersion" 72 androidTestUtil "androidx.test.services:test-services:$axtTestServicesVersion" 73} 74