xref: /aosp_15_r20/external/robolectric/integration_tests/androidx_test/build.gradle.kts (revision e6ba16074e6af37d123cb567d575f496bf0a58ee)

<lambda>null1*e6ba1607SAndroid Build Coastguard Worker plugins {
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 Worker android {
8*e6ba1607SAndroid Build Coastguard Worker   compileSdk = 34
9*e6ba1607SAndroid Build Coastguard Worker   namespace = "org.robolectric.integration.axt"
10*e6ba1607SAndroid Build Coastguard Worker 
11*e6ba1607SAndroid Build Coastguard Worker   defaultConfig {
12*e6ba1607SAndroid Build Coastguard Worker     testApplicationId = "org.robolectric.integrationtests.axt"
13*e6ba1607SAndroid Build Coastguard Worker     minSdk = 21
14*e6ba1607SAndroid Build Coastguard Worker     testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
15*e6ba1607SAndroid Build Coastguard Worker     testInstrumentationRunnerArguments["useTestStorageService"] = "true"
16*e6ba1607SAndroid Build Coastguard Worker   }
17*e6ba1607SAndroid Build Coastguard Worker 
18*e6ba1607SAndroid Build Coastguard Worker   compileOptions {
19*e6ba1607SAndroid Build Coastguard Worker     sourceCompatibility = JavaVersion.VERSION_1_8
20*e6ba1607SAndroid Build Coastguard Worker     targetCompatibility = JavaVersion.VERSION_1_8
21*e6ba1607SAndroid Build Coastguard Worker   }
22*e6ba1607SAndroid Build Coastguard Worker 
23*e6ba1607SAndroid Build Coastguard Worker   testOptions {
24*e6ba1607SAndroid Build Coastguard Worker     targetSdk = 34
25*e6ba1607SAndroid Build Coastguard Worker     unitTests.isIncludeAndroidResources = true
26*e6ba1607SAndroid Build Coastguard Worker   }
27*e6ba1607SAndroid Build Coastguard Worker 
28*e6ba1607SAndroid Build Coastguard Worker   sourceSets {
29*e6ba1607SAndroid Build Coastguard Worker     val sharedTestDir = "src/sharedTest/"
30*e6ba1607SAndroid Build Coastguard Worker     val sharedTestSourceDir = sharedTestDir + "java"
31*e6ba1607SAndroid Build Coastguard Worker     val sharedTestResourceDir = sharedTestDir + "resources"
32*e6ba1607SAndroid Build Coastguard Worker     val sharedAndroidManifest = sharedTestDir + "AndroidManifest.xml"
33*e6ba1607SAndroid Build Coastguard Worker 
34*e6ba1607SAndroid Build Coastguard Worker     val test by getting
35*e6ba1607SAndroid Build Coastguard Worker     test.resources.srcDirs(sharedTestResourceDir)
36*e6ba1607SAndroid Build Coastguard Worker     test.java.srcDirs(sharedTestSourceDir)
37*e6ba1607SAndroid Build Coastguard Worker     test.manifest.srcFile(sharedAndroidManifest)
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     androidTest.manifest.srcFile(sharedAndroidManifest)
43*e6ba1607SAndroid Build Coastguard Worker   }
44*e6ba1607SAndroid Build Coastguard Worker }
45*e6ba1607SAndroid Build Coastguard Worker 
<lambda>null46*e6ba1607SAndroid Build Coastguard Worker dependencies {
47*e6ba1607SAndroid Build Coastguard Worker   implementation(libs.androidx.appcompat)
48*e6ba1607SAndroid Build Coastguard Worker   implementation(libs.androidx.constraintlayout)
49*e6ba1607SAndroid Build Coastguard Worker 
50*e6ba1607SAndroid Build Coastguard Worker   // Testing dependencies
51*e6ba1607SAndroid Build Coastguard Worker   testImplementation(project(":robolectric"))
52*e6ba1607SAndroid Build Coastguard Worker   testImplementation(libs.androidx.test.runner)
53*e6ba1607SAndroid Build Coastguard Worker   testImplementation(libs.junit4)
54*e6ba1607SAndroid Build Coastguard Worker   testImplementation(libs.androidx.test.rules)
55*e6ba1607SAndroid Build Coastguard Worker   testImplementation(libs.androidx.test.espresso.intents)
56*e6ba1607SAndroid Build Coastguard Worker   testImplementation(libs.androidx.test.espresso.core)
57*e6ba1607SAndroid Build Coastguard Worker   testImplementation(libs.androidx.test.ext.truth)
58*e6ba1607SAndroid Build Coastguard Worker   testImplementation(libs.androidx.test.core)
59*e6ba1607SAndroid Build Coastguard Worker   testImplementation(libs.androidx.biometric)
60*e6ba1607SAndroid Build Coastguard Worker   testImplementation(libs.androidx.fragment)
61*e6ba1607SAndroid Build Coastguard Worker   testImplementation(libs.androidx.fragment.testing)
62*e6ba1607SAndroid Build Coastguard Worker   testImplementation(libs.androidx.test.ext.junit)
63*e6ba1607SAndroid Build Coastguard Worker   testImplementation(libs.truth)
64*e6ba1607SAndroid Build Coastguard Worker 
65*e6ba1607SAndroid Build Coastguard Worker   androidTestImplementation(project(":annotations"))
66*e6ba1607SAndroid Build Coastguard Worker   androidTestImplementation(libs.androidx.test.runner)
67*e6ba1607SAndroid Build Coastguard Worker   androidTestImplementation(libs.junit4)
68*e6ba1607SAndroid Build Coastguard Worker   androidTestImplementation(libs.androidx.test.rules)
69*e6ba1607SAndroid Build Coastguard Worker   androidTestImplementation(libs.androidx.test.espresso.intents)
70*e6ba1607SAndroid Build Coastguard Worker   androidTestImplementation(libs.androidx.test.espresso.core)
71*e6ba1607SAndroid Build Coastguard Worker   androidTestImplementation(libs.androidx.test.ext.truth)
72*e6ba1607SAndroid Build Coastguard Worker   androidTestImplementation(libs.androidx.test.core)
73*e6ba1607SAndroid Build Coastguard Worker   androidTestImplementation(libs.androidx.test.ext.junit)
74*e6ba1607SAndroid Build Coastguard Worker   androidTestImplementation(platform(libs.kotlin.bom))
75*e6ba1607SAndroid Build Coastguard Worker   androidTestImplementation(libs.truth)
76*e6ba1607SAndroid Build Coastguard Worker   androidTestUtil(libs.androidx.test.services)
77*e6ba1607SAndroid Build Coastguard Worker }
78