From 8a1625ec7906a3f396d0f217cd8c168f539b5167 Mon Sep 17 00:00:00 2001 From: Howard Wu Date: Wed, 1 Nov 2023 10:14:31 +0800 Subject: [PATCH] buildDir deprecated, use layout.buildDirectory instead (#10097) gradle/gradle#20210 gradle/gradle#24820 --- app/build.gradle.kts | 4 ++-- build.gradle.kts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 3d120e8aa..e3c2aa74f 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -301,12 +301,12 @@ tasks { kotlinOptions.freeCompilerArgs += listOf( "-P", "plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" + - project.buildDir.absolutePath + "/compose_metrics", + project.layout.buildDirectory.dir("compose_metrics").get().asFile.absolutePath, ) kotlinOptions.freeCompilerArgs += listOf( "-P", "plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=" + - project.buildDir.absolutePath + "/compose_metrics", + project.layout.buildDirectory.dir("compose_metrics").get().asFile.absolutePath, ) } } diff --git a/build.gradle.kts b/build.gradle.kts index 1e5493377..2de38cbab 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -56,5 +56,5 @@ subprojects { } tasks.register("clean") { - delete(rootProject.buildDir) + delete(rootProject.layout.buildDirectory) }