Skip to content

Commit

Permalink
build(gradle): fix detekt plugin resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianLusina committed May 13, 2022
1 parent 49d840f commit 2ee8690
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 51 deletions.
32 changes: 0 additions & 32 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,35 +1,3 @@
OSFLAG :=
ifeq ($(OS),Windows_NT)
OSFLAG += -D WIN32
ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
OSFLAG += -D AMD64
endif
ifeq ($(PROCESSOR_ARCHITECTURE),x86)
OSFLAG += -D IA32
endif
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
OSFLAG += -D LINUX
endif
ifeq ($(UNAME_S),Darwin)
OSFLAG += -D OSX
endif
UNAME_P := $(shell uname -p)
ifeq ($(UNAME_P),x86_64)
OSFLAG += -D AMD64
endif
ifneq ($(filter %86,$(UNAME_P)),)
OSFLAG += -D IA32
endif
ifneq ($(filter arm%,$(UNAME_P)),)
OSFLAG += -D ARM
endif
endif

echoos:
@echo $(OSFLAG)

install:
./gradlew dependencies

Expand Down
12 changes: 8 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
import java.net.URI

group = Meta.GROUP

buildscript {
repositories {
Expand All @@ -26,14 +29,17 @@ plugins {
kotlin("jvm")
}

group = Meta.GROUP
apply(plugin = Plugins.Detekt.plugin)

repositories {
mavenCentral()
mavenLocal()

maven {
url = uri("https://jitpack.io")
url = URI.create("https://plugins.gradle.org/m2/")
}

flatDir {
dirs("libs")
}
Expand Down Expand Up @@ -101,14 +107,12 @@ tasks {

dependencies {
implementation(kotlin("stdlib-jdk8", Versions.KOTLIN))

testImplementation(Dependencies.Kotlin.testJunit)
testRuntimeOnly(Dependencies.Kotlin.reflect)

testImplementation(Dependencies.Test.mockK)

testImplementation(Dependencies.Test.Spek.dslJvm)
testImplementation(Dependencies.Test.Spek.runnerJunit5)

testImplementation(Dependencies.Test.Jupiter.api)
testImplementation(Dependencies.Test.Jupiter.engine)
testImplementation(Dependencies.Test.Jupiter.vintageEngine)
Expand Down
4 changes: 1 addition & 3 deletions buildSrc/src/main/kotlin/Plugins.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
object Plugins {
const val JAVA = "java"
const val KOTLIN = "kotlin"

object Jetbrains {
const val gradle = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.KOTLIN}"
Expand All @@ -16,7 +14,7 @@ object Plugins {
}

object Detekt {
const val version = "1.9.1"
const val version = "1.20.0"
const val plugin = "io.gitlab.arturbosch.detekt"
const val gradle = "io.gitlab.arturbosch.detekt:detekt-gradle-plugin"
const val formatting = "io.gitlab.arturbosch.detekt:detekt-formatting"
Expand Down
12 changes: 0 additions & 12 deletions buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
object Versions {
const val KOTLIN = "1.6.20"

const val GRADLE = "7.0"
const val GRADLE_BUILD_PLUGIN = "3.3.1"
const val KOTLIN_GRADLE_PLUGIN = "1.3.70"
const val DETEKT = "1.9.1"
const val DOKKA = "1.4.30"

const val JAVA = "1.8"
const val SONARQUBE = "3.3"

const val JUNIT = "5.5.2"
const val MOCKK = "1.10.0"
}

0 comments on commit 2ee8690

Please sign in to comment.