BAEL-4091: Intro to Gradle Lint Plugin (#14674)
This commit is contained in:
parent
cd16715e10
commit
dab5b25f7e
|
@ -1,14 +1,21 @@
|
|||
plugins{
|
||||
id "nebula.lint" version "16.9.0"
|
||||
plugins {
|
||||
id "nebula.lint" version "18.1.0"
|
||||
}
|
||||
|
||||
|
||||
description = "Gradle 5 root project"
|
||||
allprojects {
|
||||
apply plugin :"java"
|
||||
apply plugin :"nebula.lint"
|
||||
apply plugin: "java"
|
||||
apply plugin: "nebula.lint"
|
||||
gradleLint {
|
||||
rules=['unused-dependency']
|
||||
rules = [
|
||||
// 'unused-dependency',
|
||||
// 'dependency-parentheses',
|
||||
// 'undeclared-dependency',
|
||||
// 'minimum-dependency-version'
|
||||
]
|
||||
reportFormat = 'text'
|
||||
reportOnlyFixableViolations = true
|
||||
}
|
||||
group = "com.baeldung"
|
||||
version = "0.0.1"
|
||||
|
@ -16,6 +23,6 @@ allprojects {
|
|||
targetCompatibility = "1.8"
|
||||
|
||||
repositories {
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
allprojects {
|
||||
apply plugin: "nebula.lint"
|
||||
gradleLint {
|
||||
rules = ['dependency-parenthesis']
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
/build/
|
|
@ -0,0 +1,15 @@
|
|||
|
||||
description = "Introduction to Gradle Lint Plugin"
|
||||
|
||||
ext {
|
||||
awsVersion = '2.20.83'
|
||||
}
|
||||
|
||||
|
||||
dependencies {
|
||||
implementation platform("software.amazon.awssdk:bom:$awsVersion")
|
||||
testImplementation('junit:junit:4.13.1')
|
||||
gradleLint.ignore('unused-dependency', 'dependency-parentheses') {
|
||||
implementation('software.amazon.awssdk:sts')
|
||||
}
|
||||
}
|
|
@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
|
|||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
import com.netflix.nebula.lint.plugin.GradleLintPlugin
|
||||
|
||||
initscript {
|
||||
repositories { mavenCentral() }
|
||||
dependencies {
|
||||
classpath 'com.netflix.nebula:gradle-lint-plugin:18.1.0'
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
apply plugin: GradleLintPlugin
|
||||
gradleLint {
|
||||
rules=[]
|
||||
alwaysRun= false
|
||||
}
|
||||
}
|
|
@ -2,4 +2,5 @@ rootProject.name='gradle-5'
|
|||
include 'java-exec'
|
||||
include 'unused-dependencies'
|
||||
include 'source-sets'
|
||||
include 'cmd-line-args'
|
||||
include 'cmd-line-args'
|
||||
include 'gradle-lint-intro'
|
Loading…
Reference in New Issue