From 5fc274413ad7b19fab13c86b5ac743328f61b6c2 Mon Sep 17 00:00:00 2001 From: Maximillian Leonov <91663102+MaximillianLeonov@users.noreply.github.com> Date: Mon, 3 Oct 2022 12:29:56 +0400 Subject: [PATCH] Replace allprojects block with subprojects block --- gradle/init.gradle.kts | 47 +++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/gradle/init.gradle.kts b/gradle/init.gradle.kts index 8b60df308..b44f7f643 100644 --- a/gradle/init.gradle.kts +++ b/gradle/init.gradle.kts @@ -28,29 +28,28 @@ initscript { } } -allprojects { - if (this == rootProject) { - return@allprojects - } - apply() - extensions.configure { - kotlin { - target("**/*.kt") - targetExclude("**/build/**/*.kt") - ktlint(ktlintVersion).userData(mapOf("android" to "true")) - licenseHeaderFile(rootProject.file("spotless/copyright.kt")) - } - format("kts") { - target("**/*.kts") - targetExclude("**/build/**/*.kts") - // Look for the first line that doesn't have a block comment (assumed to be the license) - licenseHeaderFile(rootProject.file("spotless/copyright.kts"), "(^(?![\\/ ]\\*).*$)") - } - format("xml") { - target("**/*.xml") - targetExclude("**/build/**/*.xml") - // Look for the first XML tag that isn't a comment (