1 /**
2  * This is an adaptation of the build.gradle found in external/android_onboarding.
3  * There are certain classes that must be modified in order to work with the sysui studio build.
4  */
<lambda>null5 plugins {
6     id(libs.plugins.android.library.get().pluginId)
7     id(libs.plugins.kotlin.android.get().pluginId)
8     id(libs.plugins.kotlin.kapt.get().pluginId)
9 }
10 
11 val top = extra["ANDROID_TOP"].toString()
12 val moduleDir =
13         "$top/external/android_onboarding/src/com/android/onboarding/contracts/testing"
14 val robolibBuildDir = project(":RobolectricLib").buildDir.toString()
15 
<lambda>null16 android {
17     namespace = "com.android.onboarding.contracts.testing"
18     defaultConfig {
19         vectorDrawables.useSupportLibrary = true
20     }
21 
22     buildTypes {
23         release {
24             isMinifyEnabled = false
25         }
26     }
27 
28     sourceSets {
29         sourceSets.getByName("main") {
30             manifest.srcFile("$moduleDir/AndroidManifest.xml")
31             java.srcDirs(listOf("src", symlinkedSources(moduleDir) {
32                 // Excluded until g3 finishes appcompat migration
33                 exclude("TestAppCompatActivity.kt")
34             }))
35         }
36     }
37 }
38 
39 dependencies {
40     api(libs.androidx.annotation)
41     api(project(":android_onboarding.contracts"))
42     api(libs.androidx.test.core)
43     api(libs.androidx.activity.ktx)
44     api(libs.androidx.fragment.ktx)
45     api(libs.androidx.appcompat)
46     api(libs.apache.commons.lang3)
47     api(kotlin("reflect"))
48 
49     api(project(":RobolectricLib"))
50     // this is compile only, to work around the incomplete MockSDK provided to SysUIStudio
51     // from it's ./studiow script.  Robolectric will provide this jar at runtime via
52     // It's SdkProvider and will also apply shadow logic at that time.
<lambda>null53     api(fileTree("${robolibBuildDir}/android_all/") {
54         include("*.jar")
55     })
56     api(libs.truth)
57 }