Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Gradle Multi-Module Conventions/Pre-Compiled Script Plugins #9619

Open
1 task done
mgagliardo91 opened this issue Apr 26, 2024 · 0 comments
Open
1 task done
Labels
L: git:submodules Git submodules L: java:gradle Maven packages via Gradle T: bug 🐞 Something isn't working

Comments

@mgagliardo91
Copy link

mgagliardo91 commented Apr 26, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Package ecosystem

gradle (Kotlin)

Package manager version

Gradle 8.2.1

Language version

Kotlin 1.8.20

Manifest location and content before the Dependabot update

No response

dependabot.yml content

version: 2
updates:
  - package-ecosystem: gradle
    directory: /
    target-branch: staging
    schedule:
      interval: weekly
    labels:
      - automerge

Updated dependency

No response

What you expected to see, versus what you actually saw

We have a multi-module gradle project using Kotlin Gradle (.kts). Each module is an independent deployable, but we ensure uniformity by leaning on Gradle convention plugins as a way to control dependencies as well as other plugin configuration.

Example Directory Structure:

  • buildSrc/
    • build.gradle.kts
    • src/main/kotlin/
      • com.test.common-conventions.gradle.kts
  • moduleA/
    • build.gradle.kts
  • moduleB/
    • build.gradle.kts
  • build.gradle.kts
  • settings.gradle.kts

buildSrc/**/com.test.common-conventions.gradle.kts:

plugins {
    kotlin("jvm")
    idea
}

repositories {
    ...
}

dependencies {
    constraints {
        implementation("io.github.microutils:kotlin-logging-jvm:3.0.5")
        ...
    }
}

moduleA/build.gradle.kts

plugins {
    id("com.test.common-conventions")
}


dependencies {
    implementation("io.github.microutils:kotlin-logging-jvm")
}
...

This official pattern allows us to maintain the versions in one spot, while allowing our modules to be selective about the dependencies they want to include, though sharing the dependency with other modules that need the same.

Dependabot does not, unfortunately, pick up this pattern and instead only updates dependencies in our **/*/build.gradle.kts files which rarely have versions in them due to this pattern. I've tried to name our convention files to include dependencies to see if that would trip it, but I'm not seeing it being recognized.

Any chance we can get this included so we can benefit from dependabot?

Native package manager behavior

No response

Images of the diff or a link to the PR, issue, or logs

No response

Smallest manifest that reproduces the issue

No response

@mgagliardo91 mgagliardo91 added the T: bug 🐞 Something isn't working label Apr 26, 2024
@github-actions github-actions bot added L: git:submodules Git submodules L: java:gradle Maven packages via Gradle labels Apr 26, 2024
@mgagliardo91 mgagliardo91 changed the title Support for Gradle Convention/Pre-Compiled Script Plugins Support for Gradle Multi-Module Conventions/Pre-Compiled Script Plugins Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: git:submodules Git submodules L: java:gradle Maven packages via Gradle T: bug 🐞 Something isn't working
Projects
Status: No status
Development

No branches or pull requests

1 participant