Skip to content

Commit

Permalink
Add Kotlin dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
JavierSegoviaCordoba committed Nov 27, 2024
1 parent 1d41148 commit 2c0b3f9
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

### Updated

- `org.jetbrains.kotlin:kotlin-gradle-plugin -> 2.1.0`
- `gradle -> 8.11.1`
- `com.javiersc.hubdle:com.javiersc.hubdle.gradle.plugin -> 0.7.18`
- `com.javiersc.hubdle:hubdle-version-catalog -> 0.3.13`
Expand Down
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
[versions]
hubdle = "0.7.18"
hubdleCatalog = "0.3.13"
kotlin = "2.1.0"

[libraries]
hubdle-catalog = { module = "com.javiersc.hubdle:hubdle-version-catalog", version.ref = "hubdleCatalog" }
jetbrains-kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }

[plugins]
javiersc-hubdle = { id = "com.javiersc.hubdle", version.ref = "hubdle" }
3 changes: 1 addition & 2 deletions kotlin-compiler-extensions/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ hubdle {
jvm {
features {
compiler {
mainClass.set(
"com.javiersc.kotlin.compiler.extensions.GenerateKotlinCompilerTestsKt")
mainClass.set("com.javiersc.kotlin.compiler.extensions.GenerateKotlinCompilerTestsKt")
addExtensionDependencies(false)
generateTestOnSync(false)
testDependencies(hubdle.javiersc.kotlin.stdlib)
Expand Down
22 changes: 21 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import com.javiersc.gradle.project.extensions.withPlugins
import com.javiersc.semver.project.gradle.plugin.SemverExtension
import org.jetbrains.kotlin.gradle.plugin.getKotlinPluginVersion

Expand Down Expand Up @@ -44,6 +43,27 @@ val hubdleCatalogVersion: String =
.first { it.contains("hubdleCatalog") }
.split("\"")[1]

buildscript {
dependencies {
constraints {
val kotlinVersion: String =
file("$rootDir/gradle/libs.versions.toml")
.readLines()
.first { it.contains("kotlin") }
.split("\"")[1]

val kotlinModule =
file("$rootDir/gradle/libs.versions.toml")
.readLines()
.first { it.contains("jetbrains-kotlin-gradle-plugin") }
.split("\"")[1]

val kotlinDependency = "$kotlinModule:$kotlinVersion"
classpath(kotlinDependency)
}
}
}

hubdleSettings {
catalog { //
version(hubdleCatalogVersion)
Expand Down

0 comments on commit 2c0b3f9

Please sign in to comment.