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

refactor: use Property API for lazy configuration & update dependencies #13

Merged
merged 13 commits into from
Aug 15, 2024

Conversation

nvima
Copy link
Contributor

@nvima nvima commented Aug 14, 2024

This MR significantly refactors the Octopus Deploy Gradle plugin to utilize Gradle's Property API, enabling lazy configuration for all properties.

  • Converted Extension properties to use Gradle's Property API, allowing for lazy and on-demand configuration
  • Refactored tasks to use Gradle's input/output annotations consistently
  • Implemented Gradle's convention mapping for default values
  • Added explicit task dependencies using dependsOn and mustRunAfter for proper task ordering
  • Updated and added unit tests to cover new functionality and refactored code
  • Introduced integration test for verifying overwrite functionality
  • Updated README
  • Updated Dependencies
  • Updated Gradle
  • Update Gradle Build Action to v2.4.2 to prevent secret leakage
  • Fixed smaller things related to stricter gradle rules after gradle update
  • Added Integration Tests to github workflow

Patrick Mirwald added 8 commits August 12, 2024 10:37
- Convert Extension properties to use Gradle's Property API for lazy configuration
- Introduce BuildInformationAdditionBuilder for more flexible build information customization / lazy configuration
- Refactor tasks to use Gradle's input/output annotations consistently
- Removed afterEvaluate in Plugin
- Add explicit task dependencies using dependsOn and mustRunAfter for proper task ordering
- Changed gitRoot to DirectoryProperty and use @internal to fix dependsOn bug

This refactoring aims to make the plugin more maintainable, extensible, and aligned with current Gradle development patterns.
- Refactor CreateBuildInformationTaskTest to use new Property-based API
- Add CreateBuildInformationBuilderTaskTest to verify the new BuildInformationAdditionBuilder functionality
- Introduce CreateBuildInformationGitlabCiTaskTest to ensure correct behavior with GitLab CI integration
- Update FirstCommitHashTaskTest with new gitRoot config
- Refactor existing integration tests to use Property API's set() method instead of direct assignment
- Add UploadBuildInformationOverwriteTaskIntegrationTest to verify overwrite functionality
@nvima nvima self-assigned this Aug 14, 2024
- Updated Gradle Build Action to v2.4.2 in GitHub workflows to fix potential secret leakage issue.
@nvima nvima requested review from Ingwersaft and removed request for Ingwersaft August 14, 2024 13:00
@nvima nvima marked this pull request as draft August 14, 2024 13:41
@nvima nvima force-pushed the chore/update_dependencies branch 3 times, most recently from e7e00eb to f128e8a Compare August 14, 2024 14:52
@nvima nvima force-pushed the chore/update_dependencies branch 2 times, most recently from 8504f0a to 07e8ea5 Compare August 15, 2024 10:36
@nvima nvima marked this pull request as ready for review August 15, 2024 11:55
@nvima nvima requested a review from Ingwersaft August 15, 2024 11:55
@nvima nvima force-pushed the chore/update_dependencies branch from fddbffa to b92fee9 Compare August 15, 2024 17:00
@nvima nvima merged commit 3ec7400 into master Aug 15, 2024
1 check passed
@Ingwersaft Ingwersaft deleted the chore/update_dependencies branch August 16, 2024 04:47
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.

2 participants