Skip to content

Conversation

@ghale
Copy link
Member

@ghale ghale commented Dec 15, 2025

This allows project features to be registerd with no build model (i.e. with BuildModel.None). Other features can still bind to the feature's definition. Any feature that attempts to bind to a build model of None will get an error.

Fixes #35869

Reviewing cheatsheet

Before merging the PR, comments starting with

  • ❌ ❓must be fixed
  • 🤔 💅 should be fixed
  • 💭 may be fixed
  • 🎉 celebrate happy things

@ghale
Copy link
Member Author

ghale commented Dec 15, 2025

@bot-gradle test this

@bot-gradle

This comment has been minimized.

@bot-gradle
Copy link
Collaborator

The following builds have been cancelled:

@ghale ghale marked this pull request as ready for review December 16, 2025 02:50
@ghale ghale requested review from a team as code owners December 16, 2025 02:50
@ghale ghale requested review from asodja, bamboo, jvandort and reinsch82 and removed request for a team December 16, 2025 02:51
Copy link
Contributor

@hfhbd hfhbd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please also add a Kotlin integration test using the reinfined generics method with BuildModel.None? Will it work out if the box or will creating a BuildModel.None throw and we need a special generic function see #35870?

@ghale
Copy link
Member Author

ghale commented Dec 16, 2025

Can you please also add a Kotlin integration test using the reified generics method with BuildModel.None? Will it work out if the box

@hfhbd Yes, this should work just fine. I've added a test that demonstrates it. We use a fixture to generate the class, so it's kind of hard to see what it looks like just looking at the code, but it generates a binding class that looks like this:

class Binding : ProjectFeatureBinding {
    override fun bind(builder: ProjectFeatureBindingBuilder) {
        builder.bindProjectFeature<
                FeatureDefinition,
                TestProjectTypeDefinition,
                BuildModel.None
        >("feature") { definition, model, parent ->
            ...
        }
    }
}

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

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

DCL: bindProjectFeature does not support BuildModel.NONE for the Feature Definition

4 participants