Skip to content

Commit 4116eab

Browse files
staktracesvc-squareup-copybara
authored andcommitted
Use lazy task configuration
GitOrigin-RevId: 7d6037f7f0b5b0649b2064ebff470a785c12c1ab
1 parent 2bb4d0e commit 4116eab

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

build.gradle.kts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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
}

misk-api/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ mavenPublishing {
1919
)
2020
}
2121

22-
tasks.withType<KotlinCompile> {
22+
tasks.withType<KotlinCompile>().configureEach {
2323
compilerOptions {
2424
freeCompilerArgs.add("-Xjvm-default=all-compatibility")
2525
}

misk-rate-limiting-bucket4j-redis/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ dependencies {
3939
testFixturesImplementation(libs.bucket4jRedis)
4040
}
4141

42-
tasks.withType<Test> {
42+
tasks.withType<Test>().configureEach {
4343
dependsOn(":startRedis")
4444
}
4545

misk-redis/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ dependencies {
6767
testFixturesImplementation(project(":misk-service"))
6868
}
6969

70-
tasks.withType<Test> {
70+
tasks.withType<Test>().configureEach {
7171
dependsOn(":startRedis")
7272
}
7373

samples/exemplarchat/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ tasks.jar {
4040
archiveClassifier.set("unshaded")
4141
}
4242

43-
tasks.withType<Test> {
43+
tasks.withType<Test>().configureEach {
4444
dependsOn(":startRedis")
4545
}

0 commit comments

Comments
 (0)