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

feat(gradle-plugin): enable lazy evaluation, implicit task dependencies and fixing setEncoding #4761

Merged

Conversation

nbrugger-tgm
Copy link
Contributor

@nbrugger-tgm nbrugger-tgm commented Oct 17, 2024

Why

  • lazy configuration: The lack cause pain when working in a remotely up to date gradle enviroment and
  • fixed immutable task dependencies: this is a blocker since you have no modify theese task dependencies (resolve depending compileTestJava for example)
  • setting the encoding didn't work at all

Changes

  • fix encoding setter
  • enable lazy evaluation by
    • replacing all Task configurations with gradles Property types
    • using register instead of create to register the task
  • remove wrongly set task dependencies that can cause circular dependencies. Task dependencies are now inferred by the set classpath. When gradle detects that an output of a task (like compileJava) is used an automatic dependency is formed and resolve will always execute compileJava first. The advantage is that this is dynamic. If one does NOT want compileJava to be executed it won't be as soon as nothing of compileJava is on the configured classpath

Fixes: #4366 #4367

@nbrugger-tgm nbrugger-tgm changed the title feat(gradle-plugin): enable lazy evaluation, implicit task dependencies feat(gradle-plugin): enable lazy evaluation, implicit task dependencies and fixing setEncoding Oct 17, 2024
@nbrugger-tgm nbrugger-tgm force-pushed the gradle/enable-lazy-configuration branch 2 times, most recently from 57c56d2 to b7d4a37 Compare October 18, 2024 07:53
@nbrugger-tgm
Copy link
Contributor Author

Sorry for the force pushes, i had to fix the commit it had the wrong commiter was not signed and i messed up the commit message

@nbrugger-tgm nbrugger-tgm force-pushed the gradle/enable-lazy-configuration branch from 1427fbb to 22301bb Compare October 28, 2024 15:51
@frantuma frantuma force-pushed the gradle/enable-lazy-configuration branch from 22301bb to 27331ce Compare October 28, 2024 16:55
@ponelat
Copy link
Member

ponelat commented Nov 1, 2024

Thanks @nbrugger-tgm , we'll try to take a look as soon as we can, we appreciate the code!

@frantuma frantuma force-pushed the gradle/enable-lazy-configuration branch from 27331ce to 3d4c54a Compare December 4, 2024 10:01
changes:
  - enable lazy evaluation by
    - replacing all Task configurations with gradles Property types
    - using `register` instead of `create` to register the task
  - remove wrongly set task dependencies that can cause circular dependencies. Task dependencies are now inferred by the set classpath. When gradle detects that an output of a task (like compileJava) is used an automatic dependency is formed and `resolve` will always execute compileJava first. The advantage is that this is dynamic. If one does NOT want `compileJava` to be executed it won't be as soon as nothing of compileJava is on the configured classpath
@frantuma frantuma force-pushed the gradle/enable-lazy-configuration branch from 3d4c54a to 1746ab0 Compare December 11, 2024 14:28
@frantuma frantuma merged commit 583c21b into swagger-api:master Dec 11, 2024
5 checks passed
@frantuma
Copy link
Member

Thanks!

@nbrugger-tgm nbrugger-tgm deleted the gradle/enable-lazy-configuration branch December 11, 2024 16:23
ndwlocatieservices added a commit to ndwnu/nls-accessibility-map that referenced this pull request Dec 19, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [nu.ndw.nls.locationdataissuesapi:client-feign](https://dev.azure.com/ndwnu/NLS/_git/nls-location-data-issues) ([source](https://dev.azure.com/ndwnu/NLS/_git/nls-location-data-issues)) | compile | patch | `1.0.14` -> `1.0.15` |
| nu.ndw.nls.geojson.geometry:specification |  | patch | `1.3.5` -> `1.3.8` |
| nu.ndw.nls.geojson.geometry:specification-open-api-config |  | patch | `1.3.5` -> `1.3.8` |
| nu.ndw.nls.geojson.geometry:geometry-model | compile | patch | `1.3.5` -> `1.3.8` |
| nu.ndw.nls.geojson.geometry:specification | compile | patch | `1.3.5` -> `1.3.8` |
| nu.ndw.nls.geojson.geometry:geometry-jts | compile | patch | `1.3.5` -> `1.3.8` |
| [nu.ndw.nls:routing-map-matcher-library](https://github.com/ndwnu/nls-routing-map-matcher) | compile | minor | `13.2.4` -> `13.3.0` |
| [io.swagger.core.v3:swagger-annotations](https://github.com/swagger-api/swagger-core) | compile | patch | `2.2.26` -> `2.2.27` |

---

### Release Notes

<details>
<summary>swagger-api/swagger-core (io.swagger.core.v3:swagger-annotations)</summary>

### [`v2.2.27`](https://github.com/swagger-api/swagger-core/releases/tag/v2.2.27): Swagger-core 2.2.27 released!

[Compare Source](swagger-api/swagger-core@v2.2.26...v2.2.27)

-   fix: swagger-api/swagger-ui#10220 ([#&#8203;4806](swagger-api/swagger-core#4806))
-   Fix for record component annotations on fields with JsonProperty annotations ([#&#8203;4795](swagger-api/swagger-core#4795))
-   Fix java.lang.NullPointerException and remove stack trace output from ModelResolver ([#&#8203;4793](swagger-api/swagger-core#4793))
-   Move applySchemaResolution check to a method ([#&#8203;4791](swagger-api/swagger-core#4791))
-   feat(gradle-plugin): enable lazy evaluation, implicit task dependencies and fixing `setEncoding` ([#&#8203;4761](swagger-api/swagger-core#4761))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or PR is renamed to start with "rebase!".

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired.

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants