Include reports and formatting features to the system test - Closes #2122 (#3018)

This commit is contained in:
Artur Bosch
2020-08-26 21:56:59 +02:00
committed by GitHub
parent 1e599651b7
commit 57968506a4
7 changed files with 25 additions and 3 deletions

View File

@@ -53,7 +53,7 @@ jobs:
- name: Build detekt
run: ./gradlew build :detekt-cli:shadowJarExecutable --parallel -x detekt
run: ./gradlew build moveJarForIntegrationTest shadowJarExecutable --parallel -x detekt
- name: Run detekt-cli --help
run: java -jar ./detekt-cli/build/run/detekt --help
- name: Run detekt-cli with argsfile

View File

@@ -6,7 +6,7 @@ import org.jfrog.gradle.plugin.artifactory.dsl.PublisherConfig
plugins {
`java-library` apply false // is applied in commons; make configurations available in this script
`maven-publish` apply false
`signing` apply false
signing apply false
id("com.jfrog.artifactory") apply false
}

View File

@@ -7,3 +7,11 @@
--build-upon-default-config
-c
./config/detekt/detekt.yml
-r
html:./build/detekt-report.html
-r
xml:./build/detekt-report.xml
-r
txt:./build/detekt-report.txt
-p
./build/detekt-formatting.jar

View File

@@ -17,7 +17,7 @@ dependencies {
// Implements https://github.com/brianm/really-executable-jars-maven-plugin maven plugin behaviour.
// To check details how it works, see http://skife.org/java/unix/2011/06/20/really_executable_jars.html.
// Extracted from https://github.com/pinterest/ktlint/blob/a86d1c76c44d0a1c1adc3f756f36d8b4cac15d32/ktlint/build.gradle#L40-L57
tasks.register<DefaultTask>("shadowJarExecutable") {
val shadowJarExecutable by tasks.registering {
description = "Creates self-executable file, that runs generated shadow jar"
group = "Distribution"

View File

@@ -27,3 +27,15 @@ tasks.withType<Jar>().configureEach {
.map { if (it.isDirectory) it else zipTree(it) }
})
}
val moveJarForIntegrationTest by tasks.registering {
description = "Copies the jar to the build directory without version so intergration tests can find it easier."
group = "Check"
inputs.files(tasks.named("jar"))
outputs.file(rootProject.buildDir.resolve("detekt-formatting.jar"))
doLast {
inputs.files.singleFile.copyTo(outputs.files.singleFile)
}
}

View File

@@ -15,6 +15,7 @@
* You need kotlin 1.3.70+ installed on your machine
*/
@file:Suppress("detekt.CommentSpacing") // for the exec line
@file:DependsOn("com.github.ajalt:clikt:2.7.1")
import com.github.ajalt.clikt.core.CliktCommand

View File

@@ -7,6 +7,7 @@
* You need kotlin 1.3.70+ installed on your machine
*/
@file:Suppress("detekt.CommentSpacing") // for the exec line
@file:DependsOn("org.kohsuke:github-api:1.112")
@file:DependsOn("com.github.ajalt:clikt:2.7.1")