@@ -192,12 +192,12 @@ subprojects {
192192
193193 // Only apply if the project has the kotlin plugin added:
194194 plugins.withType<KotlinPluginWrapper > {
195- tasks.withType<KotlinCompile > {
195+ tasks.withType<KotlinCompile >().configureEach {
196196 kotlinOptions {
197197 jvmTarget = " 11"
198198 }
199199 }
200- tasks.withType<JavaCompile > {
200+ tasks.withType<JavaCompile >().configureEach {
201201 sourceCompatibility = " 11"
202202 targetCompatibility = " 11"
203203 }
@@ -221,7 +221,7 @@ subprojects {
221221 add(" api" , platform(rootProject.libs.wireBom))
222222 }
223223
224- tasks.withType<GenerateModuleMetadata > {
224+ tasks.withType<GenerateModuleMetadata >().configureEach {
225225 suppressedValidationErrors.add(" enforced-platform" )
226226 }
227227 }
@@ -238,7 +238,7 @@ subprojects {
238238 }
239239 }
240240
241- tasks.withType<Test > {
241+ tasks.withType<Test >().configureEach {
242242 useJUnitPlatform()
243243
244244 if (System .getenv(" CI" ) == " true" ) {
@@ -278,7 +278,7 @@ subprojects {
278278 }
279279 }
280280
281- tasks.withType<Detekt > {
281+ tasks.withType<Detekt >().configureEach {
282282 dependsOn(" :detektive:assemble" )
283283 exclude { it.file.absolutePath.contains(" /generated/source/" ) || it.file.absolutePath.contains(" SampledLogger" ) }
284284 }
0 commit comments