diff --git a/common/analytics-testfixtures/build.gradle.kts b/common/analytics-testfixtures/build.gradle.kts index dd57bfee..fda9d354 100644 --- a/common/analytics-testfixtures/build.gradle.kts +++ b/common/analytics-testfixtures/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("node-module-plugin") + alias(libs.plugins.thecodinglove.node.module) } group = "com.gchristov.thecodinglove.common" diff --git a/common/analytics/build.gradle.kts b/common/analytics/build.gradle.kts index 4103cd18..79091c80 100644 --- a/common/analytics/build.gradle.kts +++ b/common/analytics/build.gradle.kts @@ -3,8 +3,8 @@ import com.gchristov.thecodinglove.gradleplugins.envSecret val packageId = "com.gchristov.thecodinglove.common.analytics" plugins { - id("node-module-plugin") - id("build-config-plugin") + alias(libs.plugins.thecodinglove.node.module) + alias(libs.plugins.thecodinglove.build.config) } group = "com.gchristov.thecodinglove.common" diff --git a/common/build.gradle.kts b/common/build.gradle.kts index db4f750a..1bff563c 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -1,9 +1,3 @@ -allprojects { - repositories { - mavenCentral() - } -} - val taskNames = listOf("clean", "assemble", "jsTest", "kotlinUpgradeYarnLock") taskNames.forEach { taskName -> tasks.register("${taskName}All") { diff --git a/common/firebase/build.gradle.kts b/common/firebase/build.gradle.kts index a165988b..a4aa7011 100644 --- a/common/firebase/build.gradle.kts +++ b/common/firebase/build.gradle.kts @@ -1,7 +1,5 @@ -import com.gchristov.thecodinglove.gradleplugins.Deps - plugins { - id("node-module-plugin") + alias(libs.plugins.thecodinglove.node.module) } group = "com.gchristov.thecodinglove.common" @@ -16,7 +14,8 @@ kotlin { } val jsMain by getting { dependencies { - implementation(npm(Deps.Google.firebaseAdmin.name, Deps.Google.firebaseAdmin.version)) + implementation(npm(libs.npm.firebase.admin.get().name, libs.npm.firebase.admin.get().version!!)) + implementation(npm(libs.npm.google.firestore.get().name, libs.npm.google.firestore.get().version!!)) } } } diff --git a/common/kotlin-js-store/yarn.lock b/common/kotlin-js-store/yarn.lock index 2a514b4f..83a10696 100644 --- a/common/kotlin-js-store/yarn.lock +++ b/common/kotlin-js-store/yarn.lock @@ -99,7 +99,7 @@ dependencies: tslib "^2.1.0" -"@google-cloud/firestore@^6.8.0": +"@google-cloud/firestore@6.8.0", "@google-cloud/firestore@^6.8.0": version "6.8.0" resolved "https://registry.yarnpkg.com/@google-cloud/firestore/-/firestore-6.8.0.tgz#d8c852844c381afaf62592796606c10e178400b5" integrity sha512-JRpk06SmZXLGz0pNx1x7yU3YhkUXheKgH5hbDZ4kMsdhtfV5qPLJLRI4wv69K0cZorIk+zTMOwptue7hizo0eA== diff --git a/common/kotlin/build.gradle.kts b/common/kotlin/build.gradle.kts index eac02385..ac23cba1 100644 --- a/common/kotlin/build.gradle.kts +++ b/common/kotlin/build.gradle.kts @@ -1,7 +1,5 @@ -import com.gchristov.thecodinglove.gradleplugins.Deps - plugins { - id("base-node-plugin") + alias(libs.plugins.thecodinglove.base.node) } group = "com.gchristov.thecodinglove.common" @@ -11,15 +9,15 @@ kotlin { sourceSets { val commonMain by getting { dependencies { - api(Deps.Kodein.di) - api(Deps.Kermit.logger) - api(Deps.Kotlin.coroutinesCore) - api(Deps.Kotlin.dateTime) - api(Deps.Kotlin.serialization) - api(Deps.Uuid.uuid) - api(Deps.Arrow.core) - api(Deps.Crypto.mac) - api(Deps.Crypto.encoding) + api(libs.kodein) + api(libs.touchlab.kermit) + api(libs.kotlinx.coroutines.core) + api(libs.kotlinx.datetime) + api(libs.kotlinx.serialization.json) + api(libs.uuid) + api(libs.arrow.core) + api(libs.diglol.crypto) + api(libs.diglol.encoding) } } } diff --git a/common/monitoring/build.gradle.kts b/common/monitoring/build.gradle.kts index f83f8097..05dd7a96 100644 --- a/common/monitoring/build.gradle.kts +++ b/common/monitoring/build.gradle.kts @@ -3,8 +3,8 @@ import com.gchristov.thecodinglove.gradleplugins.envSecret val packageId = "com.gchristov.thecodinglove.common.monitoring" plugins { - id("node-module-plugin") - id("build-config-plugin") + alias(libs.plugins.thecodinglove.node.module) + alias(libs.plugins.thecodinglove.build.config) } group = "com.gchristov.thecodinglove.common" diff --git a/common/network-testfixtures/build.gradle.kts b/common/network-testfixtures/build.gradle.kts index d8d93ec7..c23c5118 100644 --- a/common/network-testfixtures/build.gradle.kts +++ b/common/network-testfixtures/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("node-module-plugin") + alias(libs.plugins.thecodinglove.node.module) } group = "com.gchristov.thecodinglove.common" diff --git a/common/network/build.gradle.kts b/common/network/build.gradle.kts index 437cb97c..191f8283 100644 --- a/common/network/build.gradle.kts +++ b/common/network/build.gradle.kts @@ -1,7 +1,5 @@ -import com.gchristov.thecodinglove.gradleplugins.Deps - plugins { - id("node-module-plugin") + alias(libs.plugins.thecodinglove.node.module) } group = "com.gchristov.thecodinglove.common" @@ -12,16 +10,16 @@ kotlin { val commonMain by getting { dependencies { implementation(projects.kotlin) - api(Deps.Ktor.client) - implementation(Deps.Ktor.contentNegotiation) - implementation(Deps.Ktor.serialization) - implementation(Deps.Ktor.logging) - implementation(Deps.Ktor.logback) + api(libs.ktor.client.core) + implementation(libs.ktor.client.contentNegotiation) + implementation(libs.ktor.client.serializationJson) + implementation(libs.ktor.client.logging) + implementation(libs.logback) } } val jsMain by getting { dependencies { - implementation(npm(Deps.Node.express.name, Deps.Node.express.version)) + implementation(npm(libs.npm.express.get().name, libs.npm.express.get().version!!)) } } } diff --git a/common/pubsub-testfixtures/build.gradle.kts b/common/pubsub-testfixtures/build.gradle.kts index a11a2e6b..112606cc 100644 --- a/common/pubsub-testfixtures/build.gradle.kts +++ b/common/pubsub-testfixtures/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("node-module-plugin") + alias(libs.plugins.thecodinglove.node.module) } group = "com.gchristov.thecodinglove.common" diff --git a/common/pubsub/build.gradle.kts b/common/pubsub/build.gradle.kts index cc68fcae..61db461a 100644 --- a/common/pubsub/build.gradle.kts +++ b/common/pubsub/build.gradle.kts @@ -1,7 +1,5 @@ -import com.gchristov.thecodinglove.gradleplugins.Deps - plugins { - id("node-module-plugin") + alias(libs.plugins.thecodinglove.node.module) } group = "com.gchristov.thecodinglove.common" @@ -17,7 +15,7 @@ kotlin { } val jsMain by getting { dependencies { - implementation(npm(Deps.Google.pubSub.name, Deps.Google.pubSub.version)) + implementation(npm(libs.npm.google.pubsub.get().name, libs.npm.google.pubsub.get().version!!)) } } } diff --git a/common/settings.gradle.kts b/common/settings.gradle.kts index b59ec104..91f1108b 100644 --- a/common/settings.gradle.kts +++ b/common/settings.gradle.kts @@ -8,6 +8,25 @@ plugins { id("com.gradle.develocity") version("3.18.1") } +dependencyResolutionManagement { + repositories { + gradlePluginPortal() + } + versionCatalogs { + create("libs") { + from(files("../gradle/libs.versions.toml")) + } + } +} + +develocity { + buildScan { + termsOfUseUrl.set("https://gradle.com/help/legal-terms-of-use") + termsOfUseAgree.set("yes") + publishing.onlyIf { true } + } +} + rootProject.name = "common" include("analytics") @@ -19,12 +38,4 @@ include("network") include("network-testfixtures") include("pubsub") include("pubsub-testfixtures") -include("test") - -develocity { - buildScan { - termsOfUseUrl.set("https://gradle.com/help/legal-terms-of-use") - termsOfUseAgree.set("yes") - publishing.onlyIf { true } - } -} \ No newline at end of file +include("test") \ No newline at end of file diff --git a/common/test/build.gradle.kts b/common/test/build.gradle.kts index 3fb97637..eb1ba42c 100644 --- a/common/test/build.gradle.kts +++ b/common/test/build.gradle.kts @@ -1,7 +1,5 @@ -import com.gchristov.thecodinglove.gradleplugins.Deps - plugins { - id("base-node-plugin") + alias(libs.plugins.thecodinglove.base.node) } group = "com.gchristov.thecodinglove.common" @@ -11,9 +9,9 @@ kotlin { sourceSets { val commonMain by getting { dependencies { - implementation(Deps.Kermit.logger) - implementation(Deps.Kotlin.coroutinesCore) - api(Deps.Kotlin.test) + implementation(libs.touchlab.kermit) + implementation(libs.kotlinx.coroutines.core) + api(libs.kotlin.test) } } } diff --git a/gradle-plugins/build.gradle.kts b/gradle-plugins/build.gradle.kts index a1e58de3..1bff563c 100644 --- a/gradle-plugins/build.gradle.kts +++ b/gradle-plugins/build.gradle.kts @@ -1,44 +1,3 @@ -plugins { - `kotlin-dsl` -} - -gradlePlugin { - plugins.register("base-node-plugin") { - id = "base-node-plugin" - implementationClass = "com.gchristov.thecodinglove.gradleplugins.BaseNodePlugin" - } - plugins.register("base-browser-plugin") { - id = "base-browser-plugin" - implementationClass = "com.gchristov.thecodinglove.gradleplugins.BaseBrowserPlugin" - } - plugins.register("node-module-plugin") { - id = "node-module-plugin" - implementationClass = "com.gchristov.thecodinglove.gradleplugins.NodeModulePlugin" - } - plugins.register("build-config-plugin") { - id = "build-config-plugin" - implementationClass = "com.gchristov.thecodinglove.gradleplugins.BuildConfigPlugin" - } - plugins.register("browser-binary-plugin") { - id = "browser-binary-plugin" - implementationClass = "com.gchristov.thecodinglove.gradleplugins.BrowserBinaryPlugin" - } - plugins.register("node-binary-plugin") { - id = "node-binary-plugin" - implementationClass = "com.gchristov.thecodinglove.gradleplugins.NodeBinaryPlugin" - } -} - -repositories { - mavenCentral() -} - -dependencies { - implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.21") - implementation("org.jetbrains.kotlin:kotlin-serialization:1.9.21") - implementation("com.codingfeline.buildkonfig:buildkonfig-gradle-plugin:0.15.0") -} - val taskNames = listOf("clean", "assemble", "jsTest", "kotlinUpgradeYarnLock") taskNames.forEach { taskName -> tasks.register("${taskName}All") { diff --git a/gradle-plugins/conventions/build.gradle.kts b/gradle-plugins/conventions/build.gradle.kts new file mode 100644 index 00000000..4926e7de --- /dev/null +++ b/gradle-plugins/conventions/build.gradle.kts @@ -0,0 +1,37 @@ +plugins { + `kotlin-dsl` +} + +gradlePlugin { + plugins.register("base-node-plugin") { + id = "base-node-plugin" + implementationClass = "com.gchristov.thecodinglove.gradleplugins.BaseNodePlugin" + } + plugins.register("base-browser-plugin") { + id = "base-browser-plugin" + implementationClass = "com.gchristov.thecodinglove.gradleplugins.BaseBrowserPlugin" + } + plugins.register("node-module-plugin") { + id = "node-module-plugin" + implementationClass = "com.gchristov.thecodinglove.gradleplugins.NodeModulePlugin" + } + plugins.register("build-config-plugin") { + id = "build-config-plugin" + implementationClass = "com.gchristov.thecodinglove.gradleplugins.BuildConfigPlugin" + } + plugins.register("browser-binary-plugin") { + id = "browser-binary-plugin" + implementationClass = "com.gchristov.thecodinglove.gradleplugins.BrowserBinaryPlugin" + } + plugins.register("node-binary-plugin") { + id = "node-binary-plugin" + implementationClass = "com.gchristov.thecodinglove.gradleplugins.NodeBinaryPlugin" + } +} + +dependencies { + compileOnly(libs.kotlin.gradlePlugin) + // Allows these to be available and applied in the pre-compiled conventions plugin + implementation(libs.kotlin.serialization.gradlePlugin) + implementation(libs.buildKonfig.gradlePlugin) +} \ No newline at end of file diff --git a/gradle-plugins/src/main/kotlin/com/gchristov/thecodinglove/gradleplugins/BasePlugin.kt b/gradle-plugins/conventions/src/main/kotlin/com/gchristov/thecodinglove/gradleplugins/BasePlugin.kt similarity index 95% rename from gradle-plugins/src/main/kotlin/com/gchristov/thecodinglove/gradleplugins/BasePlugin.kt rename to gradle-plugins/conventions/src/main/kotlin/com/gchristov/thecodinglove/gradleplugins/BasePlugin.kt index ff461e26..9fc43dfe 100644 --- a/gradle-plugins/src/main/kotlin/com/gchristov/thecodinglove/gradleplugins/BasePlugin.kt +++ b/gradle-plugins/conventions/src/main/kotlin/com/gchristov/thecodinglove/gradleplugins/BasePlugin.kt @@ -2,12 +2,9 @@ package com.gchristov.thecodinglove.gradleplugins import org.gradle.api.Plugin import org.gradle.api.Project -import org.gradle.api.file.Directory import org.gradle.kotlin.dsl.assign import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalDistributionDsl -import java.io.FileInputStream -import java.util.* abstract class BaseMultiplatformPlugin : Plugin { override fun apply(target: Project) { diff --git a/gradle-plugins/src/main/kotlin/com/gchristov/thecodinglove/gradleplugins/BinaryPlugin.kt b/gradle-plugins/conventions/src/main/kotlin/com/gchristov/thecodinglove/gradleplugins/BinaryPlugin.kt similarity index 90% rename from gradle-plugins/src/main/kotlin/com/gchristov/thecodinglove/gradleplugins/BinaryPlugin.kt rename to gradle-plugins/conventions/src/main/kotlin/com/gchristov/thecodinglove/gradleplugins/BinaryPlugin.kt index 3f4c0c8d..820d6ba9 100644 --- a/gradle-plugins/src/main/kotlin/com/gchristov/thecodinglove/gradleplugins/BinaryPlugin.kt +++ b/gradle-plugins/conventions/src/main/kotlin/com/gchristov/thecodinglove/gradleplugins/BinaryPlugin.kt @@ -7,7 +7,7 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension class NodeBinaryPlugin : Plugin { override fun apply(target: Project) { target.run { - plugins.apply("node-module-plugin") + plugins.apply(libs.findPlugin("thecodinglove-node-module").get().get().pluginId) extensions.configure(KotlinMultiplatformExtension::class.java) { js(IR) { binaries.library() @@ -33,7 +33,7 @@ class NodeBinaryPlugin : Plugin { class BrowserBinaryPlugin : Plugin { override fun apply(target: Project) { target.run { - plugins.apply("base-browser-plugin") + plugins.apply(libs.findPlugin("thecodinglove-base-browser").get().get().pluginId) extensions.configure(KotlinMultiplatformExtension::class.java) { js(IR) { binaries.executable() diff --git a/gradle-plugins/src/main/kotlin/com/gchristov/thecodinglove/gradleplugins/BuildConfigPlugin.kt b/gradle-plugins/conventions/src/main/kotlin/com/gchristov/thecodinglove/gradleplugins/BuildConfigPlugin.kt similarity index 100% rename from gradle-plugins/src/main/kotlin/com/gchristov/thecodinglove/gradleplugins/BuildConfigPlugin.kt rename to gradle-plugins/conventions/src/main/kotlin/com/gchristov/thecodinglove/gradleplugins/BuildConfigPlugin.kt diff --git a/gradle-plugins/src/main/kotlin/com/gchristov/thecodinglove/gradleplugins/ModulePlugin.kt b/gradle-plugins/conventions/src/main/kotlin/com/gchristov/thecodinglove/gradleplugins/ModulePlugin.kt similarity index 76% rename from gradle-plugins/src/main/kotlin/com/gchristov/thecodinglove/gradleplugins/ModulePlugin.kt rename to gradle-plugins/conventions/src/main/kotlin/com/gchristov/thecodinglove/gradleplugins/ModulePlugin.kt index 8b332c53..8169e766 100644 --- a/gradle-plugins/src/main/kotlin/com/gchristov/thecodinglove/gradleplugins/ModulePlugin.kt +++ b/gradle-plugins/conventions/src/main/kotlin/com/gchristov/thecodinglove/gradleplugins/ModulePlugin.kt @@ -7,11 +7,11 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension class NodeModulePlugin : Plugin { override fun apply(target: Project) { target.run { - plugins.apply("base-node-plugin") + plugins.apply(libs.findPlugin("thecodinglove-base-node").get().get().pluginId) plugins.apply("org.jetbrains.kotlin.plugin.serialization") extensions.configure(KotlinMultiplatformExtension::class.java) { sourceSets.maybeCreate("commonTest").dependencies { - api(Deps.Kotlin.coroutinesTest) + api(libs.findLibrary("kotlinx-coroutines-test").get()) } } } diff --git a/gradle-plugins/src/main/kotlin/com/gchristov/thecodinglove/gradleplugins/ProjectExt.kt b/gradle-plugins/conventions/src/main/kotlin/com/gchristov/thecodinglove/gradleplugins/ProjectExt.kt similarity index 70% rename from gradle-plugins/src/main/kotlin/com/gchristov/thecodinglove/gradleplugins/ProjectExt.kt rename to gradle-plugins/conventions/src/main/kotlin/com/gchristov/thecodinglove/gradleplugins/ProjectExt.kt index 2082e032..1a90239e 100644 --- a/gradle-plugins/src/main/kotlin/com/gchristov/thecodinglove/gradleplugins/ProjectExt.kt +++ b/gradle-plugins/conventions/src/main/kotlin/com/gchristov/thecodinglove/gradleplugins/ProjectExt.kt @@ -1,10 +1,16 @@ package com.gchristov.thecodinglove.gradleplugins import org.gradle.api.Project +import org.gradle.api.artifacts.VersionCatalog +import org.gradle.api.artifacts.VersionCatalogsExtension +import org.gradle.kotlin.dsl.getByType import org.gradle.api.file.Directory import java.io.FileInputStream import java.util.* +internal val Project.libs + get(): VersionCatalog = extensions.getByType().named("libs") + fun Project.binaryRootDirectory(): Directory = layout.buildDirectory.dir("dist/js").get() fun Project.envSecret(key: String): String { diff --git a/gradle-plugins/gradle.properties b/gradle-plugins/gradle.properties index 32bb9a03..caef76b2 100644 --- a/gradle-plugins/gradle.properties +++ b/gradle-plugins/gradle.properties @@ -1,6 +1,7 @@ #Gradle org.gradle.jvmargs=-Xmx4g "-XX:MaxMetaspaceSize=2g" org.gradle.caching=true +org.gradle.configuration-cache=true org.gradle.parallel=true #Kotlin diff --git a/gradle-plugins/settings.gradle.kts b/gradle-plugins/settings.gradle.kts index 5aba803e..ac816e34 100644 --- a/gradle-plugins/settings.gradle.kts +++ b/gradle-plugins/settings.gradle.kts @@ -1,3 +1,16 @@ enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") +dependencyResolutionManagement { + repositories { + gradlePluginPortal() + } + versionCatalogs { + create("libs") { + from(files("../gradle/libs.versions.toml")) + } + } +} + rootProject.name = "gradle-plugins" + +include(":conventions") \ No newline at end of file diff --git a/gradle-plugins/src/main/kotlin/com/gchristov/thecodinglove/gradleplugins/Deps.kt b/gradle-plugins/src/main/kotlin/com/gchristov/thecodinglove/gradleplugins/Deps.kt deleted file mode 100644 index ccb8cfb9..00000000 --- a/gradle-plugins/src/main/kotlin/com/gchristov/thecodinglove/gradleplugins/Deps.kt +++ /dev/null @@ -1,73 +0,0 @@ -package com.gchristov.thecodinglove.gradleplugins - -class Deps { - object Common { - private const val group = "com.gchristov.thecodinglove.common" - const val analytics = "$group:analytics" - const val analyticsTestFixtures = "$group:analytics-testfixtures" - const val firebase = "$group:firebase" - const val kotlin = "$group:kotlin" - const val monitoring = "$group:monitoring" - const val network = "$group:network" - const val networkTestFixtures = "$group:network-testfixtures" - const val pubsub = "$group:pubsub" - const val pubsubTestFixtures = "$group:pubsub-testfixtures" - const val test = "$group:test" - } - - object Arrow { - const val core = "io.arrow-kt:arrow-core:1.2.1" - } - - object Crypto { - const val mac = "com.diglol.crypto:mac:0.1.5" - const val encoding = "com.diglol.encoding:encoding:0.3.0" - } - - object Google { - val firebaseAdmin = NpmDependency("firebase-admin", "11.11.1") - val pubSub = NpmDependency("@google-cloud/pubsub", "4.0.7") - } - - object Kermit { - private const val kermitVersion = "2.0.2" - const val logger = "co.touchlab:kermit:$kermitVersion" - } - - object Kodein { - const val di = "org.kodein.di:kodein-di:7.21.0" - } - - object Kotlin { - private const val coroutinesVersion = "1.7.3" - - const val coroutinesCore = "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion" - const val coroutinesTest = "org.jetbrains.kotlinx:kotlinx-coroutines-test:${coroutinesVersion}" - const val test = "org.jetbrains.kotlin:kotlin-test" - const val dateTime = "org.jetbrains.kotlinx:kotlinx-datetime:0.4.1" - const val serialization = "org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.1" - } - - object Ktor { - private const val ktorVersion = "2.3.6" - const val client = "io.ktor:ktor-client-core:$ktorVersion" - const val contentNegotiation = "io.ktor:ktor-client-content-negotiation:$ktorVersion" - const val serialization = "io.ktor:ktor-serialization-kotlinx-json:$ktorVersion" - const val logging = "io.ktor:ktor-client-logging:$ktorVersion" - const val logback = "ch.qos.logback:logback-classic:1.4.11" - } - - object Node { - val htmlParser = NpmDependency("node-html-parser", "6.1.11") - val express = NpmDependency("express", "4.18.2") - } - - object Uuid { - const val uuid = "com.benasher44:uuid:0.8.2" - } -} - -data class NpmDependency( - val name: String, - val version: String -) \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 00000000..24ad134c --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,70 @@ +[versions] +buildKonfig = "0.15.0" +kotlin = "1.9.21" +kotlinx-coroutines = "1.7.3" +kotlinx-datetime = "0.4.1" +kotlinx-serialization = "1.6.1" +arrow = "1.2.3" +uuid = "0.8.2" +diglolCrypto = "0.1.5" +diglolEncoding = "0.3.0" +kodein = "7.21.2" +touchlab-kermit = "2.0.3" +ktor = "2.3.9" +logback = "1.4.11" +npm-htmlParser = "6.1.11" +npm-express = "4.18.2" +npm-firebase-admin = "11.11.1" +npm-google-firestore = "6.8.0" +npm-google-pubsub = "4.0.7" + +[libraries] +kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test" } +kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" } +#noinspection UnusedVersionCatalogEntry +kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinx-coroutines" } +kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinx-datetime" } +kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization" } +arrow-core = { module = "io.arrow-kt:arrow-core", version.ref = "arrow" } +uuid = { module = "com.benasher44:uuid", version.ref = "uuid" } +diglol-crypto = { module = "com.diglol.crypto:mac", version.ref = "diglolCrypto" } +diglol-encoding = { module = "com.diglol.encoding:encoding", version.ref = "diglolEncoding" } +kodein = { module = "org.kodein.di:kodein-di", version.ref = "kodein" } +touchlab-kermit = { module = "co.touchlab:kermit", version.ref = "touchlab-kermit" } +ktor-client-core = { module = "io.ktor:ktor-client-core", version.ref = "ktor" } +ktor-client-contentNegotiation = { module = "io.ktor:ktor-client-content-negotiation", version.ref = "ktor" } +ktor-client-serializationJson = { module = "io.ktor:ktor-serialization-kotlinx-json", version.ref = "ktor" } +ktor-client-logging = { module = "io.ktor:ktor-client-logging", version.ref = "ktor" } +logback = { module = "ch.qos.logback:logback-classic", version.ref = "logback" } +npm-htmlParser = { group = "npm", name = "node-html-parser", version.ref = "npm-htmlParser" } +npm-express = { group = "npm", name = "express", version.ref = "npm-express" } +npm-firebase-admin = { group = "npm", name = "firebase-admin", version.ref = "npm-firebase-admin" } +npm-google-firestore = { group = "npm", name = "@google-cloud/firestore", version.ref = "npm-google-firestore" } +npm-google-pubsub = { group = "npm", name = "@google-cloud/pubsub", version.ref = "npm-google-pubsub" } + +# Plugin dependencies included in the pre-compiled gradle-plugins/conventions project +kotlin-gradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } +kotlin-serialization-gradlePlugin = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlin" } +buildKonfig-gradlePlugin = { module = "com.codingfeline.buildkonfig:buildkonfig-gradle-plugin", version.ref = "buildKonfig" } + +# Dependency notations for internal libraries +common-analytics = { group = "com.gchristov.thecodinglove.common", name = "analytics" } +common-analytics-testFixtures = { group = "com.gchristov.thecodinglove.common", name = "analytics-testfixtures" } +common-firebase = { group = "com.gchristov.thecodinglove.common", name = "firebase" } +common-kotlin = { group = "com.gchristov.thecodinglove.common", name = "kotlin" } +common-monitoring = { group = "com.gchristov.thecodinglove.common", name = "monitoring" } +common-network = { group = "com.gchristov.thecodinglove.common", name = "network" } +common-network-testFixtures = { group = "com.gchristov.thecodinglove.common", name = "network-testfixtures" } +common-pubsub = { group = "com.gchristov.thecodinglove.common", name = "pubsub" } +common-pubsub-testFixtures = { group = "com.gchristov.thecodinglove.common", name = "pubsub-testfixtures" } +common-test = { group = "com.gchristov.thecodinglove.common", name = "test" } + +[plugins] + +# Plugins defined by this project +thecodinglove-base-node = { id = "base-node-plugin", version = "unspecified" } +thecodinglove-base-browser = { id = "base-browser-plugin", version = "unspecified" } +thecodinglove-node-module = { id = "node-module-plugin", version = "unspecified" } +thecodinglove-build-config = { id = "build-config-plugin", version = "unspecified" } +thecodinglove-browser-binary = { id = "browser-binary-plugin", version = "unspecified" } +thecodinglove-node-binary = { id = "node-binary-plugin", version = "unspecified" } \ No newline at end of file diff --git a/landing-page-web/build.gradle.kts b/landing-page-web/build.gradle.kts index db4f750a..1bff563c 100644 --- a/landing-page-web/build.gradle.kts +++ b/landing-page-web/build.gradle.kts @@ -1,9 +1,3 @@ -allprojects { - repositories { - mavenCentral() - } -} - val taskNames = listOf("clean", "assemble", "jsTest", "kotlinUpgradeYarnLock") taskNames.forEach { taskName -> tasks.register("${taskName}All") { diff --git a/landing-page-web/service/build.gradle.kts b/landing-page-web/service/build.gradle.kts index 4da23775..975797cc 100644 --- a/landing-page-web/service/build.gradle.kts +++ b/landing-page-web/service/build.gradle.kts @@ -1,7 +1,7 @@ import com.gchristov.thecodinglove.gradleplugins.binaryRootDirectory plugins { - id("browser-binary-plugin") + alias(libs.plugins.thecodinglove.browser.binary) } // Bundle resources specific to this binary diff --git a/landing-page-web/settings.gradle.kts b/landing-page-web/settings.gradle.kts index cb668fa1..1d63cf00 100644 --- a/landing-page-web/settings.gradle.kts +++ b/landing-page-web/settings.gradle.kts @@ -8,9 +8,16 @@ plugins { id("com.gradle.develocity") version("3.18.1") } -rootProject.name = "landing-page-web" - -include("service") +dependencyResolutionManagement { + repositories { + gradlePluginPortal() + } + versionCatalogs { + create("libs") { + from(files("../gradle/libs.versions.toml")) + } + } +} develocity { buildScan { @@ -18,4 +25,8 @@ develocity { termsOfUseAgree.set("yes") publishing.onlyIf { true } } -} \ No newline at end of file +} + +rootProject.name = "landing-page-web" + +include("service") \ No newline at end of file diff --git a/proxy-web/build.gradle.kts b/proxy-web/build.gradle.kts index db4f750a..1bff563c 100644 --- a/proxy-web/build.gradle.kts +++ b/proxy-web/build.gradle.kts @@ -1,9 +1,3 @@ -allprojects { - repositories { - mavenCentral() - } -} - val taskNames = listOf("clean", "assemble", "jsTest", "kotlinUpgradeYarnLock") taskNames.forEach { taskName -> tasks.register("${taskName}All") { diff --git a/proxy-web/service/build.gradle.kts b/proxy-web/service/build.gradle.kts index 4da23775..975797cc 100644 --- a/proxy-web/service/build.gradle.kts +++ b/proxy-web/service/build.gradle.kts @@ -1,7 +1,7 @@ import com.gchristov.thecodinglove.gradleplugins.binaryRootDirectory plugins { - id("browser-binary-plugin") + alias(libs.plugins.thecodinglove.browser.binary) } // Bundle resources specific to this binary diff --git a/proxy-web/settings.gradle.kts b/proxy-web/settings.gradle.kts index 8b730c55..3304cd11 100644 --- a/proxy-web/settings.gradle.kts +++ b/proxy-web/settings.gradle.kts @@ -8,9 +8,16 @@ plugins { id("com.gradle.develocity") version("3.18.1") } -rootProject.name = "proxy-web" - -include("service") +dependencyResolutionManagement { + repositories { + gradlePluginPortal() + } + versionCatalogs { + create("libs") { + from(files("../gradle/libs.versions.toml")) + } + } +} develocity { buildScan { @@ -19,3 +26,7 @@ develocity { publishing.onlyIf { true } } } + +rootProject.name = "proxy-web" + +include("service") \ No newline at end of file diff --git a/search/adapter/build.gradle.kts b/search/adapter/build.gradle.kts index 98005f38..37b6e705 100644 --- a/search/adapter/build.gradle.kts +++ b/search/adapter/build.gradle.kts @@ -1,33 +1,31 @@ -import com.gchristov.thecodinglove.gradleplugins.Deps - plugins { - id("node-module-plugin") + alias(libs.plugins.thecodinglove.node.module) } kotlin { sourceSets { val commonMain by getting { dependencies { - implementation(Deps.Common.analytics) - implementation(Deps.Common.kotlin) - implementation(Deps.Common.network) - implementation(Deps.Common.pubsub) - implementation(Deps.Common.firebase) + implementation(libs.common.analytics) + implementation(libs.common.kotlin) + implementation(libs.common.network) + implementation(libs.common.pubsub) + implementation(libs.common.firebase) implementation(projects.domain) } } val commonTest by getting { dependencies { - implementation(Deps.Common.test) - implementation(Deps.Common.analyticsTestFixtures) - implementation(Deps.Common.networkTestFixtures) - implementation(Deps.Common.pubsubTestFixtures) + implementation(libs.common.test) + implementation(libs.common.analytics.testFixtures) + implementation(libs.common.network.testFixtures) + implementation(libs.common.pubsub.testFixtures) implementation(projects.testFixtures) } } val jsMain by getting { dependencies { - implementation(npm(Deps.Node.htmlParser.name, Deps.Node.htmlParser.version)) + implementation(npm(libs.npm.htmlParser.get().name, libs.npm.htmlParser.get().version!!)) } } } diff --git a/search/build.gradle.kts b/search/build.gradle.kts index db4f750a..1bff563c 100644 --- a/search/build.gradle.kts +++ b/search/build.gradle.kts @@ -1,9 +1,3 @@ -allprojects { - repositories { - mavenCentral() - } -} - val taskNames = listOf("clean", "assemble", "jsTest", "kotlinUpgradeYarnLock") taskNames.forEach { taskName -> tasks.register("${taskName}All") { diff --git a/search/domain/build.gradle.kts b/search/domain/build.gradle.kts index 27d7dda2..fa508267 100644 --- a/search/domain/build.gradle.kts +++ b/search/domain/build.gradle.kts @@ -1,19 +1,17 @@ -import com.gchristov.thecodinglove.gradleplugins.Deps - plugins { - id("node-module-plugin") + alias(libs.plugins.thecodinglove.node.module) } kotlin { sourceSets { val commonMain by getting { dependencies { - implementation(Deps.Common.kotlin) + implementation(libs.common.kotlin) } } val commonTest by getting { dependencies { - implementation(Deps.Common.test) + implementation(libs.common.test) implementation(projects.testFixtures) } } diff --git a/search/kotlin-js-store/yarn.lock b/search/kotlin-js-store/yarn.lock index 59530709..f640ba5d 100644 --- a/search/kotlin-js-store/yarn.lock +++ b/search/kotlin-js-store/yarn.lock @@ -78,7 +78,7 @@ dependencies: tslib "^2.1.0" -"@google-cloud/firestore@^6.8.0": +"@google-cloud/firestore@6.8.0", "@google-cloud/firestore@^6.8.0": version "6.8.0" resolved "https://registry.yarnpkg.com/@google-cloud/firestore/-/firestore-6.8.0.tgz#d8c852844c381afaf62592796606c10e178400b5" integrity sha512-JRpk06SmZXLGz0pNx1x7yU3YhkUXheKgH5hbDZ4kMsdhtfV5qPLJLRI4wv69K0cZorIk+zTMOwptue7hizo0eA== diff --git a/search/service/build.gradle.kts b/search/service/build.gradle.kts index fedee255..05f93d89 100644 --- a/search/service/build.gradle.kts +++ b/search/service/build.gradle.kts @@ -1,19 +1,17 @@ -import com.gchristov.thecodinglove.gradleplugins.Deps - plugins { - id("node-binary-plugin") + alias(libs.plugins.thecodinglove.node.binary) } kotlin { sourceSets { val commonMain by getting { dependencies { - implementation(Deps.Common.analytics) - implementation(Deps.Common.kotlin) - implementation(Deps.Common.firebase) - implementation(Deps.Common.monitoring) - implementation(Deps.Common.network) - implementation(Deps.Common.pubsub) + implementation(libs.common.analytics) + implementation(libs.common.kotlin) + implementation(libs.common.firebase) + implementation(libs.common.monitoring) + implementation(libs.common.network) + implementation(libs.common.pubsub) implementation(projects.domain) implementation(projects.adapter) } diff --git a/search/settings.gradle.kts b/search/settings.gradle.kts index 86039beb..5d7e817d 100644 --- a/search/settings.gradle.kts +++ b/search/settings.gradle.kts @@ -8,13 +8,16 @@ plugins { id("com.gradle.develocity") version("3.18.1") } -rootProject.name = "search" - -includeBuild("../common") -include("adapter") -include("domain") -include("service") -include("test-fixtures") +dependencyResolutionManagement { + repositories { + gradlePluginPortal() + } + versionCatalogs { + create("libs") { + from(files("../gradle/libs.versions.toml")) + } + } +} develocity { buildScan { @@ -22,4 +25,12 @@ develocity { termsOfUseAgree.set("yes") publishing.onlyIf { true } } -} \ No newline at end of file +} + +rootProject.name = "search" + +includeBuild("../common") +include("adapter") +include("domain") +include("service") +include("test-fixtures") \ No newline at end of file diff --git a/search/test-fixtures/build.gradle.kts b/search/test-fixtures/build.gradle.kts index f485153d..7823411e 100644 --- a/search/test-fixtures/build.gradle.kts +++ b/search/test-fixtures/build.gradle.kts @@ -1,16 +1,14 @@ -import com.gchristov.thecodinglove.gradleplugins.Deps - plugins { - id("node-module-plugin") + alias(libs.plugins.thecodinglove.node.module) } kotlin { sourceSets { val commonMain by getting { dependencies { - implementation(Deps.Common.kotlin) - implementation(Deps.Common.test) - implementation(Deps.Common.network) + implementation(libs.common.kotlin) + implementation(libs.common.test) + implementation(libs.common.network) implementation(projects.adapter) implementation(projects.domain) } diff --git a/self-destruct/adapter/build.gradle.kts b/self-destruct/adapter/build.gradle.kts index 7e476fda..04490854 100644 --- a/self-destruct/adapter/build.gradle.kts +++ b/self-destruct/adapter/build.gradle.kts @@ -1,15 +1,13 @@ -import com.gchristov.thecodinglove.gradleplugins.Deps - plugins { - id("node-module-plugin") + alias(libs.plugins.thecodinglove.node.module) } kotlin { sourceSets { val commonMain by getting { dependencies { - implementation(Deps.Common.kotlin) - implementation(Deps.Common.network) + implementation(libs.common.kotlin) + implementation(libs.common.network) implementation(projects.domain) } } diff --git a/self-destruct/build.gradle.kts b/self-destruct/build.gradle.kts index db4f750a..1bff563c 100644 --- a/self-destruct/build.gradle.kts +++ b/self-destruct/build.gradle.kts @@ -1,9 +1,3 @@ -allprojects { - repositories { - mavenCentral() - } -} - val taskNames = listOf("clean", "assemble", "jsTest", "kotlinUpgradeYarnLock") taskNames.forEach { taskName -> tasks.register("${taskName}All") { diff --git a/self-destruct/domain/build.gradle.kts b/self-destruct/domain/build.gradle.kts index 4d0f1242..cab7503d 100644 --- a/self-destruct/domain/build.gradle.kts +++ b/self-destruct/domain/build.gradle.kts @@ -1,14 +1,12 @@ -import com.gchristov.thecodinglove.gradleplugins.Deps - plugins { - id("node-module-plugin") + alias(libs.plugins.thecodinglove.node.module) } kotlin { sourceSets { val commonMain by getting { dependencies { - implementation(Deps.Common.kotlin) + implementation(libs.common.kotlin) } } } diff --git a/self-destruct/service/build.gradle.kts b/self-destruct/service/build.gradle.kts index 61a82b5b..0c65d714 100644 --- a/self-destruct/service/build.gradle.kts +++ b/self-destruct/service/build.gradle.kts @@ -1,16 +1,14 @@ -import com.gchristov.thecodinglove.gradleplugins.Deps - plugins { - id("node-binary-plugin") + alias(libs.plugins.thecodinglove.node.binary) } kotlin { sourceSets { val commonMain by getting { dependencies { - implementation(Deps.Common.kotlin) - implementation(Deps.Common.monitoring) - implementation(Deps.Common.network) + implementation(libs.common.kotlin) + implementation(libs.common.monitoring) + implementation(libs.common.network) implementation(projects.adapter) implementation(projects.domain) } diff --git a/self-destruct/settings.gradle.kts b/self-destruct/settings.gradle.kts index 46d9bf43..a220f943 100644 --- a/self-destruct/settings.gradle.kts +++ b/self-destruct/settings.gradle.kts @@ -8,12 +8,16 @@ plugins { id("com.gradle.develocity") version("3.18.1") } -rootProject.name = "self-destruct" - -includeBuild("../common") -include("adapter") -include("domain") -include("service") +dependencyResolutionManagement { + repositories { + gradlePluginPortal() + } + versionCatalogs { + create("libs") { + from(files("../gradle/libs.versions.toml")) + } + } +} develocity { buildScan { @@ -21,4 +25,11 @@ develocity { termsOfUseAgree.set("yes") publishing.onlyIf { true } } -} \ No newline at end of file +} + +rootProject.name = "self-destruct" + +includeBuild("../common") +include("adapter") +include("domain") +include("service") \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index c564dc5c..dda49009 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,8 +1,18 @@ +enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") + plugins { // Allows publishing build scans when common tasks run from the project root, eg jsTest id("com.gradle.develocity") version("3.18.1") } +develocity { + buildScan { + termsOfUseUrl.set("https://gradle.com/help/legal-terms-of-use") + termsOfUseAgree.set("yes") + publishing.onlyIf { true } + } +} + rootProject.name = "thecodinglove-kotlinjs" // Add or remove projects here from the common build. Alternatively, each project can be opened in isolation. @@ -14,12 +24,4 @@ includeBuild("search") includeBuild("self-destruct") includeBuild("slack") includeBuild("slack-web") -includeBuild("statistics") - -develocity { - buildScan { - termsOfUseUrl.set("https://gradle.com/help/legal-terms-of-use") - termsOfUseAgree.set("yes") - publishing.onlyIf { true } - } -} \ No newline at end of file +includeBuild("statistics") \ No newline at end of file diff --git a/slack-web/adapter/build.gradle.kts b/slack-web/adapter/build.gradle.kts index 9bdba208..e9c8b169 100644 --- a/slack-web/adapter/build.gradle.kts +++ b/slack-web/adapter/build.gradle.kts @@ -1,18 +1,14 @@ -import com.gchristov.thecodinglove.gradleplugins.Deps -import com.gchristov.thecodinglove.gradleplugins.Deps.Common.kotlin -import com.gchristov.thecodinglove.gradleplugins.envSecret - plugins { - id("node-module-plugin") + alias(libs.plugins.thecodinglove.node.module) } kotlin { sourceSets { val commonMain by getting { dependencies { - implementation(Deps.Common.analytics) - implementation(Deps.Common.kotlin) - implementation(Deps.Common.network) + implementation(libs.common.analytics) + implementation(libs.common.kotlin) + implementation(libs.common.network) implementation(projects.domain) } } diff --git a/slack-web/build.gradle.kts b/slack-web/build.gradle.kts index db4f750a..1bff563c 100644 --- a/slack-web/build.gradle.kts +++ b/slack-web/build.gradle.kts @@ -1,9 +1,3 @@ -allprojects { - repositories { - mavenCentral() - } -} - val taskNames = listOf("clean", "assemble", "jsTest", "kotlinUpgradeYarnLock") taskNames.forEach { taskName -> tasks.register("${taskName}All") { diff --git a/slack-web/domain/build.gradle.kts b/slack-web/domain/build.gradle.kts index c35d1c66..c1828e6b 100644 --- a/slack-web/domain/build.gradle.kts +++ b/slack-web/domain/build.gradle.kts @@ -1,18 +1,17 @@ -import com.gchristov.thecodinglove.gradleplugins.Deps import com.gchristov.thecodinglove.gradleplugins.envSecret val packageId = "com.gchristov.thecodinglove.slackweb.domain" plugins { - id("node-module-plugin") - id("build-config-plugin") + alias(libs.plugins.thecodinglove.node.module) + alias(libs.plugins.thecodinglove.build.config) } kotlin { sourceSets { val commonMain by getting { dependencies { - implementation(Deps.Common.kotlin) + implementation(libs.common.kotlin) } } } diff --git a/slack-web/service/build.gradle.kts b/slack-web/service/build.gradle.kts index 206755dc..df5a70e9 100644 --- a/slack-web/service/build.gradle.kts +++ b/slack-web/service/build.gradle.kts @@ -1,17 +1,15 @@ -import com.gchristov.thecodinglove.gradleplugins.Deps - plugins { - id("node-binary-plugin") + alias(libs.plugins.thecodinglove.node.binary) } kotlin { sourceSets { val commonMain by getting { dependencies { - implementation(Deps.Common.analytics) - implementation(Deps.Common.kotlin) - implementation(Deps.Common.network) - implementation(Deps.Common.monitoring) + implementation(libs.common.analytics) + implementation(libs.common.kotlin) + implementation(libs.common.network) + implementation(libs.common.monitoring) implementation(projects.domain) implementation(projects.adapter) } diff --git a/slack-web/settings.gradle.kts b/slack-web/settings.gradle.kts index 2f593513..a6adeb9f 100644 --- a/slack-web/settings.gradle.kts +++ b/slack-web/settings.gradle.kts @@ -8,12 +8,16 @@ plugins { id("com.gradle.develocity") version("3.18.1") } -rootProject.name = "slack-web" - -includeBuild("../common") -include("adapter") -include("domain") -include("service") +dependencyResolutionManagement { + repositories { + gradlePluginPortal() + } + versionCatalogs { + create("libs") { + from(files("../gradle/libs.versions.toml")) + } + } +} develocity { buildScan { @@ -21,4 +25,11 @@ develocity { termsOfUseAgree.set("yes") publishing.onlyIf { true } } -} \ No newline at end of file +} + +rootProject.name = "slack-web" + +includeBuild("../common") +include("adapter") +include("domain") +include("service") \ No newline at end of file diff --git a/slack/adapter/build.gradle.kts b/slack/adapter/build.gradle.kts index 337587ae..d0e33269 100644 --- a/slack/adapter/build.gradle.kts +++ b/slack/adapter/build.gradle.kts @@ -1,19 +1,16 @@ -import com.gchristov.thecodinglove.gradleplugins.Deps -import com.gchristov.thecodinglove.gradleplugins.envSecret - plugins { - id("node-module-plugin") + alias(libs.plugins.thecodinglove.node.module) } kotlin { sourceSets { val commonMain by getting { dependencies { - implementation(Deps.Common.analytics) - implementation(Deps.Common.kotlin) - implementation(Deps.Common.network) - implementation(Deps.Common.pubsub) - implementation(Deps.Common.firebase) + implementation(libs.common.analytics) + implementation(libs.common.kotlin) + implementation(libs.common.network) + implementation(libs.common.pubsub) + implementation(libs.common.firebase) implementation(projects.domain) } } diff --git a/slack/build.gradle.kts b/slack/build.gradle.kts index db4f750a..1bff563c 100644 --- a/slack/build.gradle.kts +++ b/slack/build.gradle.kts @@ -1,9 +1,3 @@ -allprojects { - repositories { - mavenCentral() - } -} - val taskNames = listOf("clean", "assemble", "jsTest", "kotlinUpgradeYarnLock") taskNames.forEach { taskName -> tasks.register("${taskName}All") { diff --git a/slack/domain/build.gradle.kts b/slack/domain/build.gradle.kts index e01f5673..c8f08c04 100644 --- a/slack/domain/build.gradle.kts +++ b/slack/domain/build.gradle.kts @@ -1,23 +1,22 @@ -import com.gchristov.thecodinglove.gradleplugins.Deps import com.gchristov.thecodinglove.gradleplugins.envSecret val packageId = "com.gchristov.thecodinglove.slack.domain" plugins { - id("node-module-plugin") - id("build-config-plugin") + alias(libs.plugins.thecodinglove.node.module) + alias(libs.plugins.thecodinglove.build.config) } kotlin { sourceSets { val commonMain by getting { dependencies { - implementation(Deps.Common.kotlin) + implementation(libs.common.kotlin) } } val commonTest by getting { dependencies { - implementation(Deps.Common.test) + implementation(libs.common.test) } } } diff --git a/slack/kotlin-js-store/yarn.lock b/slack/kotlin-js-store/yarn.lock index f4bed32f..9b1b19f4 100644 --- a/slack/kotlin-js-store/yarn.lock +++ b/slack/kotlin-js-store/yarn.lock @@ -78,7 +78,7 @@ dependencies: tslib "^2.1.0" -"@google-cloud/firestore@^6.8.0": +"@google-cloud/firestore@6.8.0", "@google-cloud/firestore@^6.8.0": version "6.8.0" resolved "https://registry.yarnpkg.com/@google-cloud/firestore/-/firestore-6.8.0.tgz#d8c852844c381afaf62592796606c10e178400b5" integrity sha512-JRpk06SmZXLGz0pNx1x7yU3YhkUXheKgH5hbDZ4kMsdhtfV5qPLJLRI4wv69K0cZorIk+zTMOwptue7hizo0eA== diff --git a/slack/service/build.gradle.kts b/slack/service/build.gradle.kts index ed875403..add350aa 100644 --- a/slack/service/build.gradle.kts +++ b/slack/service/build.gradle.kts @@ -1,19 +1,17 @@ -import com.gchristov.thecodinglove.gradleplugins.Deps - plugins { - id("node-binary-plugin") + alias(libs.plugins.thecodinglove.node.binary) } kotlin { sourceSets { val commonMain by getting { dependencies { - implementation(Deps.Common.analytics) - implementation(Deps.Common.kotlin) - implementation(Deps.Common.monitoring) - implementation(Deps.Common.network) - implementation(Deps.Common.pubsub) - implementation(Deps.Common.firebase) + implementation(libs.common.analytics) + implementation(libs.common.kotlin) + implementation(libs.common.monitoring) + implementation(libs.common.network) + implementation(libs.common.pubsub) + implementation(libs.common.firebase) implementation(projects.domain) implementation(projects.adapter) } diff --git a/slack/settings.gradle.kts b/slack/settings.gradle.kts index 0de2aa1d..ac6171f2 100644 --- a/slack/settings.gradle.kts +++ b/slack/settings.gradle.kts @@ -8,12 +8,16 @@ plugins { id("com.gradle.develocity") version("3.18.1") } -rootProject.name = "slack" - -includeBuild("../common") -include("adapter") -include("domain") -include("service") +dependencyResolutionManagement { + repositories { + gradlePluginPortal() + } + versionCatalogs { + create("libs") { + from(files("../gradle/libs.versions.toml")) + } + } +} develocity { buildScan { @@ -21,4 +25,11 @@ develocity { termsOfUseAgree.set("yes") publishing.onlyIf { true } } -} \ No newline at end of file +} + +rootProject.name = "slack" + +includeBuild("../common") +include("adapter") +include("domain") +include("service") \ No newline at end of file diff --git a/statistics/adapter/build.gradle.kts b/statistics/adapter/build.gradle.kts index 7e476fda..04490854 100644 --- a/statistics/adapter/build.gradle.kts +++ b/statistics/adapter/build.gradle.kts @@ -1,15 +1,13 @@ -import com.gchristov.thecodinglove.gradleplugins.Deps - plugins { - id("node-module-plugin") + alias(libs.plugins.thecodinglove.node.module) } kotlin { sourceSets { val commonMain by getting { dependencies { - implementation(Deps.Common.kotlin) - implementation(Deps.Common.network) + implementation(libs.common.kotlin) + implementation(libs.common.network) implementation(projects.domain) } } diff --git a/statistics/build.gradle.kts b/statistics/build.gradle.kts index db4f750a..1bff563c 100644 --- a/statistics/build.gradle.kts +++ b/statistics/build.gradle.kts @@ -1,9 +1,3 @@ -allprojects { - repositories { - mavenCentral() - } -} - val taskNames = listOf("clean", "assemble", "jsTest", "kotlinUpgradeYarnLock") taskNames.forEach { taskName -> tasks.register("${taskName}All") { diff --git a/statistics/domain/build.gradle.kts b/statistics/domain/build.gradle.kts index 4d0f1242..cab7503d 100644 --- a/statistics/domain/build.gradle.kts +++ b/statistics/domain/build.gradle.kts @@ -1,14 +1,12 @@ -import com.gchristov.thecodinglove.gradleplugins.Deps - plugins { - id("node-module-plugin") + alias(libs.plugins.thecodinglove.node.module) } kotlin { sourceSets { val commonMain by getting { dependencies { - implementation(Deps.Common.kotlin) + implementation(libs.common.kotlin) } } } diff --git a/statistics/service/build.gradle.kts b/statistics/service/build.gradle.kts index a2c484be..ad00a6c1 100644 --- a/statistics/service/build.gradle.kts +++ b/statistics/service/build.gradle.kts @@ -1,16 +1,14 @@ -import com.gchristov.thecodinglove.gradleplugins.Deps - plugins { - id("node-binary-plugin") + alias(libs.plugins.thecodinglove.node.binary) } kotlin { sourceSets { val commonMain by getting { dependencies { - implementation(Deps.Common.kotlin) - implementation(Deps.Common.monitoring) - implementation(Deps.Common.network) + implementation(libs.common.kotlin) + implementation(libs.common.monitoring) + implementation(libs.common.network) implementation(projects.domain) implementation(projects.adapter) } diff --git a/statistics/settings.gradle.kts b/statistics/settings.gradle.kts index 72f78bb4..ba05e0a4 100644 --- a/statistics/settings.gradle.kts +++ b/statistics/settings.gradle.kts @@ -8,12 +8,16 @@ plugins { id("com.gradle.develocity") version("3.18.1") } -rootProject.name = "statistics" - -includeBuild("../common") -include("adapter") -include("domain") -include("service") +dependencyResolutionManagement { + repositories { + gradlePluginPortal() + } + versionCatalogs { + create("libs") { + from(files("../gradle/libs.versions.toml")) + } + } +} develocity { buildScan { @@ -21,4 +25,11 @@ develocity { termsOfUseAgree.set("yes") publishing.onlyIf { true } } -} \ No newline at end of file +} + +rootProject.name = "statistics" + +includeBuild("../common") +include("adapter") +include("domain") +include("service") \ No newline at end of file diff --git a/tools/scripts/run_local.sh b/tools/scripts/run_local.sh index a2840578..52a35995 100644 --- a/tools/scripts/run_local.sh +++ b/tools/scripts/run_local.sh @@ -5,7 +5,7 @@ set -e # folder. A single Gradle worker avoids this at the cost of a slower build but this is okay for now. echo "๐Ÿ›  Build project" && ./gradlew --max-workers=1 assemble echo "๐Ÿงน Clean up old Docker resources" && (docker image prune -af) -echo "๐Ÿ Start local tunnel" && (ssh -tt -R codinglove.serveo.net:80:localhost:8080 serveo.net &) +echo "๐Ÿ Start local tunnel" && (ssh -R 80:localhost:8080 localhost.run &) sleep 1 echo "๐Ÿ Start app" && echo "" && docker compose \ -f tools/docker/landing-page-web-compose.yaml \