Skip to content

Commit

Permalink
fix: remove Versions object
Browse files Browse the repository at this point in the history
  • Loading branch information
peacecwz committed Apr 5, 2024
1 parent e5fe105 commit 9d4d3ec
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
18 changes: 8 additions & 10 deletions core/kordinator/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,17 @@ plugins {
id("com.vanniktech.maven.publish") version "0.28.0"
}

object Versions {
const val COROUTINE_VERSION = "1.8.0"
const val MOCKK_VERSION = "1.12.0"
val LIBRARY_VERSION: String =
(project.findProperty("LIBRARY_VERSION") ?: System.getenv("LIBRARY_VERSION") ?: "0.0.1") as String
}
val COROUTINE_VERSION = "1.8.0"
val MOCKK_VERSION = "1.12.0"
val LIBRARY_VERSION: String =
(project.findProperty("LIBRARY_VERSION") ?: System.getenv("LIBRARY_VERSION") ?: "0.0.1") as String

dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:${Versions.COROUTINE_VERSION}")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:${COROUTINE_VERSION}")

testImplementation("org.jetbrains.kotlin:kotlin-test")
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test")
testImplementation("io.mockk:mockk:${Versions.MOCKK_VERSION}")
testImplementation("io.mockk:mockk:${MOCKK_VERSION}")
}

java {
Expand Down Expand Up @@ -63,7 +61,7 @@ publishing {
create<MavenPublication>("mavenJava") {
groupId = "dev.ceviz"
artifactId = "kordinator"
version = Versions.LIBRARY_VERSION
version = LIBRARY_VERSION

from(components["java"])
artifact(sourcesJar.get())
Expand All @@ -73,7 +71,7 @@ publishing {
}

mavenPublishing {
coordinates("dev.ceviz", "kordinator", Versions.LIBRARY_VERSION)
coordinates("dev.ceviz", "kordinator", LIBRARY_VERSION)

pom {
name.set("Kordinator")
Expand Down
30 changes: 16 additions & 14 deletions libs/spring-kordinator/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,30 @@ plugins {
id("com.vanniktech.maven.publish") version "0.28.0"
}

object Versions {
const val COROUTINE_VERSION = "1.8.0"
const val SPRING_BOOT = "3.2.4"
const val MOCKK_VERSION = "1.12.0"
val LIBRARY_VERSION: String =
(project.findProperty("LIBRARY_VERSION") ?: System.getenv("LIBRARY_VERSION") ?: "0.0.1") as String
}
val COROUTINE_VERSION = "1.8.0"
val SPRING_BOOT = "3.2.4"
val MOCKK_VERSION = "1.12.0"
val LIBRARY_VERSION: String =
(project.findProperty("LIBRARY_VERSION") ?: System.getenv("LIBRARY_VERSION") ?: "0.0.1") as String

tasks.test {
useJUnitPlatform()
}

dependencies {
implementation(project(":core:kordinator"))
implementation("org.springframework.boot:spring-boot-autoconfigure:${Versions.SPRING_BOOT}")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:${Versions.COROUTINE_VERSION}")

testImplementation("org.jetbrains.kotlin:kotlin-test")
testImplementation("org.springframework.boot:spring-boot-starter-test:${Versions.SPRING_BOOT}")
// Spring Boot
implementation("org.springframework.boot:spring-boot-autoconfigure:${SPRING_BOOT}")
testImplementation("org.springframework.boot:spring-boot-starter-test:${SPRING_BOOT}")

// Kotlin Coroutines
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:${COROUTINE_VERSION}")
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test")

// Mockk
testImplementation("org.jetbrains.kotlin:kotlin-test")
testImplementation("io.mockk:mockk:${Versions.MOCKK_VERSION}")
testImplementation("io.mockk:mockk:${MOCKK_VERSION}")
}

java {
Expand Down Expand Up @@ -66,7 +68,7 @@ publishing {
create<MavenPublication>("mavenJava") {
groupId = "dev.ceviz"
artifactId = "spring-3x-kordinator"
version = Versions.LIBRARY_VERSION
version = LIBRARY_VERSION

from(components["java"])
artifact(sourcesJar.get())
Expand All @@ -76,7 +78,7 @@ publishing {
}

mavenPublishing {
coordinates("dev.ceviz", "spring-3x-kordinator", Versions.LIBRARY_VERSION)
coordinates("dev.ceviz", "spring-3x-kordinator", LIBRARY_VERSION)

pom {
name.set("Spring 3.x Kordinator")
Expand Down

0 comments on commit 9d4d3ec

Please sign in to comment.