@@ -28,29 +28,28 @@ initscript {
2828 }
2929}
3030
31- allprojects {
32- if (this == rootProject) {
33- return @allprojects
34- }
35- apply< com.diffplug.gradle.spotless.SpotlessPlugin > ()
36- extensions.configure< com.diffplug.gradle.spotless.SpotlessExtension > {
37- kotlin {
38- target(" **/*.kt" )
39- targetExclude(" **/build/**/*.kt" )
40- ktlint(ktlintVersion).userData(mapOf (" android" to " true" ))
41- licenseHeaderFile(rootProject.file(" spotless/copyright.kt" ))
42- }
43- format(" kts" ) {
44- target(" **/*.kts" )
45- targetExclude(" **/build/**/*.kts" )
46- // Look for the first line that doesn't have a block comment (assumed to be the license)
47- licenseHeaderFile(rootProject.file(" spotless/copyright.kts" ), " (^(?![\\ / ]\\ *).*$)" )
48- }
49- format(" xml" ) {
50- target(" **/*.xml" )
51- targetExclude(" **/build/**/*.xml" )
52- // Look for the first XML tag that isn't a comment (<!--) or the xml declaration (<?xml)
53- licenseHeaderFile(rootProject.file(" spotless/copyright.xml" ), " (<[^!?])" )
31+ rootProject {
32+ subprojects {
33+ apply< com.diffplug.gradle.spotless.SpotlessPlugin > ()
34+ extensions.configure< com.diffplug.gradle.spotless.SpotlessExtension > {
35+ kotlin {
36+ target(" **/*.kt" )
37+ targetExclude(" **/build/**/*.kt" )
38+ ktlint(ktlintVersion).userData(mapOf (" android" to " true" ))
39+ licenseHeaderFile(rootProject.file(" spotless/copyright.kt" ))
40+ }
41+ format(" kts" ) {
42+ target(" **/*.kts" )
43+ targetExclude(" **/build/**/*.kts" )
44+ // Look for the first line that doesn't have a block comment (assumed to be the license)
45+ licenseHeaderFile(rootProject.file(" spotless/copyright.kts" ), " (^(?![\\ / ]\\ *).*$)" )
46+ }
47+ format(" xml" ) {
48+ target(" **/*.xml" )
49+ targetExclude(" **/build/**/*.xml" )
50+ // Look for the first XML tag that isn't a comment (<!--) or the xml declaration (<?xml)
51+ licenseHeaderFile(rootProject.file(" spotless/copyright.xml" ), " (<[^!?])" )
52+ }
5453 }
5554 }
56- }
55+ }
0 commit comments