in plugin/src/functionalTest/kotlin/com/android/gradle/replicator/BuildFeaturesTests.kt [149:208]
fun testCompose() {
val projectSetup = setup()
projectSetup.buildFile.appendText("""
android {
buildFeatures {
compose = true
}
}
""".trimIndent())
projectSetup.runner.build()
// Verify the result
Truth.assertThat(projectSetup.projectDir.resolve("build/project-structure.json").readText()).isEqualTo("""
{
"gradle": "$GRADLE_VERSION",
"agp": "$AGP_VERSION",
"kotlin": "n/a",
"properties": [],
"rootModule": {
"path": ":",
"plugins": [
"com.android.application"
],
"javaSources": {
"fileCount": 0
},
"androidResources": {
"animator": [],
"anim": [],
"color": [],
"drawable": [],
"font": [],
"layout": [],
"menu": [],
"mipmap": [],
"navigation": [],
"raw": [],
"transition": [],
"values": [],
"xml": []
},
"javaResources": {},
"assets": {},
"dependencies": [],
"android": {
"compileSdkVersion": "android-30",
"minSdkVersion": 24,
"targetSdkVersion": 30,
"buildFeatures": {
"compose": true
}
}
},
"modules": []
}
""".trimIndent())
}