Skip to content

feat(manager/ant): add property resolution and .properties file support - #42175

Merged
viceice merged 12 commits into
renovatebot:mainfrom
RahulGautamSingh:feat/42076-ant-manager-properties
Apr 14, 2026
Merged

feat(manager/ant): add property resolution and .properties file support#42175
viceice merged 12 commits into
renovatebot:mainfrom
RahulGautamSingh:feat/42076-ant-manager-properties

Conversation

@RahulGautamSingh

@RahulGautamSingh RahulGautamSingh commented Mar 27, 2026

Copy link
Copy Markdown
Collaborator

Changes

  • Resolve same-file <property name="..." value="..." /> references in version attributes
  • Load external .properties files via <property file="..." />
  • Implement first-definition-wins semantics matching Ant's property immutability
  • Detect and skip circular and unresolvable property references
  • Support chained property resolution (property values referencing other properties)
  • Add updateDependency function for both XML <property> value attributes and .properties file values
  • Track sharedVariableName and redirect fileReplacePosition to the property source file
  • Group dependencies by their property source file, with editFile set for cross-file updates

Why updateDependency instead of auto-replace

The default auto-replace function calls extractPackageFile (single-file extraction without property resolution) to confirm the update succeeded. For property-backed dependencies, this always fails because extractPackageFile sees the raw ${placeholder} instead of the resolved value.

Context

Stacked PR 2/5 — depends on #42173

AI assistance disclosure

  • No — I did not use AI for this contribution.
  • Yes — minimal assistance (e.g., IDE autocomplete, small code completions, grammar fixes).
  • Yes — substantive assistance (AI-generated non‑trivial portions of code, tests, and documentation).
  • Yes — other (please describe):

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests, but ran on a real repository, or
  • Both unit tests + ran on a real repository

Public Repos:

  1. Re-ran on basic inline dependency versions: Update dependency junit:junit to v4.13.2 RahulGautamSingh/ant-basic#2
  2. Updating property version in same file: https://github.com/RahulGautamSingh/ant-inline-props/pulls
  3. Updating property version in different file: https://github.com/RahulGautamSingh/ant-external-props/pulls

Loading
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

ci:allow-undesirable Skip the undesirable files CI check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

manager(ant): property resolution and .properties file support

4 participants