OS: Windows 11
IDE: IntelliJ
Gradle Version: 7.0
After running gradle build command using gradle 7, i get following in the output
> Task :composition-protobuf:processResources
Execution optimizations have been disabled for task ':composition-protobuf:processResources' to ensure correctness due to the following reasons:
- Gradle detected a problem with the following location: 'C:\workspace\exp-studio\es-backend\composition-protobuf\src\main\proto'. Reason: Task ':composition-protobuf:processResources' uses this output of task ':composition-protobuf:generateProto' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.0/userguide/validation_problems.html#implicit_dependency for more details about this problem.
- Gradle detected a problem with the following location: 'C:\workspace\exp-studio\es-backend\composition-protobuf\src\main\resources'. Reason: Task ':composition-protobuf:processResources' uses this output of task ':composition-protobuf:generateProto' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.0/userguide/validation_problems.html#implicit_dependency for more details about this problem.
Gradle detected a problem with the following location: 'C:\workspace\exp-studio\es-backend\composition-protobuf\src\main\proto'. Reason: Task ':composition-protobuf:processResources' uses this output of task ':composition-protobuf:generateProto' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.0/userguide/validation_problems.html#implicit_dependency for more details about this problem. This behaviour has been deprecated and is scheduled to be removed in Gradle 8.0. Execution optimizations are disabled to ensure correctness. See https://docs.gradle.org/7.0/userguide/more_about_tasks.html#sec:up_to_date_checks for more details.
Gradle detected a problem with the following location: 'C:\workspace\exp-studio\es-backend\composition-protobuf\src\main\resources'. Reason: Task ':composition-protobuf:processResources' uses this output of task ':composition-protobuf:generateProto' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.0/userguide/validation_problems.html#implicit_dependency for more details about this problem. This behaviour has been deprecated and is scheduled to be removed in Gradle 8.0. Execution optimizations are disabled to ensure correctness. See https://docs.gradle.org/7.0/userguide/more_about_tasks.html#sec:up_to_date_checks for more details.
My build.gradle file looks like below:
plugins {
id 'java'
id "com.google.protobuf" version "0.8.17"
}
repositories {
mavenCentral()
}
dependencies {
implementation 'com.google.protobuf:protobuf-java:3.0.0'
implementation group: 'io.grpc', name: 'grpc-all', version: '1.0.0'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0'
}
sourceSets {
main {
java {
srcDirs 'build/generated/source/proto/main/grpc'
srcDirs 'build/generated/source/proto/main/java'
}
}
}
test {
useJUnitPlatform()
}
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:3.0.0"
}
plugins {
grpc {
artifact = 'io.grpc:protoc-gen-grpc-java:1.23.0'
}
}
generatedFilesBaseDir = 'src'
generateProtoTasks {
all()*.plugins {
grpc {}
}
}
}
What am i missing, with implicit dependency that is causing this issue.
In Gradle 7.0 this is a warning, and the build is successful.
Once i upgrade to Gradle 8.0 it becomes an error and the build breaks.
Please advice what needs to be added that i am missing.
Thank you.