I'm trying to upgrade an old project. Actually, I had to upgrade targetAPILevel to 33 from 30 which eventually requires JDK upgrade from 1.8 to 11.I could be wrong but JDK 11 requires Gradle version upgrade from 4.2 to 7. So I did upgrade Gradle to 7. Now gradle build was working fine on 4.2 but on version 7 it doesn't build gradle.build and throws following error.
Could not compile build file '/Users/builder/Documents/payment/Clients/iOS/build.gradle'.
> startup failed:
build file '/Users/builder/Documents/payment/Clients/iOS/build.gradle': 117: Unexpected input: '{' @ line 117, column 28.
gradle.taskGraph.whenReady { taskGraph ->
It complains about "{". I have basic knowledge of gradle tasks and I'm learning as doing all of this.
following is the Gradle code where this line came from :
gradle.taskGraph.whenReady { taskGraph ->
if (taskGraph.hasTask(package) ) {
if (project.hasProperty('buildtype')) {
buildType = buildtype
println "### Project has buildType = $buildType"
}
Can someone please guide me how to handle this?