From 872d6ef4df7d9150007a3b929483450f2af1a334 Mon Sep 17 00:00:00 2001 From: Chris Rankin Date: Sun, 16 Feb 2020 08:21:05 +0000 Subject: [PATCH] NOTICK: Update Gradle files for DeteKt plugins. (#5970) --- build.gradle | 12 +++++++----- detekt-plugins/build.gradle | 18 +++--------------- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/build.gradle b/build.gradle index 43e567dd0b..23b522603a 100644 --- a/build.gradle +++ b/build.gradle @@ -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" diff --git a/detekt-plugins/build.gradle b/detekt-plugins/build.gradle index 20c6e8aa28..4657d00954 100644 --- a/detekt-plugins/build.gradle +++ b/detekt-plugins/build.gradle @@ -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" }