<lambda>null1*e6ba1607SAndroid Build Coastguard Workerplugins { 2*e6ba1607SAndroid Build Coastguard Worker alias(libs.plugins.android.library) 3*e6ba1607SAndroid Build Coastguard Worker alias(libs.plugins.robolectric.android.project) 4*e6ba1607SAndroid Build Coastguard Worker alias(libs.plugins.robolectric.gradle.managed.device) 5*e6ba1607SAndroid Build Coastguard Worker } 6*e6ba1607SAndroid Build Coastguard Worker <lambda>null7*e6ba1607SAndroid Build Coastguard Workerandroid { 8*e6ba1607SAndroid Build Coastguard Worker compileSdk = 34 9*e6ba1607SAndroid Build Coastguard Worker namespace = "org.robolectric.integrationtests.ctesque" 10*e6ba1607SAndroid Build Coastguard Worker 11*e6ba1607SAndroid Build Coastguard Worker defaultConfig { 12*e6ba1607SAndroid Build Coastguard Worker minSdk = 21 13*e6ba1607SAndroid Build Coastguard Worker testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" 14*e6ba1607SAndroid Build Coastguard Worker } 15*e6ba1607SAndroid Build Coastguard Worker 16*e6ba1607SAndroid Build Coastguard Worker lint { abortOnError = false } 17*e6ba1607SAndroid Build Coastguard Worker 18*e6ba1607SAndroid Build Coastguard Worker testOptions { 19*e6ba1607SAndroid Build Coastguard Worker targetSdk = 34 20*e6ba1607SAndroid Build Coastguard Worker unitTests.isIncludeAndroidResources = true 21*e6ba1607SAndroid Build Coastguard Worker } 22*e6ba1607SAndroid Build Coastguard Worker 23*e6ba1607SAndroid Build Coastguard Worker compileOptions { 24*e6ba1607SAndroid Build Coastguard Worker sourceCompatibility = JavaVersion.VERSION_1_8 25*e6ba1607SAndroid Build Coastguard Worker targetCompatibility = JavaVersion.VERSION_1_8 26*e6ba1607SAndroid Build Coastguard Worker } 27*e6ba1607SAndroid Build Coastguard Worker 28*e6ba1607SAndroid Build Coastguard Worker androidResources { noCompress.add("txt") } 29*e6ba1607SAndroid Build Coastguard Worker 30*e6ba1607SAndroid Build Coastguard Worker sourceSets { 31*e6ba1607SAndroid Build Coastguard Worker val sharedTestDir = "src/sharedTest/" 32*e6ba1607SAndroid Build Coastguard Worker val sharedTestSourceDir = sharedTestDir + "java" 33*e6ba1607SAndroid Build Coastguard Worker val sharedTestResourceDir = sharedTestDir + "resources" 34*e6ba1607SAndroid Build Coastguard Worker 35*e6ba1607SAndroid Build Coastguard Worker val test by getting 36*e6ba1607SAndroid Build Coastguard Worker test.resources.srcDirs(sharedTestResourceDir) 37*e6ba1607SAndroid Build Coastguard Worker test.java.srcDirs(sharedTestSourceDir) 38*e6ba1607SAndroid Build Coastguard Worker 39*e6ba1607SAndroid Build Coastguard Worker val androidTest by getting 40*e6ba1607SAndroid Build Coastguard Worker androidTest.resources.srcDirs(sharedTestResourceDir) 41*e6ba1607SAndroid Build Coastguard Worker androidTest.java.srcDirs(sharedTestSourceDir) 42*e6ba1607SAndroid Build Coastguard Worker } 43*e6ba1607SAndroid Build Coastguard Worker } 44*e6ba1607SAndroid Build Coastguard Worker <lambda>null45*e6ba1607SAndroid Build Coastguard Workerdependencies { 46*e6ba1607SAndroid Build Coastguard Worker implementation(project(":testapp")) 47*e6ba1607SAndroid Build Coastguard Worker 48*e6ba1607SAndroid Build Coastguard Worker testImplementation(project(":robolectric")) 49*e6ba1607SAndroid Build Coastguard Worker testImplementation(libs.junit4) 50*e6ba1607SAndroid Build Coastguard Worker testImplementation(libs.androidx.test.monitor) 51*e6ba1607SAndroid Build Coastguard Worker testImplementation(libs.androidx.test.runner) 52*e6ba1607SAndroid Build Coastguard Worker testImplementation(libs.androidx.test.rules) 53*e6ba1607SAndroid Build Coastguard Worker testImplementation(libs.androidx.test.ext.junit) 54*e6ba1607SAndroid Build Coastguard Worker testImplementation(libs.androidx.test.ext.truth) 55*e6ba1607SAndroid Build Coastguard Worker testImplementation(libs.androidx.test.core) 56*e6ba1607SAndroid Build Coastguard Worker testImplementation(libs.androidx.test.espresso.core) 57*e6ba1607SAndroid Build Coastguard Worker testImplementation(libs.truth) 58*e6ba1607SAndroid Build Coastguard Worker testImplementation(libs.guava) 59*e6ba1607SAndroid Build Coastguard Worker 60*e6ba1607SAndroid Build Coastguard Worker // Testing dependencies 61*e6ba1607SAndroid Build Coastguard Worker androidTestImplementation(project(":shadowapi")) 62*e6ba1607SAndroid Build Coastguard Worker androidTestImplementation(libs.androidx.test.monitor) 63*e6ba1607SAndroid Build Coastguard Worker androidTestImplementation(libs.androidx.test.runner) 64*e6ba1607SAndroid Build Coastguard Worker androidTestImplementation(libs.androidx.test.rules) 65*e6ba1607SAndroid Build Coastguard Worker androidTestImplementation(libs.androidx.test.ext.junit) 66*e6ba1607SAndroid Build Coastguard Worker androidTestImplementation(libs.androidx.test.ext.truth) 67*e6ba1607SAndroid Build Coastguard Worker androidTestImplementation(libs.androidx.test.espresso.core) 68*e6ba1607SAndroid Build Coastguard Worker androidTestImplementation(libs.truth) 69*e6ba1607SAndroid Build Coastguard Worker androidTestImplementation(libs.guava) 70*e6ba1607SAndroid Build Coastguard Worker androidTestUtil(libs.androidx.test.services) 71*e6ba1607SAndroid Build Coastguard Worker } 72