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