Add explicit dependency of sonarResolver task to processResources

Otherwise `:codegen:sonarResolver` fails
This commit is contained in:
Jorge Martín
2026-08-13 09:46:16 +02:00
committed by Jorge Martin Espinosa
parent 690ffa54ce
commit 590e33de71
+8
View File
@@ -1,3 +1,5 @@
import org.sonarqube.gradle.SonarResolverTask
/* /*
* Copyright (c) 2025 Element Creations Ltd. * Copyright (c) 2025 Element Creations Ltd.
* Copyright 2022-2025 New Vector Ltd. * Copyright 2022-2025 New Vector Ltd.
@@ -18,3 +20,9 @@ dependencies {
implementation(libs.ksp.plugin) implementation(libs.ksp.plugin)
implementation(libs.kotlinpoet.ksp) implementation(libs.kotlinpoet.ksp)
} }
// Ensure that the processResources task is executed before the SonarResolverTask to avoid issues with missing resources during SonarQube analysis.
// This *should not be necesssary* but is a workaround for a known issue with the SonarQube Gradle plugin.
tasks.withType<SonarResolverTask>().configureEach {
dependsOn("processResources")
}