diff --git a/build.gradle.kts b/build.gradle.kts index 2e45a36..b0198bb 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,12 +1,11 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { - kotlin("jvm") version "1.9.10" - id("org.jetbrains.dokka") version "1.9.0" + alias(libs.plugins.kotlin.jvm) + alias(libs.plugins.ktlint) + alias(libs.plugins.dokka) id("maven-publish") id("signing") - application - id("org.jlleitschuh.gradle.ktlint") version "11.6.0" } repositories { @@ -19,17 +18,14 @@ java { } dependencies { - implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.10") - implementation("commons-codec:commons-codec:1.16.0") - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3") - testImplementation(kotlin("test")) - testImplementation("io.mockk:mockk:1.13.8") - testImplementation("io.kotest:kotest-assertions-core:5.7.2") - testImplementation("io.kotest:kotest-framework-datatest:5.7.2") - testImplementation("io.kotest:kotest-runner-junit5:5.7.2") - testImplementation("io.kotest:kotest-property:5.7.2") - testImplementation("io.kotest.extensions:kotest-property-arrow:1.4.0") - testImplementation("io.kotest.extensions:kotest-assertions-arrow:1.4.0") + implementation(libs.kotlin.stdlib) + implementation(libs.commonsCodecs) + implementation(libs.kotlinx.coroutinesCore) + + testImplementation(libs.mockk) + testImplementation(libs.kotest.frameworkDatatest) + testImplementation(libs.kotest.runnerJUnit5) + testImplementation(libs.kotest.property) } group = "com.atlassian" diff --git a/libs.versions.toml b/libs.versions.toml new file mode 100644 index 0000000..ee8cd21 --- /dev/null +++ b/libs.versions.toml @@ -0,0 +1,36 @@ +[versions] + +commonsCodec = "1.16.0" +dokkaPlugin = "1.9.0" +kotest = "5.7.2" +kotlin = "1.9.10" +ktlintPlugin = "11.6.0" +kotlinxCoroutines = "1.7.3" +mockk = "1.13.8" + +[bundles] +kotest = [ + "kotest-property", + "kotest-frameworkDatatest" +] + +[libraries] +# kotlin +kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" } +kotlinx-coroutinesCore = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinxCoroutines" } + +# Kotest +kotest-runnerJUnit5 = { module = "io.kotest:kotest-runner-junit5", version.ref = "kotest" } +kotest-property = { module = "io.kotest:kotest-property", version.ref = "kotest" } +kotest-frameworkDatatest = { module = "io.kotest:kotest-framework-datatest", version.ref = "kotest" } + +# mockk +mockk = { module = "io.mockk:mockk", version.ref = "mockk" } + +# Commons codecs +commonsCodecs = { module = "commons-codec:commons-codec", version.ref = "commonsCodec" } + +[plugins] +kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } +ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlintPlugin" } +dokka = { id = "org.jetbrains.dokka", version.ref = "dokkaPlugin" } \ No newline at end of file diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index ff7f24c..0000000 --- a/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = "onetime" diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000..1c3557d --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,9 @@ +rootProject.name = "onetime" + +dependencyResolutionManagement { + versionCatalogs { + create("libs") { + from(files("libs.versions.toml")) + } + } +}