I have a gradle task as follows which is throwing the below error while running:
Cannot set readonly property: level for class: org.gradle.internal.logging.services.DefaultLoggingManager
task swaggerGenerator(type: JavaExec) {
doFirst {
mkdir "$buildDir/api"
}
main = "xyz"
classpath = sourceSets.test.runtimeClasspath
logging.level = "ERROR"
}
Gradle version being used is 7.3.3