From a6652134a252180c5ab2808b80146393745abe45 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Tue, 21 Mar 2023 11:34:13 +0530 Subject: [PATCH] fix(build): remove unneeded `afterEvaluate` https://docs.gradle.org/8.1-rc-1/release-notes.html#:~:text=Easier%20customization%20of%20Kotlin%20options --- build-logic/build.gradle.kts | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts index 51b7232b..b138fa94 100644 --- a/build-logic/build.gradle.kts +++ b/build-logic/build.gradle.kts @@ -11,20 +11,18 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { `kotlin-dsl` } -afterEvaluate { - tasks.withType().configureEach { - sourceCompatibility = JavaVersion.VERSION_11.toString() - targetCompatibility = JavaVersion.VERSION_11.toString() - } +tasks.withType().configureEach { + sourceCompatibility = JavaVersion.VERSION_11.toString() + targetCompatibility = JavaVersion.VERSION_11.toString() +} - tasks.withType().configureEach { - kotlinOptions { - jvmTarget = JavaVersion.VERSION_11.toString() - freeCompilerArgs = freeCompilerArgs + listOf( - "-Xsam-conversions=class", - "-opt-in=kotlin.RequiresOptIn", - ) - } +tasks.withType().configureEach { + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + freeCompilerArgs = freeCompilerArgs + listOf( + "-Xsam-conversions=class", + "-opt-in=kotlin.RequiresOptIn", + ) } }