Merged
Conversation
- Make SaveLockTask abstract - Convert generatedLock/outputLock to RegularFileProperty - Update task configurer to use .set() instead of conventionMapping - Update property checks to use .isPresent() and .get().asFile
- Make GenerateLockTask and UpdateLockTask abstract - Convert all fields to Property API (SetProperty, MapProperty, RegularFileProperty, Property) - Update DependencyLockTaskConfigurer to use .set() and property chaining - Update unit tests to use Property API - All unit tests passing, integration tests need investigation
- Update logic to explicitly check for null before calling lockableConfigurations()
- Add outputs.upToDateWhen { false } to GenerateLockTask to force re-execution
- Dependency declarations in build.gradle aren't tracked as task inputs
- Task must regenerate when dependencies change
- Make AbstractMigrateToCoreLocksTask abstract with Property getters - File outputLock → RegularFileProperty getOutputLock() - Set<String> configurationNames → SetProperty<String> getConfigurationNames() - Make MigrateToCoreLocksTask and MigrateLockedDepsToCoreLocksTask abstract - Add inputLockFile property to MigrateLockedDepsToCoreLocksTask - File inputLockFile → RegularFileProperty getInputLockFile() - Keep as @internal since task manually validates file existence - Update all field access to use .get() and .asFile.get() - Remove conventionMapping from migration task configuration - Use project.layout.projectDirectory.file() for file properties
- Make DiffLockTask abstract with Property getters - Convert file fields to RegularFileProperty and DirectoryProperty - Update task action to use .asFile.get() for file access - Conditionally set existingLockFile only when file exists - Update unit tests to use Property API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates lock-plugin tasks from field-based configuration to Gradle’s Property API and removes conventionMapping.
Breaking change
Code that set task properties via public fields must use the Property API:
Summary
Migrated
SaveLockTask,GenerateLockTask,UpdateLockTask,DiffLockTask, and migration tasks to the Property API; removed conventionMapping. GenerateLockTask usesoutputs.upToDateWhen { false }.CommitLockTaskrootDirPathis@Internal`.Breaking: task properties must be set via
.set(...)(e.g.task.diffFile.set(project.layout.buildDirectory.file("..."))), not direct assignment.