Skip to content

Support property evolution: deprecated, hidden, computed defaults #237

@vlsi

Description

@vlsi

Build parameters are a part of build system API, and it would be nice to provide migration path for the properties.

Consider a scenario:

  1. I've added jdkBuildVendor, jdkBuildVersion, jdkBuildImplementation parameters quite some time ago when build-parameters did not support groups:
    https://github.com/pgjdbc/pgjdbc/blob/6daee7d4251d568d3de52afd3bbfa8328f296681/build-logic/build-parameters/build.gradle.kts#L30-L44
  2. Now I consider migrating to groups like jdk.build.version, jdk.build.implementation and so on. The issue is that there might be end-users who have their own shell scripts and CI systems that still use old property names. If I rename the build properties, it would make their build invalid

I would like to have property evolution (e.g. consider Kotlin's @Deprecated), so I could:

  1. Mark properties as deprecated, so the users get warnings if they still use them
  2. Mark properties as hidden, so they work, yet they are hidden from the documentation
  3. Allow "new" properties to fetch the values from the older ones. For instance, if I add jdk.build.version, I would like to still support users that still use -PjdkBuildVersion=17 (~make the default of jdk.build.version compute based on jdkBuildVersion property)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions