aboutsummaryrefslogtreecommitdiff
path: root/build.gradle.kts
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-09-19 20:49:04 +0200
committerLinnea Gräf <nea@nea.moe>2024-09-19 20:49:04 +0200
commit3724cbcfd774bae43f6fc3ac3f561922fcb2a5fa (patch)
tree426e4ac1bb584924dc5fba6cf33ebbee795c525a /build.gradle.kts
parent6c56b6da4b8f57aa49e9df7bd949f599486e122d (diff)
downloadskyhanni-3724cbcfd774bae43f6fc3ac3f561922fcb2a5fa.tar.gz
skyhanni-3724cbcfd774bae43f6fc3ac3f561922fcb2a5fa.tar.bz2
skyhanni-3724cbcfd774bae43f6fc3ac3f561922fcb2a5fa.zip
Fix up previous work on detekt
Diffstat (limited to 'build.gradle.kts')
-rw-r--r--build.gradle.kts41
1 files changed, 10 insertions, 31 deletions
diff --git a/build.gradle.kts b/build.gradle.kts
index 0162dcf44..22f75b59a 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -20,32 +20,11 @@ plugins {
kotlin("plugin.power-assert")
`maven-publish`
id("moe.nea.shot") version "1.0.0"
- id("io.gitlab.arturbosch.detekt") version "1.23.7"
+ id("io.gitlab.arturbosch.detekt")
}
val target = ProjectTarget.values().find { it.projectPath == project.path }!!
-repositories {
- mavenCentral()
- mavenLocal()
- maven("https://maven.minecraftforge.net") {
- metadataSources {
- artifact() // We love missing POMs
- }
- }
- maven("https://repo.spongepowered.org/maven/") // mixin
- maven("https://pkgs.dev.azure.com/djtheredstoner/DevAuth/_packaging/public/maven/v1") // DevAuth
- maven("https://jitpack.io") { // NotEnoughUpdates (compiled against)
- content {
- includeGroupByRegex("(com|io)\\.github\\..*")
- }
- }
- maven("https://repo.nea.moe/releases") // libautoupdate
- maven("https://maven.notenoughupdates.org/releases") // NotEnoughUpdates (dev env)
- maven("https://repo.hypixel.net/repository/Hypixel/") // mod-api
- maven("https://maven.teamresourceful.com/repository/thatgravyboat/") // DiscordIPC
-}
-
// Toolchains:
java {
toolchain.languageVersion.set(target.minecraftVersion.javaLanguageVersion)
@@ -185,9 +164,8 @@ dependencies {
implementation("net.hypixel:mod-api:0.3.1")
- compileOnly("io.gitlab.arturbosch.detekt:detekt-api:1.23.7")
- testImplementation("io.kotest:kotest-assertions-core:5.9.1")
- testImplementation("io.gitlab.arturbosch.detekt:detekt-test:1.23.7")
+ detektPlugins("org.notenoughupdates:detektrules:1.0.0")
+ detektPlugins(project(":detekt"))
}
afterEvaluate {
@@ -354,12 +332,13 @@ publishing.publications {
// Detekt:
detekt {
buildUponDefaultConfig = true // preconfigure defaults
- config.setFrom("$projectDir/detekt/detekt.yml") // point to your custom config defining rules to run, overwriting default behavior
- baseline = file("$projectDir/detekt/baseline.xml") // a way of suppressing issues before introducing detekt
- source.setFrom(
- "$projectDir/src/main/kotlin",
- "$projectDir/src/main/java"
- )
+ config.setFrom(rootProject.layout.projectDirectory.file("detekt/detekt.yml")) // point to your custom config defining rules to run, overwriting default behavior
+ baseline = file(layout.projectDirectory.file("detekt/baseline.xml")) // a way of suppressing issues before introducing detekt
+ source.setFrom(project.sourceSets.named("main").map { it.allSource })
+// source.setFrom(
+// "$projectDir/src/main/kotlin",
+// "$projectDir/src/main/java"
+// )
}
tasks.withType<Detekt>().configureEach {