diff --git a/.github/workflows/pre-merge.yaml b/.github/workflows/pre-merge.yaml index 1a8cb6df8..e9bb5af52 100644 --- a/.github/workflows/pre-merge.yaml +++ b/.github/workflows/pre-merge.yaml @@ -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 diff --git a/buildSrc/src/main/kotlin/packaging.gradle.kts b/buildSrc/src/main/kotlin/packaging.gradle.kts index 2abc3d433..cf1b0bc92 100644 --- a/buildSrc/src/main/kotlin/packaging.gradle.kts +++ b/buildSrc/src/main/kotlin/packaging.gradle.kts @@ -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 } diff --git a/config/detekt/argsfile b/config/detekt/argsfile index c4ffeff8e..cca2646bf 100644 --- a/config/detekt/argsfile +++ b/config/detekt/argsfile @@ -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 diff --git a/detekt-cli/build.gradle.kts b/detekt-cli/build.gradle.kts index f32b956ad..a51579250 100644 --- a/detekt-cli/build.gradle.kts +++ b/detekt-cli/build.gradle.kts @@ -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("shadowJarExecutable") { +val shadowJarExecutable by tasks.registering { description = "Creates self-executable file, that runs generated shadow jar" group = "Distribution" diff --git a/detekt-formatting/build.gradle.kts b/detekt-formatting/build.gradle.kts index cf5f50e62..9e998f3d1 100644 --- a/detekt-formatting/build.gradle.kts +++ b/detekt-formatting/build.gradle.kts @@ -27,3 +27,15 @@ tasks.withType().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) + } +} diff --git a/scripts/compare_releases.main.kts b/scripts/compare_releases.main.kts index b5d5b81b6..7577d9155 100755 --- a/scripts/compare_releases.main.kts +++ b/scripts/compare_releases.main.kts @@ -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 diff --git a/scripts/github-milestone-report.main.kts b/scripts/github-milestone-report.main.kts index 4645b7c94..b80a00b89 100755 --- a/scripts/github-milestone-report.main.kts +++ b/scripts/github-milestone-report.main.kts @@ -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")