nebula-plugins / nebula-plugins/gradle-resolution-rules-plugin

Gradle 4.10.2 and new IMPROVED_POM_SUPPORT and gradle lint

Open
#85 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Groovy
Stars
49
Forks
15
Avg merge
23h 52m
Merged PRs (30d)
2

Description

Any idea, what might be causing these kind of errors when I run autoLintGradle on a project where I use bom imports and gradle resolution rules plugin:

Resolution rules could not resolve all dependencies to align configuration ':lintExcludes':
 - org.springframework.boot:spring-boot-starter-data-jpa:null -> org.springframework.boot:spring-boot-starter-data-jpa:null - Could not find org.springframework.boot:spring-boot-starter-data-jpa:null.
Resolution rules could not resolve all dependencies to align configuration ':lintExcludes':
 - com.jayway.jsonpath:json-path:null -> com.jayway.jsonpath:json-path:null - Could not find com.jayway.jsonpath:json-path:null.

I have added enableFeaturePreview('IMPROVED_POM_SUPPORT') to settings.gradle

And to give some context I have outline some configuration from my build.gradle file. Its a lot more complicated offcouse as we are using init scripts and theres a lot more going on. And its multi project setup as well.

plugins {
    id 'java'
    id 'nebula.resolution-rules' version '7.0.4'
    id 'nebula.lint' version '9.3.2'
    id 'org.springframework.boot' version '2.0.6.RELEASE'
}

gradleLint {
    rules = ['unused-exclude-by-dep']
}

dependencies {
    resolutionRules 'com.netflix.nebula:gradle-resolution-rules:latest.release'
    compile org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES
    implementation('org.springframework.boot:spring-boot-starter-data-jpa') {
        exclude group: 'org.hibernate', module: 'hibernate-entitymanager'
    }
}

Unfortunately I'm not able to pin it down to java source code or some transitive dependency that causes this. Using just this clean setup I provided here works fine. Maybe you have had similar issues or have suggestions how to debug it

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce autoLintGradle using the settings.gradle and build.gradle configuration shown, including Gradle 4.10.2, IMPROVED_POM_SUPPORT, BOM imports, and the resolution-rules plugin. Compare the clean setup with the reported multi-project build and init scripts, then isolate the configuration causing null dependency versions and document a reproducible fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy, spring-boot
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.