Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

Commit

Permalink
Move all the versions to version catalog (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
cortinico authored Oct 18, 2021
1 parent a40dae6 commit 770c973
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 9 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
kotlin("jvm") version "1.5.31"
alias(libs.plugins.kotlin)
id("io.github.detekt.gradle.compiler-plugin")
}

Expand Down
13 changes: 7 additions & 6 deletions plugin-build/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import de.undercouch.gradle.tasks.download.Verify
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import java.io.ByteArrayOutputStream

val kotlinVersion: String by project
val kotlinVersion = libs.versions.kotlin.get()

val kotlinCompilerChecksum: String by project
val detektPluginVersion: String by project

Expand All @@ -13,13 +14,13 @@ version = detektPluginVersion
val detektPublication = "DetektPublication"

plugins {
kotlin("jvm") version "1.5.31"
alias(libs.plugins.kotlin)
id("maven-publish")
id("java-gradle-plugin")
id("com.gradle.plugin-publish") version "0.14.0"
id("com.github.ben-manes.versions") version "0.38.0"
id("com.github.johnrengelman.shadow") version "7.0.0"
id("de.undercouch.download") version "4.1.1"
alias(libs.plugins.pluginPublishing)
alias(libs.plugins.gradleVersionz)
alias(libs.plugins.shadow)
alias(libs.plugins.download)
}

repositories {
Expand Down
2 changes: 0 additions & 2 deletions plugin-build/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
detektPluginVersion=0.4.0

# Gradle plugins
kotlinVersion=1.5.31
kotlinCompilerChecksum=661111286f3e5ac06aaf3a9403d869d9a96a176b62b141814be626a47249fe9e

kotlin.code.style=official
Expand Down
7 changes: 7 additions & 0 deletions plugin-build/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,11 @@ kotlinCompileTesting = { module = "com.github.tschuchortdev:kotlin-compile-testi
spek-dsl = { module = "org.spekframework.spek2:spek-dsl-jvm", version.ref = "spek" }
spek-runner = { module = "org.spekframework.spek2:spek-runner-junit5", version.ref = "spek" }

[plugins]
download = { id = "de.undercouch.download", version = "4.1.1" }
gradleVersionz = { id = "com.github.ben-manes.versions", version = "0.39.0" }
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
pluginPublishing = { id = "com.gradle.plugin-publish", version = "0.15.0" }
shadow = { id = "com.github.johnrengelman.shadow", version = "7.0.0" }

[bundles]
8 changes: 8 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,12 @@ rootProject.name = "detekt-compiler-plugin-composite-build"

enableFeaturePreview("VERSION_CATALOGS")

dependencyResolutionManagement {
versionCatalogs {
create("libs") {
from(files("plugin-build/gradle/libs.versions.toml"))
}
}
}

includeBuild("plugin-build")

0 comments on commit 770c973

Please sign in to comment.