mirror of
https://github.com/jlengrand/detekt.git
synced 2026-03-10 08:11:23 +00:00
This commit is contained in:
2
.github/workflows/pre-merge.yaml
vendored
2
.github/workflows/pre-merge.yaml
vendored
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user