From b297db0d5a8e46a60b887ebd6d3f8614ff9b28b2 Mon Sep 17 00:00:00 2001 From: Sebastiano Poggi Date: Wed, 25 Oct 2023 15:09:06 +0100 Subject: [PATCH] Address PR comments --- .../kotlin/android-studio-releases-generator.gradle.kts | 6 ++---- .../src/main/kotlin/intellij-theme-generator.gradle.kts | 4 +--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/buildSrc/src/main/kotlin/android-studio-releases-generator.gradle.kts b/buildSrc/src/main/kotlin/android-studio-releases-generator.gradle.kts index f49a02976..08e93233a 100644 --- a/buildSrc/src/main/kotlin/android-studio-releases-generator.gradle.kts +++ b/buildSrc/src/main/kotlin/android-studio-releases-generator.gradle.kts @@ -9,7 +9,7 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension import org.jetbrains.kotlin.gradle.tasks.BaseKotlinCompile val extension: StudioVersionsGenerationExtension = - extensions.findByType(StudioVersionsGenerationExtension::class.java) + extensions.findByType() ?: extensions.create("androidStudioReleasesGenerator", StudioVersionsGenerationExtension::class.java) val task = @@ -34,7 +34,5 @@ tasks { } pluginManager.withPlugin("org.jetbrains.kotlin.jvm") { - extensions.getByType().apply { - sourceSets["main"].kotlin.srcDir(extension.targetDir) - } + the().sourceSets["main"].kotlin.srcDir(extension.targetDir) } diff --git a/buildSrc/src/main/kotlin/intellij-theme-generator.gradle.kts b/buildSrc/src/main/kotlin/intellij-theme-generator.gradle.kts index 3cc99b7c6..7c758d892 100644 --- a/buildSrc/src/main/kotlin/intellij-theme-generator.gradle.kts +++ b/buildSrc/src/main/kotlin/intellij-theme-generator.gradle.kts @@ -35,8 +35,6 @@ extension.all { } pluginManager.withPlugin("org.jetbrains.kotlin.jvm") { - extensions.getByType().apply { - sourceSets["main"].kotlin.srcDir(targetDir) - } + the().sourceSets["main"].kotlin.srcDir(targetDir) } }