Skip to content

Conversation

@snazy
Copy link
Member

@snazy snazy commented Jun 11, 2022

Background: dependabot only manages dependencies (incl Gradle plugins) in build.gradle[.kts]
files. It scans the root build.gradle[.kts] fila and those in submodules referenced in
settings.gradle[.kts].
But dependabot does not manage managed plugin dependencies in settings.gradle[.kts].
However, since dependabot is a "dumb search and replace engine", we can use a trick:

  1. Have this "dummy" build.gradle.kts file with all managed plugin dependencies.
  2. Add an include() to this build file in settings.gradle.kts, surrounded with an
    if (false), so Gradle does not pick it up.
  3. Parse this file in our settings.gradle.kts, provide a ResolutionStrategy to the
    plugin dependencies.

@snazy snazy force-pushed the plugins-dependabot branch from d1b736b to 194e695 Compare June 11, 2022 09:31
Background: dependabot only manages dependencies (incl Gradle plugins) in build.gradle[.kts]
files. It scans the root build.gradle[.kts] fila and those in submodules referenced in
settings.gradle[.kts].
But dependabot does not manage managed plugin dependencies in settings.gradle[.kts].
However, since dependabot is a "dumb search and replace engine", we can use a trick:
1. Have this "dummy" build.gradle.kts file with all managed plugin dependencies.
2. Add an `include()` to this build file in settings.gradle.kts, surrounded with an
   `if (false)`, so Gradle does _not_ pick it up.
3. Parse this file in our settings.gradle.kts, provide a `ResolutionStrategy` to the
   plugin dependencies.
@snazy snazy force-pushed the plugins-dependabot branch from 194e695 to d52d6b4 Compare June 11, 2022 09:39
@snazy snazy merged commit 6f7a34e into projectnessie:main Jun 13, 2022
@snazy snazy deleted the plugins-dependabot branch June 13, 2022 15:40
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