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

[gradle plugin] Support Gradle 4.10 #1011

Merged
merged 3 commits into from
Sep 12, 2018

Conversation

jimschubert
Copy link
Member

@jimschubert jimschubert commented Sep 11, 2018

Gradle 4.10 is bundled with Kotlin 1.60 and Kotlin DSL 1.0-rc1. The new
Kotlin DSL isn't binary compatible with the tasks registration used in
this plugin.

Updating to Kotlin DSL 1.0-rc1 with no other changes would require users
to update to Gradle 4.10.

As a workaround, I've modified the tasks registration being done in
OpenApiGeneratorPlugin.kt, so rather than using the Kotlin DSL's invoke,
it creates tasks manually against the TasksContainer. This works locally
with Gradle 4.7+ for all scenarios in the sample (samples/local-spec).
There may be edge cases that I'm unaware of, and we may want to consider
defining the minimum supported Gradle version of 4.10 in the next major
version of openapi-generator-gradle-plugin if we experience those cases.

See #962

PR checklist

  • Read the contribution guidelines.
  • Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\.
  • Filed the PR against the correct branch: master, 3.3.x, 4.0.x. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

Gradle 4.10 is bundled with Kotlin 1.60 and Kotlin DSL 1.0-rc1. The new
Kotlin DSL isn't binary compatible with the `tasks` registration used in
this plugin.

Updating to Kotlin DSL 1.0-rc1 with no other changes would require users
to update to Gradle 4.10.

As a workaround, I've modified the tasks registration being done in
OpenApiGeneratorPlugin.kt, so rather than using the Kotlin DSL's invoke,
it creates tasks manually against the TasksContainer. This works locally
with Gradle 4.7+ for all scenarios in the sample (samples/local-spec).
There may be edge cases that I'm unaware of, and we may want to consider
defining the minimum supported Gradle version of 4.10 in the next major
version of openapi-generator-gradle-plugin if we experience those cases.
@jimschubert jimschubert changed the title Support Gradle 4.10 [gradle plugin] Support Gradle 4.10 Sep 11, 2018
@jimschubert
Copy link
Member Author

@wing328 @jmini this was verified as a fix by two users in the linked issue. I'm merging to get this into the next release.

I don't foresee any deployment issues related to any changes in the PR.

@jimschubert jimschubert merged commit 131cf94 into OpenAPITools:master Sep 12, 2018
@wing328
Copy link
Member

wing328 commented Sep 12, 2018

👌

wing328 added a commit that referenced this pull request Sep 12, 2018
wing328 added a commit that referenced this pull request Sep 13, 2018
…r" (#1027)

* Revert "[gradle plugin] Support Gradle 4.10 (#1011)"

This reverts commit 131cf94.

* Revert "[C++][Restbed] Fix default values for Restbed Server generator (#761)"

This reverts commit f29ba97.
jaumard pushed a commit to jaumard/openapi-generator that referenced this pull request Sep 21, 2018
* Support Gradle 4.10

Gradle 4.10 is bundled with Kotlin 1.60 and Kotlin DSL 1.0-rc1. The new
Kotlin DSL isn't binary compatible with the `tasks` registration used in
this plugin.

Updating to Kotlin DSL 1.0-rc1 with no other changes would require users
to update to Gradle 4.10.

As a workaround, I've modified the tasks registration being done in
OpenApiGeneratorPlugin.kt, so rather than using the Kotlin DSL's invoke,
it creates tasks manually against the TasksContainer. This works locally
with Gradle 4.7+ for all scenarios in the sample (samples/local-spec).
There may be edge cases that I'm unaware of, and we may want to consider
defining the minimum supported Gradle version of 4.10 in the next major
version of openapi-generator-gradle-plugin if we experience those cases.

* Uncomment snapshots repo (commented it during local testing)

* update pom.xml for exec gradle plugin
jaumard pushed a commit to jaumard/openapi-generator that referenced this pull request Sep 21, 2018
…r" (OpenAPITools#1027)

* Revert "[gradle plugin] Support Gradle 4.10 (OpenAPITools#1011)"

This reverts commit 131cf94.

* Revert "[C++][Restbed] Fix default values for Restbed Server generator (OpenAPITools#761)"

This reverts commit f29ba97.
@jimschubert jimschubert deleted the gradle-4-10-support branch September 23, 2018 16:02
@wing328 wing328 added this to the 3.3.0 milestone Oct 1, 2018
A-Joshi pushed a commit to ihsmarkitoss/openapi-generator that referenced this pull request Feb 27, 2019
* Support Gradle 4.10

Gradle 4.10 is bundled with Kotlin 1.60 and Kotlin DSL 1.0-rc1. The new
Kotlin DSL isn't binary compatible with the `tasks` registration used in
this plugin.

Updating to Kotlin DSL 1.0-rc1 with no other changes would require users
to update to Gradle 4.10.

As a workaround, I've modified the tasks registration being done in
OpenApiGeneratorPlugin.kt, so rather than using the Kotlin DSL's invoke,
it creates tasks manually against the TasksContainer. This works locally
with Gradle 4.7+ for all scenarios in the sample (samples/local-spec).
There may be edge cases that I'm unaware of, and we may want to consider
defining the minimum supported Gradle version of 4.10 in the next major
version of openapi-generator-gradle-plugin if we experience those cases.

* Uncomment snapshots repo (commented it during local testing)

* update pom.xml for exec gradle plugin
A-Joshi pushed a commit to ihsmarkitoss/openapi-generator that referenced this pull request Feb 27, 2019
…r" (OpenAPITools#1027)

* Revert "[gradle plugin] Support Gradle 4.10 (OpenAPITools#1011)"

This reverts commit 131cf94.

* Revert "[C++][Restbed] Fix default values for Restbed Server generator (OpenAPITools#761)"

This reverts commit f29ba97.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants