Skip to content

Conversation

@balrok
Copy link
Contributor

@balrok balrok commented Jan 17, 2024

In our project, we need to scan also the build-time dependencies for licenses. In gradle they can be access via project.buildScript.

For this, the buildScriptProjects configuration option was introduced. It respects all other configuration like 'configurations'.

The implementation is utilizing the existing ProjectReader for this because the required fields (configurations and dependencies) can also be found in ScriptHandler. There is only a change required: to use a general data structure for accessing these fields.

@balrok balrok force-pushed the feature/buildscript-scan branch from 3c92e44 to 5cd8860 Compare March 24, 2025 20:29
@balrok
Copy link
Contributor Author

balrok commented Nov 11, 2025

@chadlwilson / @bdellegrazie / @jk1 what do you think about the PR?
We use it in our project already for some time.

If there is interest, I can rebase it.

@jk1
Copy link
Owner

jk1 commented Nov 12, 2025

Hi @balrok!

This is rather unusual to track build script dependencies since they are not shipped or otherwise used in production.
Yet is see no problem in incorporating this into the upstream. If you could rebase it, it would be great.

Carl Mai and others added 2 commits November 23, 2025 17:19
For this, the buildScriptProjects configuration option was introduced.
It respects all other configuration like 'configurations'.

The implementation is utilizing the existing ProjectReader for this
because the required fields (`configurations` and `dependencies`) can
also be found in ScriptHandler. There is only a change required: to use
a general data structure for accessing these fields.
Also I don't understand why it is called in the first place:
https://docs.gradle.org/current/kotlin-dsl/gradle/org.gradle.api.artifacts/-configuration-container/detached-configuration.html
According to the docs `Creates a configuration, but does not add it to this container.` it should be fine
@balrok balrok force-pushed the feature/buildscript-scan branch from 5cd8860 to 0532295 Compare November 23, 2025 16:57
@balrok
Copy link
Contributor Author

balrok commented Nov 23, 2025

Rebased and also added a commit: balrok@0532295

Reason it is needed: we have several plugins creating code for us. Also we want to better be safe than sorry

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