Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ android {
@Suppress("UnstableApiUsage")
testOptions {
execution = "ANDROIDX_TEST_ORCHESTRATOR"
animationsDisabled = true
Comment on lines 82 to +84
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While disabling animations for tests is a good practice for improving stability and performance, this change introduces the same configuration to 8 different build.gradle.kts files. This duplication can lead to maintenance challenges in the future, such as forgetting to add it to new modules or having to update it in multiple places.

To improve maintainability, I recommend centralizing this configuration. You could, for example, extract this into a common script in the gradle/ directory and apply it where needed. An even better, more scalable approach for a multi-module project like this would be to use convention plugins.


managedDevices {
localDevices {
Expand Down
2 changes: 2 additions & 0 deletions core/camera/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ android {

@Suppress("UnstableApiUsage")
testOptions {
animationsDisabled = true

managedDevices {
localDevices {
create("pixel2Api28") {
Expand Down
4 changes: 3 additions & 1 deletion core/model/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ android {

@Suppress("UnstableApiUsage")
testOptions {
animationsDisabled = true

managedDevices {
localDevices {
create("pixel2Api28") {
Expand Down Expand Up @@ -104,4 +106,4 @@ protobuf {
// Allow references to generated code
kapt {
correctErrorTypes = true
}
}
2 changes: 2 additions & 0 deletions data/media/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ android {

@Suppress("UnstableApiUsage")
testOptions {
animationsDisabled = true

managedDevices {
localDevices {
create("pixel2Api28") {
Expand Down
2 changes: 2 additions & 0 deletions data/settings/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ android {

@Suppress("UnstableApiUsage")
testOptions {
animationsDisabled = true

managedDevices {
localDevices {
create("pixel2Api28") {
Expand Down
2 changes: 2 additions & 0 deletions feature/postcapture/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ android {

@Suppress("UnstableApiUsage")
testOptions {
animationsDisabled = true

unitTests {
isReturnDefaultValues = true
isIncludeAndroidResources = true
Expand Down
2 changes: 2 additions & 0 deletions feature/preview/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ android {

@Suppress("UnstableApiUsage")
testOptions {
animationsDisabled = true

unitTests {
isReturnDefaultValues = true
isIncludeAndroidResources = true
Expand Down
2 changes: 2 additions & 0 deletions feature/settings/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ android {

@Suppress("UnstableApiUsage")
testOptions {
animationsDisabled = true

managedDevices {
localDevices {
create("pixel2Api28") {
Expand Down