cloud-builders icon indicating copy to clipboard operation
cloud-builders copied to clipboard

[FR] Gradle Version update

Open bugoverdose opened this issue 4 years ago • 1 comments

Notice

Right now, gcr.io/cloud-builders/gradle uses Gradle version 5.6.2 which is way behind current 7.0 versions.

When I run 'gradle build' on my project on local environment it works fine, but when I use the gcr.io/cloud-builders/gradle image, the build fails.

I think this has to do with the gradle version differences because right now I'm using the 7.0 version on my computer.

Below is the build log I got on Google Cloud Platform.

BUILD
Starting Step #0
Step #0: Already have image (with digest): gcr.io/cloud-builders/gradle
Step #0: 
Step #0: Welcome to Gradle 5.6.2!
Step #0: 
Step #0: Here are the highlights of this release:
Step #0:  - Incremental Groovy compilation
Step #0:  - Groovy compile avoidance
Step #0:  - Test fixtures for Java projects
Step #0:  - Manage plugin versions via settings script
Step #0: 
Step #0: For more details see https://docs.gradle.org/5.6.2/release-notes.html
Step #0: 
Step #0: To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/5.6.2/userguide/gradle_daemon.html.
Step #0: Daemon will be stopped at the end of the build stopping after processing
Step #0: 
Step #0: > Task :buildSrc:compileKotlin
Step #0: The `kotlin-dsl` plugin applied to project ':buildSrc' enables experimental Kotlin compiler features. For more information see https://docs.gradle.org/5.6.2/userguide/kotlin_dsl.html#sec:kotlin-dsl_plugin
Step #0: 
Step #0: > Task :buildSrc:compileJava NO-SOURCE
Step #0: > Task :buildSrc:compileGroovy NO-SOURCE
Step #0: > Task :buildSrc:pluginDescriptors
Step #0: > Task :buildSrc:processResources
Step #0: > Task :buildSrc:classes
Step #0: > Task :buildSrc:inspectClassesForKotlinIC
Step #0: > Task :buildSrc:jar
Step #0: > Task :buildSrc:assemble
Step #0: 
Step #0: > Task :buildSrc:compileTestKotlin
Step #0: The `kotlin-dsl` plugin applied to project ':buildSrc' enables experimental Kotlin compiler features. For more information see https://docs.gradle.org/5.6.2/userguide/kotlin_dsl.html#sec:kotlin-dsl_plugin
Step #0: 
Step #0: > Task :buildSrc:pluginUnderTestMetadata
Step #0: > Task :buildSrc:compileTestJava NO-SOURCE
Step #0: > Task :buildSrc:compileTestGroovy NO-SOURCE
Step #0: > Task :buildSrc:processTestResources NO-SOURCE
Step #0: > Task :buildSrc:testClasses UP-TO-DATE
Step #0: > Task :buildSrc:test
Step #0: > Task :buildSrc:validateTaskProperties
Step #0: > Task :buildSrc:check
Step #0: > Task :buildSrc:build
Step #0: > Task :compileKotlin NO-SOURCE
Step #0: > Task :compileJava NO-SOURCE
Step #0: > Task :processResources NO-SOURCE
Step #0: > Task :classes UP-TO-DATE
Step #0: > Task :inspectClassesForKotlinIC
Step #0: > Task :jar
Step #0: > Task :assemble
Step #0: > Task :compileTestKotlin NO-SOURCE
Step #0: > Task :compileTestJava NO-SOURCE
Step #0: > Task :processTestResources NO-SOURCE
Step #0: > Task :testClasses UP-TO-DATE
Step #0: > Task :test NO-SOURCE
Step #0: > Task :check UP-TO-DATE
Step #0: > Task :build
Step #0: 
Step #0: > Task :service:compileKotlin FAILED
Step #0: e: /workspace/service/src/main/kotlin/waffle/guam/service/ChatService.kt: (55, 32): Function invocation 'isEmpty(...)' expected
Step #0: e: /workspace/service/src/main/kotlin/waffle/guam/service/ChatService.kt: (55, 32): Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: 
Step #0: public inline fun <T> Array<out ???>.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun BooleanArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun ByteArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun CharArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun CharSequence.isEmpty(): Boolean defined in kotlin.text
Step #0: public inline fun DoubleArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun FloatArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun IntArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun LongArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun ShortArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: e: /workspace/service/src/main/kotlin/waffle/guam/service/ChatService.kt: (96, 32): Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: 
Step #0: public inline fun <T> Array<out ???>.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun BooleanArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun ByteArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun CharArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun CharSequence.isEmpty(): Boolean defined in kotlin.text
Step #0: public inline fun DoubleArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun FloatArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun IntArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun LongArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun ShortArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: e: /workspace/service/src/main/kotlin/waffle/guam/service/ChatService.kt: (114, 32): Function invocation 'isEmpty(...)' expected
Step #0: e: /workspace/service/src/main/kotlin/waffle/guam/service/ChatService.kt: (114, 32): Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: 
Step #0: public inline fun <T> Array<out ???>.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun BooleanArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun ByteArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun CharArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun CharSequence.isEmpty(): Boolean defined in kotlin.text
Step #0: public inline fun DoubleArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun FloatArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun IntArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun LongArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun ShortArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: e: /workspace/service/src/main/kotlin/waffle/guam/service/ChatService.kt: (131, 27): Function invocation 'isEmpty(...)' expected
Step #0: e: /workspace/service/src/main/kotlin/waffle/guam/service/ChatService.kt: (131, 27): Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: 
Step #0: public inline fun <T> Array<out ???>.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun BooleanArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun ByteArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun CharArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun CharSequence.isEmpty(): Boolean defined in kotlin.text
Step #0: public inline fun DoubleArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun FloatArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun IntArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun LongArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun ShortArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: e: /workspace/service/src/main/kotlin/waffle/guam/service/ChatService.kt: (148, 33): Function invocation 'isEmpty(...)' expected
Step #0: e: /workspace/service/src/main/kotlin/waffle/guam/service/ChatService.kt: (148, 33): Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: 
Step #0: public inline fun <T> Array<out ???>.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun BooleanArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun ByteArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun CharArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun CharSequence.isEmpty(): Boolean defined in kotlin.text
Step #0: public inline fun DoubleArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun FloatArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun IntArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun LongArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun ShortArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: e: /workspace/service/src/main/kotlin/waffle/guam/service/ChatService.kt: (166, 33): Function invocation 'isEmpty(...)' expected
Step #0: e: /workspace/service/src/main/kotlin/waffle/guam/service/ChatService.kt: (166, 33): Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: 
Step #0: public inline fun <T> Array<out ???>.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun BooleanArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun ByteArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun CharArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun CharSequence.isEmpty(): Boolean defined in kotlin.text
Step #0: public inline fun DoubleArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun FloatArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun IntArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun LongArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: public inline fun ShortArray.isEmpty(): Boolean defined in kotlin.collections
Step #0: 
Step #0: FAILURE: Build failed with an exception.
Step #0: 
Step #0: * What went wrong:
Step #0: Execution failed for task ':service:compileKotlin'.
Step #0: > Compilation error. See log for more details
Step #0: 
Step #0: * Try:
Step #0: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Step #0: 
Step #0: * Get more help at https://help.gradle.org
Step #0: 
Step #0: BUILD FAILED in 57s
Step #0: 3 actionable tasks: 3 executed
Finished Step #0

bugoverdose avatar May 17 '21 12:05 bugoverdose

I'm guessing this won't happen -- the README for this project suggests using the upstream Gradle docker image instead: https://github.com/GoogleCloudPlatform/cloud-builders/blob/master/gradle/README.md.

rocketraman avatar Jun 30 '21 00:06 rocketraman