Added detekt extension
This commit is contained in:
parent
aa47f3d57d
commit
2e82c4d849
4 changed files with 48 additions and 3 deletions
6
.idea/misc.xml
generated
6
.idea/misc.xml
generated
|
@ -1,5 +1,11 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
|
<component name="EntryPointsManager">
|
||||||
|
<pattern value="net.thauvin.erik.IsgdShortenBuild" method="detekt" />
|
||||||
|
<pattern value="net.thauvin.erik.IsgdShortenBuild" method="detektBaseline" />
|
||||||
|
<pattern value="net.thauvin.erik.IsgdShortenBuild" />
|
||||||
|
<pattern value="net.thauvin.erik.IsgdShortenBuild" method="jacoco" />
|
||||||
|
</component>
|
||||||
<component name="PDMPlugin">
|
<component name="PDMPlugin">
|
||||||
<option name="customRuleSets">
|
<option name="customRuleSets">
|
||||||
<list>
|
<list>
|
||||||
|
|
|
@ -2,6 +2,7 @@ bld.downloadExtensionJavadoc=false
|
||||||
bld.downloadExtensionSources=true
|
bld.downloadExtensionSources=true
|
||||||
bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.1
|
bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.1
|
||||||
bld.extensions=com.uwyn.rife2:bld-kotlin:0.9.0-SNAPSHOT
|
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.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
|
||||||
bld.downloadLocation=
|
bld.downloadLocation=
|
||||||
bld.sourceDirectories=
|
bld.sourceDirectories=
|
||||||
|
|
18
pom.xml
18
pom.xml
|
@ -21,6 +21,24 @@
|
||||||
<version>1.9.21</version>
|
<version>1.9.21</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</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>
|
<dependency>
|
||||||
<groupId>net.thauvin.erik.urlencoder</groupId>
|
<groupId>net.thauvin.erik.urlencoder</groupId>
|
||||||
<artifactId>urlencoder-lib-jvm</artifactId>
|
<artifactId>urlencoder-lib-jvm</artifactId>
|
||||||
|
|
|
@ -34,7 +34,7 @@ package net.thauvin.erik;
|
||||||
import rife.bld.BuildCommand;
|
import rife.bld.BuildCommand;
|
||||||
import rife.bld.Project;
|
import rife.bld.Project;
|
||||||
import rife.bld.extension.CompileKotlinOperation;
|
import rife.bld.extension.CompileKotlinOperation;
|
||||||
import rife.bld.extension.CompileKotlinOptions;
|
import rife.bld.extension.DetektOperation;
|
||||||
import rife.bld.extension.JacocoReportOperation;
|
import rife.bld.extension.JacocoReportOperation;
|
||||||
import rife.bld.extension.dokka.DokkaOperation;
|
import rife.bld.extension.dokka.DokkaOperation;
|
||||||
import rife.bld.extension.dokka.LoggingLevel;
|
import rife.bld.extension.dokka.LoggingLevel;
|
||||||
|
@ -51,7 +51,6 @@ import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static rife.bld.dependencies.Repository.*;
|
import static rife.bld.dependencies.Repository.*;
|
||||||
import static rife.bld.dependencies.Repository.SONATYPE_RELEASES_LEGACY;
|
|
||||||
import static rife.bld.dependencies.Scope.compile;
|
import static rife.bld.dependencies.Scope.compile;
|
||||||
import static rife.bld.dependencies.Scope.test;
|
import static rife.bld.dependencies.Scope.test;
|
||||||
|
|
||||||
|
@ -67,8 +66,12 @@ public class IsgdShortenBuild extends Project {
|
||||||
|
|
||||||
repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL);
|
repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL);
|
||||||
|
|
||||||
|
final var kotlin = version(1, 9, 21);
|
||||||
scope(compile)
|
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("net.thauvin.erik.urlencoder", "urlencoder-lib-jvm", version(1, 4, 0)));
|
.include(dependency("net.thauvin.erik.urlencoder", "urlencoder-lib-jvm", version(1, 4, 0)));
|
||||||
scope(test)
|
scope(test)
|
||||||
.include(dependency("org.jetbrains.kotlin", "kotlin-test-junit5", version(1, 9, 21)))
|
.include(dependency("org.jetbrains.kotlin", "kotlin-test-junit5", version(1, 9, 21)))
|
||||||
|
@ -122,6 +125,23 @@ public class IsgdShortenBuild extends Project {
|
||||||
.execute();
|
.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")
|
@BuildCommand(summary = "Generates JaCoCo Reports")
|
||||||
public void jacoco() throws IOException {
|
public void jacoco() throws IOException {
|
||||||
new JacocoReportOperation()
|
new JacocoReportOperation()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue