Skip to content

Switch the gradle plugin to gratatouille #6524

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 13, 2025
Merged

Switch the gradle plugin to gratatouille #6524

merged 2 commits into from
Jun 13, 2025

Conversation

martinbonnin
Copy link
Contributor

@martinbonnin martinbonnin commented May 13, 2025

Advantages:

  • Removes a lot of boilerplate code (Workers, Tasks, etc..) and enforces all the tasks use the same coding conventions.
  • Makes the build faster because there is no need to call R8 anymore (took ~30s on average).
  • Easier debugging and better stacktraces because there is no relocation anymore.

User-facing changes:

  • com.apollographql.apollo.compiler.* is not available anymore from the build script classpath.
    • This PR adds apollo-compiler symbol overlays as DeprecationLevel.Error.
    • This means someone trying to have both apollo-gradle-plugin and apollo-compiler in their classpath will get an error when trying to use those for presumably legit reasons. But the workaround of just using the String literal is easy.
  • a bunch of CLI tasks are removed (push, convert, download).
    • Issue here for tracking.
    • We could reintroduce them back in the Gradle plugin if there is push back.
  • It's not possible to control the filesystem location of task outputs anymore.
    • Doing so now triggers an error.
    • If the file need to be in a very specific place, users should copy them.
  • The operationOutput manifest format is not supported anymore and replaced with persistedQueryManifest.
  • Services starting with a non-letter char will be capitalized slightly differently: generate_ServiceApolloSources -> generate_serviceApolloSources. I think this is more in-line with what Gradle is doing generally.

@svc-apollo-docs
Copy link
Collaborator

svc-apollo-docs commented May 13, 2025

✅ Docs preview ready

The preview is ready to be viewed. View the preview

File Changes

0 new, 5 changed, 0 removed
* (developer-tools)/kotlin/v5/advanced/persisted-queries.mdx
* (developer-tools)/kotlin/v5/advanced/plugin-configuration.mdx
* (developer-tools)/kotlin/v5/caching/declarative-ids.mdx
* (developer-tools)/kotlin/v5/caching/programmatic-ids.mdx
* (developer-tools)/kotlin/v5/essentials/modules.mdx

Build ID: 8b06e9ec2dc59142095d6e57

URL: https://www.apollographql.com/docs/deploy-preview/8b06e9ec2dc59142095d6e57

@apollo-librarian
Copy link

apollo-librarian bot commented Jun 10, 2025

✅ Docs preview ready

The preview is ready to be viewed. View the preview

File Changes

0 new, 5 changed, 0 removed
* (developer-tools)/kotlin/v5/advanced/persisted-queries.mdx
* (developer-tools)/kotlin/v5/advanced/plugin-configuration.mdx
* (developer-tools)/kotlin/v5/caching/declarative-ids.mdx
* (developer-tools)/kotlin/v5/caching/programmatic-ids.mdx
* (developer-tools)/kotlin/v5/essentials/modules.mdx

Build ID: caad65a52201191c4c9a2829

URL: https://www.apollographql.com/docs/deploy-preview/caad65a52201191c4c9a2829

@martinbonnin martinbonnin force-pushed the gratatouille branch 12 times, most recently from 1a4876c to c27f753 Compare June 12, 2025 08:15
@martinbonnin martinbonnin force-pushed the gratatouille branch 3 times, most recently from 86e8d34 to 3e06dfb Compare June 12, 2025 10:30
Copy link
Contributor

@BoD BoD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 🐀 🧑‍🍳

@martinbonnin martinbonnin merged commit 8d83282 into main Jun 13, 2025
8 checks passed
@martinbonnin martinbonnin deleted the gratatouille branch June 13, 2025 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants