Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Upgrade appengine-plugins-core 0.10.0 #462

Merged
merged 6 commits into from
Oct 4, 2023
Merged

Conversation

suztomo
Copy link
Contributor

@suztomo suztomo commented Sep 29, 2023

How to reproduce the Guava Gradle error

$ gh pr checkout 462
$ ./gradlew build

You get the error:

> Task :compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
   > Could not resolve com.google.guava:guava:32.1.2-jre.
     Required by:
         project : > com.google.cloud.tools:appengine-plugins-core:0.10.0
      > The consumer was configured to find an API of a library compatible with Java 8, preferably in the form of class files, and its dependencies declared externally. However we cannot choose between the following variants of com.google.guava:guava:32.1.2-jre:
          - androidApiElements
          - jreApiElements
        All of them match the consumer attributes:
          - Variant 'androidApiElements' capabilities com.google.collections:google-collections:32.1.2-jre and com.google.guava:guava:32.1.2-jre declares an API of a library compatible with Java 8, packaged as a jar, and its dependencies declared externally:
              - Unmatched attributes:
                  - Provides attribute 'org.gradle.jvm.environment' with value 'android' but the consumer didn't ask for it
                  - Provides release status but the consumer didn't ask for it
          - Variant 'jreApiElements' capabilities com.google.collections:google-collections:32.1.2-jre and com.google.guava:guava:32.1.2-jre declares an API of a library compatible with Java 8, packaged as a jar, and its dependencies declared externally:
              - Unmatched attributes:
                  - Provides attribute 'org.gradle.jvm.environment' with value 'standard-jvm' but the consumer didn't ask for it
                  - Provides release status but the consumer didn't ask for it

@suztomo
Copy link
Contributor Author

suztomo commented Sep 29, 2023

The Gradle's metadata issue.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.9/userguide/command_line_interface.html#sec:command_line_warnings
2 actionable tasks: 1 executed, 1 up-to-date
Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
   > Could not resolve com.google.guava:guava:[32](https://github.com/GoogleCloudPlatform/app-gradle-plugin/actions/runs/6356647913/job/17266610505?pr=462#step:5:33).1.2-jre.
     Required by:
         project : > com.google.cloud.tools:appengine-plugins-core:0.10.0
      > The consumer was configured to find an API of a library compatible with Java 8, preferably in the form of class files, and its dependencies declared externally. However we cannot choose between the following variants of com.google.guava:guava:32.1.2-jre:
          - androidApiElements
          - jreApiElements
        All of them match the consumer attributes:
          - Variant 'androidApiElements' capabilities com.google.collections:google-collections:32.1.2-jre and com.google.guava:guava:32.1.2-jre declares an API of a library compatible with Java 8, packaged as a jar, and its dependencies declared externally:
              - Unmatched attributes:
                  - Provides attribute 'org.gradle.jvm.environment' with value 'android' but the consumer didn't ask for it
                  - Provides release status but the consumer didn't ask for it
          - Variant 'jreApiElements' capabilities com.google.collections:google-collections:32.1.2-jre and com.google.guava:guava:32.1.2-jre declares an API of a library compatible with Java 8, packaged as a jar, and its dependencies declared externally:
              - Unmatched attributes:
                  - Provides attribute 'org.gradle.jvm.environment' with value 'standard-jvm' but the consumer didn't ask for it
                  - Provides release status but the consumer didn't ask for it

CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Mike Eltsufin <[email protected]>
@suztomo suztomo marked this pull request as draft October 3, 2023 14:00
@suztomo suztomo marked this pull request as ready for review October 3, 2023 14:21
@suztomo
Copy link
Contributor Author

suztomo commented Oct 3, 2023

The commits of this pull request seems out-of-sync.

Screenshot 2023-10-03 at 10 21 35 AM

https://status.github.com/ seems green. I'll check the status later.

@suztomo suztomo closed this Oct 3, 2023
@suztomo suztomo reopened this Oct 3, 2023
@suztomo
Copy link
Contributor Author

suztomo commented Oct 3, 2023

Java 17 build failed:

    * What went wrong:
    Could not compile build file '/tmp/junit4401483509329901304/build.gradle'.
    > startup failed:
      General error during semantic analysis: Unsupported class file major version 61
  
      java.lang.IllegalArgumentException: Unsupported class file major version 61
      	at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:196)
      	at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:177)
      	at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:163)
      	at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:284)
      	at org.codehaus.groovy.ast.decompiled.AsmDecompiler.parseClass(AsmDecompiler.java:81)
      	at org.codehaus.groovy.control.ClassNodeResolver.findDecompiled(ClassNodeResolver.java:251)
      	at org.codehaus.groovy.control.ClassNodeResolver.tryAsLoaderClassOrScript(ClassNodeResolver.java:189)
      	at org.codehaus.groovy.control.ClassNodeResolver.findClassNode(ClassNodeResolver.java:169)

@meltsufin
Copy link
Member

@suztomo Can we just do the upgrade without adding Java 17 and Java 21 testing? I think it's a bigger task to be able to compile the plugin with Java 17 and 21.
See GoogleCloudPlatform/appengine-plugins#1002 and #412.

@suztomo
Copy link
Contributor Author

suztomo commented Oct 4, 2023

That's good. I don't add Java 17 and 21 builds here then.

@suztomo suztomo requested a review from meltsufin October 4, 2023 02:48
@suztomo
Copy link
Contributor Author

suztomo commented Oct 4, 2023

@meltsufin All checks passed. PTAL.

@suztomo suztomo merged commit effe4c1 into master Oct 4, 2023
3 checks passed
@suztomo suztomo deleted the appengine-plugins-core_0.10.0 branch October 4, 2023 11:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants