• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 34
10    namespace 'org.robolectric.integration.axt'
11
12    defaultConfig {
13        testApplicationId 'org.robolectric.integrationtests.axt'
14        minSdk 19
15        targetSdk 34
16        multiDexEnabled true
17        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
18        testInstrumentationRunnerArguments useTestStorageService: 'true'
19    }
20
21    compileOptions {
22        sourceCompatibility = '1.8'
23        targetCompatibility = '1.8'
24    }
25
26    testOptions {
27        unitTests {
28            includeAndroidResources = true
29        }
30    }
31    sourceSets {
32        String sharedTestDir = 'src/sharedTest/'
33        String sharedTestSourceDir = sharedTestDir + 'java'
34        String sharedTestResourceDir = sharedTestDir + 'resources'
35        String sharedAndroidManifest = sharedTestDir + "AndroidManifest.xml"
36        test.resources.srcDirs += sharedTestResourceDir
37        test.java.srcDirs += sharedTestSourceDir
38        test.manifest.srcFile sharedAndroidManifest
39        androidTest.resources.srcDirs += sharedTestResourceDir
40        androidTest.java.srcDirs += sharedTestSourceDir
41        androidTest.manifest.srcFile sharedAndroidManifest
42    }
43}
44
45dependencies {
46    implementation libs.androidx.appcompat
47    implementation libs.androidx.constraintlayout
48    implementation libs.androidx.multidex
49
50    // Testing dependencies
51    testImplementation project(":robolectric")
52    testImplementation libs.androidx.test.runner
53    testImplementation libs.junit4
54    testImplementation libs.androidx.test.rules
55    testImplementation libs.androidx.test.espresso.intents
56    testImplementation libs.androidx.test.espresso.core
57    testImplementation libs.androidx.test.ext.truth
58    testImplementation libs.androidx.test.core
59    testImplementation libs.androidx.biometric
60    testImplementation libs.androidx.fragment
61    testImplementation libs.androidx.fragment.testing
62    testImplementation libs.androidx.test.ext.junit
63    testImplementation libs.truth
64
65    androidTestImplementation project(':annotations')
66    androidTestImplementation libs.androidx.test.runner
67    androidTestImplementation libs.junit4
68    androidTestImplementation libs.androidx.test.rules
69    androidTestImplementation libs.androidx.test.espresso.intents
70    androidTestImplementation libs.androidx.test.espresso.core
71    androidTestImplementation libs.androidx.test.ext.truth
72    androidTestImplementation libs.androidx.test.core
73    androidTestImplementation libs.androidx.test.ext.junit
74    androidTestImplementation libs.truth
75    androidTestUtil libs.androidx.test.services
76}
77