-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove unnecessary Compose flag for instrumentation projects
- Loading branch information
1 parent
1a284c7
commit 0e12e54
Showing
1 changed file
with
1 addition
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,7 @@ | ||
rootProject.name = "android-junit5-instrumentation" | ||
includeBuild("../build-logic") | ||
include(":core") | ||
include(":compose") | ||
include(":runner") | ||
include(":sample") | ||
include(":testutil") | ||
|
||
// Include the Compose library module only if a special flag is available. | ||
// The 'junit5.includeCompose' flag must be present in either of the following places: | ||
// 1) Project properties (i.e. "-Pxyz") | ||
// 2) local.properties | ||
val flagName = "junit5.includeCompose" | ||
|
||
val includeCompose = run { | ||
if (gradle.startParameter.projectProperties[flagName]?.toBoolean() == true) { | ||
// 1) | ||
true | ||
} else { | ||
// 2) | ||
java.util.Properties().apply { | ||
File(rootProject.projectDir, "local.properties").also { load(it.inputStream() )} | ||
}.getProperty(flagName, null)?.toBoolean() == true | ||
} | ||
} | ||
|
||
if (includeCompose) { | ||
include(":compose") | ||
} |