• 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
11    defaultConfig {
12        minSdk 16
13        targetSdk 33
14        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
15    }
16
17    lintOptions {
18        abortOnError false
19    }
20
21    testOptions {
22        unitTests {
23            includeAndroidResources = true
24        }
25    }
26
27    compileOptions {
28        sourceCompatibility 1.8
29        targetCompatibility 1.8
30    }
31
32    aaptOptions {
33        noCompress 'txt'
34    }
35
36    sourceSets {
37        String sharedTestDir = 'src/sharedTest/'
38        String sharedTestSourceDir = sharedTestDir + 'java'
39        String sharedTestResourceDir = sharedTestDir + 'resources'
40        test.resources.srcDirs += sharedTestResourceDir
41        test.java.srcDirs += sharedTestSourceDir
42        androidTest.resources.srcDirs += sharedTestResourceDir
43        androidTest.java.srcDirs += sharedTestSourceDir
44    }
45}
46
47dependencies {
48    implementation project(':testapp')
49
50    testImplementation project(':robolectric')
51    testImplementation "junit:junit:${junitVersion}"
52    testImplementation("androidx.test:monitor:$axtMonitorVersion")
53    testImplementation("androidx.test:runner:$axtRunnerVersion")
54    testImplementation("androidx.test:rules:$axtRulesVersion")
55    testImplementation("androidx.test.ext:junit:$axtJunitVersion")
56    testImplementation("androidx.test.ext:truth:$axtTruthVersion")
57    testImplementation("androidx.test:core:$axtCoreVersion")
58    testImplementation("com.google.truth:truth:${truthVersion}")
59    testImplementation("com.google.guava:guava:$guavaJREVersion")
60
61    // Testing dependencies
62    androidTestImplementation project(':shadowapi')
63    androidTestImplementation("androidx.test:monitor:$axtMonitorVersion")
64    androidTestImplementation("androidx.test:runner:$axtRunnerVersion")
65    androidTestImplementation("androidx.test:rules:$axtRulesVersion")
66    androidTestImplementation("androidx.test.ext:junit:$axtJunitVersion")
67    androidTestImplementation("androidx.test.ext:truth:$axtTruthVersion")
68    androidTestImplementation("com.google.truth:truth:${truthVersion}")
69    androidTestImplementation("com.google.guava:guava:$guavaJREVersion")
70    androidTestUtil "androidx.test.services:test-services:$axtTestServicesVersion"
71}
72