android / architecture-samples

A collection of samples to discuss and showcase different architectural tools and patterns for Android apps.
Apache License 2.0
44.38k stars 11.63k forks source link

Fix failing lint task in shared-test #989

Closed jamesonwilliams closed 7 months ago

jamesonwilliams commented 9 months ago

When you run ./gradlew clean build, the :shared-test:lintDebug task will fail:

FakeTaskDao.kt:66: Error: Call requires API level 24 (current min is 21): java.util.Collection#removeIf [NewApi]
              entries.removeIf { it.value.isCompleted }
                      ~~~~~~~~

A proposed solution is to label the enclosing function with @RequiresApi(Build.VERSION_CODES.N). With that change in place, ./gradlew clean build can now complete successfully.