[Gradle] Add version checks on warnings suppression for old AGP versions

This commit is contained in:
Alexander.Likhachev
2023-01-16 21:19:31 +01:00
parent 150b8061e9
commit 21624d6d07
2 changed files with 7 additions and 7 deletions
@@ -356,10 +356,10 @@ class MultiplatformGradleIT : BaseGradleIT() {
options = defaultBuildOptions().copy(
androidGradlePluginVersion = AGPVersion.v4_2_0,
androidHome = KtTestUtil.findAndroidSdk().also { acceptAndroidSdkLicenses(it) },
// Workaround for a deprecation warning from AGP
// Relying on FileTrees for ignoring empty directories when using @SkipWhenEmpty has been deprecated.
warningMode = WarningMode.None,
),
).suppressDeprecationWarningsOnAgpLessThan(
AGPVersion.v7_3_0,
"uses deprecated IncrementalTaskInputs; relies on FileTrees for ignoring empty directories when using @SkipWhenEmpty"
)
) {
assertSuccessful()
assertTasksExecuted(":lib1:compileDebugKotlin")
@@ -1577,9 +1577,9 @@ class NewMultiplatformIT : BaseGradleIT() {
// https://issuetracker.google.com/issues/152187160
options = defaultBuildOptions().copy(
androidGradlePluginVersion = AGPVersion.v4_2_0,
// Workaround for a deprecation warning from AGP
// Relying on FileTrees for ignoring empty directories when using @SkipWhenEmpty has been deprecated.
warningMode = WarningMode.None,
).suppressDeprecationWarningsOnAgpLessThan(
AGPVersion.v7_3_0,
"uses deprecated IncrementalTaskInputs; relies on FileTrees for ignoring empty directories when using @SkipWhenEmpty"
)
) {
assertSuccessful()