NOTICK: Update Gradle files for DeteKt plugins. (#5970)

This commit is contained in:
Chris Rankin 2020-02-16 08:21:05 +00:00 committed by GitHub
parent 21325dfa4f
commit 872d6ef4df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 20 deletions

View File

@ -465,18 +465,20 @@ task jacocoRootReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) {
}
}
task detekt(type: JavaExec, dependsOn: ":detekt-plugins:jar") {
main = "io.gitlab.arturbosch.detekt.cli.Main"
classpath = configurations.detekt
tasks.register('detekt', JavaExec) {
def input = "$projectDir"
def config = "$projectDir/detekt-config.yml"
def baseline = "$projectDir/detekt-baseline.xml"
def plugins = "$projectDir/detekt-plugins/build/libs/detekt-plugins-${version}.jar"
def detektPluginsJar = project(':detekt-plugins').tasks.jar
def plugins = detektPluginsJar.outputs.files.singleFile
def params = ['-i', input, '-c', config, '-b', baseline, '--plugins', plugins]
inputs.files(detektPluginsJar, config, baseline)
main = "io.gitlab.arturbosch.detekt.cli.Main"
classpath = configurations.detekt
args(params)
}
task detektBaseline(type: JavaExec) {
tasks.register('detektBaseline', JavaExec) {
main = "io.gitlab.arturbosch.detekt.cli.Main"
classpath = configurations.detekt
def input = "$projectDir"

View File

@ -1,23 +1,11 @@
plugins {
id 'java'
id 'kotlin'
id 'kotlin-jpa'
}
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
implementation "io.gitlab.arturbosch.detekt:detekt-api:$detekt_version"
testImplementation "junit:junit:$junit_version"
testImplementation "io.gitlab.arturbosch.detekt:detekt-test:$detekt_version"
testImplementation "org.assertj:assertj-core:$assertj_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "io.gitlab.arturbosch.detekt:detekt-api:$detekt_version"
}
publish {
name "corda-detekt-plugins"
}