From daa294c86fd1573e9c20e2a9de7e76e045401891 Mon Sep 17 00:00:00 2001 From: Diego Ocampo Date: Fri, 6 Oct 2023 09:45:29 +1100 Subject: [PATCH 1/3] Removing unnecessary libs --- build.gradle.kts | 3 --- 1 file changed, 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index b5c1d88..f331790 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -24,12 +24,9 @@ dependencies { implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.2") testImplementation(kotlin("test")) testImplementation("io.mockk:mockk:1.13.5") - testImplementation("io.kotest:kotest-assertions-core:5.6.2") testImplementation("io.kotest:kotest-framework-datatest:5.6.2") testImplementation("io.kotest:kotest-runner-junit5:5.6.2") testImplementation("io.kotest:kotest-property:5.6.2") - testImplementation("io.kotest.extensions:kotest-property-arrow:1.3.3") - testImplementation("io.kotest.extensions:kotest-assertions-arrow:1.3.3") } group = "com.atlassian" From 27a6dcf022ebbe49ec17d34982a0bbae8d68d49f Mon Sep 17 00:00:00 2001 From: Diego Ocampo Date: Fri, 6 Oct 2023 10:22:52 +1100 Subject: [PATCH 2/3] Moving versions to catalog --- build.gradle.kts | 23 +++++++++++------------ libs.versions.toml | 40 ++++++++++++++++++++++++++++++++++++++++ settings.gradle | 1 - settings.gradle.kts | 9 +++++++++ 4 files changed, 60 insertions(+), 13 deletions(-) create mode 100644 libs.versions.toml delete mode 100644 settings.gradle create mode 100644 settings.gradle.kts diff --git a/build.gradle.kts b/build.gradle.kts index 7d01f73..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,14 +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-framework-datatest:5.7.2") - testImplementation("io.kotest:kotest-runner-junit5:5.7.2") - testImplementation("io.kotest:kotest-property:5.7.2") + 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..80cfc3f --- /dev/null +++ b/libs.versions.toml @@ -0,0 +1,40 @@ +[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-assertionsCore", + "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-assertionsCore = { module = "io.kotest:kotest-assertions-core", 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" } +kotlin-allOpen = { id = "org.jetbrains.kotlin.plugin.allopen", 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")) + } + } +} From 6028dc79b891087e3900330ef19a1271a0f7727d Mon Sep 17 00:00:00 2001 From: Diego Ocampo Date: Fri, 6 Oct 2023 10:28:57 +1100 Subject: [PATCH 3/3] Toml file cleanup. --- libs.versions.toml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libs.versions.toml b/libs.versions.toml index 80cfc3f..ee8cd21 100644 --- a/libs.versions.toml +++ b/libs.versions.toml @@ -10,7 +10,6 @@ mockk = "1.13.8" [bundles] kotest = [ - "kotest-assertionsCore", "kotest-property", "kotest-frameworkDatatest" ] @@ -22,7 +21,6 @@ kotlinx-coroutinesCore = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-co # Kotest kotest-runnerJUnit5 = { module = "io.kotest:kotest-runner-junit5", version.ref = "kotest" } -kotest-assertionsCore = { module = "io.kotest:kotest-assertions-core", version.ref = "kotest" } kotest-property = { module = "io.kotest:kotest-property", version.ref = "kotest" } kotest-frameworkDatatest = { module = "io.kotest:kotest-framework-datatest", version.ref = "kotest" } @@ -32,9 +30,7 @@ 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" } -kotlin-allOpen = { id = "org.jetbrains.kotlin.plugin.allopen", 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