Closed steven-sheehy closed 7 months ago
Hello,
You're right, the plugin execution is not compatible with the gradle --configuration-cache
parameter.
I'll check that Etienne
Hi @etienne-sf any chance you were able to look into this? It seems like the main change would be to move the 3 paths targetResourceFolder
, targetSourceFolder
, and schemaPersonalizationFile
in GenerateCodeCommonExtension
to be modeled as task inputs instead as Gradle recommends.
I attempted to clone the repo to attempt to contribute but I can't even get the project to compile. Are there any contribution guides? It seems like it requires an older 1.8 java version, but even when using that JDK it fails with:
graphql-gradle-plugin-project$ ./gradlew build
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'graphql-gradle-plugin-project'.
> Could not determine the dependencies of null.
> Could not resolve all task dependencies for configuration ':classpath'.
> Could not resolve org.springframework:spring-context:6.0.9.
Required by:
project : > project :graphql-gradle-plugin3
> No matching variant of org.springframework:spring-context:6.0.9 was found. The consumer was configured to find a runtime of a library compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.6.1' but:
- Variant 'apiElements' capability org.springframework:spring-context:6.0.9 declares a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares an API of a component compatible with Java 17 and the consumer needed a runtime of a component compatible with Java 8
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '7.6.1')
- Variant 'runtimeElements' capability org.springframework:spring-context:6.0.9 declares a runtime of a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component compatible with Java 17 and the consumer needed a component compatible with Java 8
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '7.6.1')
> Could not resolve org.springframework:spring-context:5.3.31.
Required by:
project : > project :graphql-gradle-plugin > com.graphql-java-generator:graphql-maven-plugin-logic:2.4 > com.graphql-java-generator:graphql-java-common-runtime:2.4 > com.graphql-java-generator:graphql-java-common-dependencies:2.4
> No matching variant of org.springframework:spring-context:6.0.9 was found. The consumer was configured to find a runtime of a library compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.6.1' but:
- Variant 'apiElements' capability org.springframework:spring-context:6.0.9 declares a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares an API of a component compatible with Java 17 and the consumer needed a runtime of a component compatible with Java 8
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '7.6.1')
- Variant 'runtimeElements' capability org.springframework:spring-context:6.0.9 declares a runtime of a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component compatible with Java 17 and the consumer needed a component compatible with Java 8
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '7.6.1')
Might consider bumping the java version to one that's not end of life.
Hello,
You're right, I must update the Gradle version. To be honest, I postponed this one, as I'm tired of fighting against Gradle: making the Gradle plugin work is way more complex than with the Maven one.
And I'll check the Howto compile, also. Thanks for the report.
Étienne
I updated the howto build page : the needed java version is 17. It actually generates two plugins:
graphql-gradle-plugin
is built against java 8 for Spring Boot 2 and Spring Framework 5 (yes, it may seem old school, but I guess lots if not most of enterprise users uses these versions)graphql-gradle-plugin3
is built against java 17 for Spring Boot 3 and Spring Framework 6Making the build compatible with the Gradle configuration cache was far from easy. It was actually quite a journey.
But it's now done, and will be available in the next release.
Solved in the 2.5 release
Thanks a lot @etienne-sf! I'll test out the new release soon.
Trying to upgrade my project to Gradle 8 and use the new configuration cache. I'm currently using
gradle.plugin.com.graphql-java-generator:graphql-gradle-plugin:1.18.10
. When enabling the experimental configuration cache I get the following error: