Skip to content
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

[Plugin] allow running the plugin on Gradle 5.6 #2539

Merged
merged 6 commits into from
Aug 28, 2020

Conversation

martinbonnin
Copy link
Contributor

@martinbonnin martinbonnin commented Aug 24, 2020

Add ApolloExtension.relaxGradleVersionCheck as a workaround for users stuck on Gradle 5.6. Anything lower than Gradle 5.6 will not work because the plugin is using some 5.6 Provider APIs like Provider.orElse

Fixes #2536

@martinbonnin martinbonnin changed the title [Plugin] Add a flag to allow running the plugin on Gradle 5 [Plugin] Add a flag to allow running the plugin on Gradle 5.6 Aug 24, 2020
given that the poms reference the jvm projects
@@ -39,4 +39,5 @@ interface ApolloExtension: CompilerParams {
*/
fun onCompilationUnit(action: Action<CompilationUnit>)

val relaxGradleVersionCheck: Property<Boolean>
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not just remove the restriction without the flag? 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea, that's the other option. There might be some edge cases that are not working with 5.6 though

Copy link
Contributor

@tasomaniac tasomaniac left a comment

Choose a reason for hiding this comment

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

Thanks for considering my suggestion

@martinbonnin martinbonnin changed the title [Plugin] Add a flag to allow running the plugin on Gradle 5.6 [Plugin] allow running the plugin on Gradle 5.6 Aug 28, 2020
@martinbonnin
Copy link
Contributor Author

Thanks for making it! It'll be clearer that way and we can always refine later if/when we find edge cases with 5.6

@martinbonnin martinbonnin merged commit 701524b into master Aug 28, 2020
@martinbonnin martinbonnin deleted the bug-2536/gradle-5-compat branch August 28, 2020 10:54
martinbonnin added a commit that referenced this pull request Sep 16, 2020
* [SQLNormalizedCache] fix watcher not called on initial cache write (#2538)

* when no record was present in the cache, return all changed keys

* add a unit test

* add an integration test

* wait for the second resposne

* remove debug

* Update dependency gatsby-theme-apollo-docs to v4.3.10

* [Compiler] fix optional Int properties with an uppercase name (#2543)

* use the field name for class properties, not the schema name

fixes #2541

* add built in introspection types to SDL parser

Also:
- remove leading whitespace in block strings
- remove leading trailing quotes when parsing String default values

* normalize Json numbers, GraphQL Ints and Floats to Kotlin Double

* use SDL schemas for codegen tests

* update test fixtures

* move the SDL definitions to a separate file

* Bump kotlin compile testing (#2547)

* bump kotlin compile testing

* enable warnings again

* [Plugin] allow running the plugin on Gradle 5.6 (#2539)

* add skipGradleVersionCheck

* rename to relaxGradleVersionCheck

* remove doc

* remove the Gradle 6 mention. It turns out Gradle 5.6 should work fine
given that the poms reference the jvm projects

* update metalava

* allow 5.6 more globally

* Minor doc edits (#2548)

* fix a bad copy/paste in the doc and take this opportunity to add more
doc about the structure of generated models

* add the apollo icon to the .idea folder

* add spaces before and after the MultiCodeBlocks

* Update dependency gatsby-theme-apollo-docs to v4.4.1

* Update dependency gatsby-theme-apollo-docs to v4.4.2

* Update dependency gatsby to v2.24.52

* Put the location of the .xcodeproj file for Kotlin Multiplatform Mobile integration in Android Studio (#2554)

* compile Kotlin against stdlib 1.3 (#2555)

See https://issuetracker.google.com/issues/166582569

* Update dependency gatsby-theme-apollo-docs to v4.4.3

* Update dependency gatsby to v2.24.53

* Update mutations.mdx (#2561)

* bump sql delight version (#2564)

* Multi-module support (#2514)

* First drop for multi-module support

* update metalava

* add alwaysGenerateTypesMatching and a few unit tests

* added some tests

* minor tweaks

* update metalava

* stay on Gradle 6.0

* add more gradle tests

* wip

* wip

* better place to put the workaround

* add experimental markers

* remove some references to zip

* fix test

* add a test for diamond-shaped dependencies

* work in progress on a duplicates task

* add more tests

* fix tests

* remove debug

* typo

* in the compiler module, use 'metadata' instead of 'multi-module'

* added a few comments

* fix tests

* make Service and Variant public

* update metalava

* [Sdl] Fix a scalar definition after a union defintion (#2559)

* modify the test case to make it fail

* give more context if an error heppens during `toIntrospectionSchema`

* fix the union possible types were eating the following scalar
definitions

* bump Kotlin version (#2568)

* Update dependency gatsby to v2.24.57

* Remove toDeferred in favor of await. (#2574)

Closes #2571

* Bump Kotlin to 1.4.10 (#2578)

* Add a link to the Kotlin slack (#2576)

* add Kotlin as language for the codeblock (#2580)

* make compile

* make it compile

* fixes

* make CodegenTests pass

* fix some tests

* fix some more tests

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Said Tahsin Dane <taso.dane@deliveryhero.com>
Co-authored-by: Jagdeep Nagpal <jagdeepnagpal@gmail.com>
Co-authored-by: Ahmed I. Khalil <ahmedibrahimkhali@gmail.com>
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.

Is it possible to use apollo-android v2 with Gradle 5?
2 participants