Added detekt extension
This commit is contained in:
parent
5128916fa1
commit
0a9de8d863
5 changed files with 46 additions and 3 deletions
3
.idea/misc.xml
generated
3
.idea/misc.xml
generated
|
@ -3,6 +3,9 @@
|
|||
<component name="EntryPointsManager">
|
||||
<pattern value="net.thauvin.erik.PinboardPosterBuild" method="jacoco" />
|
||||
<pattern value="net.thauvin.erik.pinboard.PinboardPosterBuild" method="jacoco" />
|
||||
<pattern value="net.thauvin.erik.pinboard.PinboardPosterBuild" method="detekt" />
|
||||
<pattern value="net.thauvin.erik.pinboard.PinboardPosterBuild" method="detektBaseline" />
|
||||
<pattern value="net.thauvin.erik.pinboard.PinboardPosterBuild" />
|
||||
</component>
|
||||
<component name="PDMPlugin">
|
||||
<option name="customRuleSets">
|
||||
|
|
|
@ -7,6 +7,5 @@
|
|||
<ID>NestedBlockDepth:PinboardPoster.kt$PinboardPoster$private fun executeMethod(method: String, params: Map<String, String>): Boolean</ID>
|
||||
<ID>ThrowsCount:PinboardPoster.kt$PinboardPoster$@Throws(IOException::class) internal fun parseMethodResponse(method: String, response: String)</ID>
|
||||
<ID>TooManyFunctions:PinConfig.kt$PinConfig$Builder</ID>
|
||||
<ID>WildcardImport:PinboardPosterTest.kt$import org.testng.Assert.*</ID>
|
||||
</CurrentIssues>
|
||||
</SmellBaseline>
|
||||
|
|
|
@ -2,6 +2,7 @@ bld.downloadExtensionJavadoc=false
|
|||
bld.downloadExtensionSources=true
|
||||
bld.extension.jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.1
|
||||
bld.extensions=com.uwyn.rife2:bld-kotlin:0.9.0-SNAPSHOT
|
||||
bld.extension-detekt=com.uwyn.rife2:bld-detekt:0.9.0-SNAPSHOT
|
||||
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
|
||||
bld.downloadLocation=
|
||||
bld.sourceDirectories=
|
||||
|
|
18
pom.xml
18
pom.xml
|
@ -21,6 +21,24 @@
|
|||
<version>1.9.21</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-stdlib-common</artifactId>
|
||||
<version>1.9.21</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-stdlib-jdk7</artifactId>
|
||||
<version>1.9.21</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-stdlib-jdk8</artifactId>
|
||||
<version>1.9.21</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>okhttp</artifactId>
|
||||
|
|
|
@ -34,6 +34,7 @@ package net.thauvin.erik.pinboard;
|
|||
import rife.bld.BuildCommand;
|
||||
import rife.bld.Project;
|
||||
import rife.bld.extension.CompileKotlinOperation;
|
||||
import rife.bld.extension.DetektOperation;
|
||||
import rife.bld.extension.JacocoReportOperation;
|
||||
import rife.bld.extension.dokka.DokkaOperation;
|
||||
import rife.bld.extension.dokka.LoggingLevel;
|
||||
|
@ -66,9 +67,13 @@ public class PinboardPosterBuild extends Project {
|
|||
autoDownloadPurge = true;
|
||||
repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL);
|
||||
|
||||
var okHttp = version(4, 12, 0);
|
||||
final var okHttp = version(4, 12, 0);
|
||||
final var kotlin = version(1, 9, 21);
|
||||
scope(compile)
|
||||
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", version(1, 9, 21)))
|
||||
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", kotlin))
|
||||
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib-common", kotlin))
|
||||
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib-jdk7", kotlin))
|
||||
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib-jdk8", kotlin))
|
||||
.include(dependency("com.squareup.okhttp3", "okhttp", okHttp))
|
||||
.include(dependency("com.squareup.okhttp3", "logging-interceptor", okHttp));
|
||||
scope(test)
|
||||
|
@ -122,6 +127,23 @@ public class PinboardPosterBuild extends Project {
|
|||
.execute();
|
||||
}
|
||||
|
||||
@BuildCommand(summary = "Checks source with Detekt")
|
||||
public void detekt() throws ExitStatusException, IOException, InterruptedException {
|
||||
new DetektOperation()
|
||||
.fromProject(this)
|
||||
.baseline("config/detekt/baseline.xml")
|
||||
.execute();
|
||||
}
|
||||
|
||||
@BuildCommand(value = "detekt-baseline", summary = "Creates the Detekt baseline")
|
||||
public void detektBaseline() throws ExitStatusException, IOException, InterruptedException {
|
||||
new DetektOperation()
|
||||
.fromProject(this)
|
||||
.baseline("config/detekt/baseline.xml")
|
||||
.createBaseline(true)
|
||||
.execute();
|
||||
}
|
||||
|
||||
@BuildCommand(summary = "Generates JaCoCo Reports")
|
||||
public void jacoco() throws IOException {
|
||||
new JacocoReportOperation()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue