Skip to content

Commit

Permalink
fixing issues with updated tagger
Browse files Browse the repository at this point in the history
  • Loading branch information
robertfmurdock committed Jul 13, 2023
1 parent 85a92bf commit 0198c3a
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 13 deletions.
10 changes: 8 additions & 2 deletions client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import com.fasterxml.jackson.databind.ObjectMapper
import com.zegreatrob.coupling.plugins.NodeExec
import com.zegreatrob.coupling.plugins.setup
import com.zegreatrob.tools.TaggerPlugin
import com.zegreatrob.tools.tagger.ReleaseVersion
import com.zegreatrob.tools.tagger.TaggerExtension
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpack
import org.jetbrains.kotlin.gradle.targets.js.yarn.yarn
Expand Down Expand Up @@ -119,7 +121,7 @@ dependencies {
jsTestImplementation("org.jetbrains.kotlin:kotlin-test-js")
}

val taggerExtension = TaggerExtension.apply(rootProject)
rootProject.apply<TaggerPlugin>()

val nodeEnv = System.getenv("COUPLING_NODE_ENV") ?: "production"

Expand Down Expand Up @@ -182,7 +184,11 @@ tasks {
val absolutePath = browserProductionWebpack.get().outputDirectory.get().asFile.absolutePath
commandLine = "aws s3 sync $absolutePath s3://assets.zegreatrob.com/coupling/${rootProject.version}".split(" ")
}
taggerExtension.releaseProvider.configure {
rootProject
.tasks
.withType(ReleaseVersion::class.java)
.named("release")
.configure {
finalizedBy(uploadToS3)
}

Expand Down
4 changes: 2 additions & 2 deletions coupling-plugins/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ org-jlleitschuh-gradle-ktlint = "11.0.0"
com-fasterxml-jackson-core-jackson-databind = "com.fasterxml.jackson.core:jackson-databind:2.15.2"
com-github-ben-manes-gradle-versions-plugin = "com.github.ben-manes:gradle-versions-plugin:0.47.0"
com-soywiz-korlibs-klock = "com.soywiz.korlibs.klock:klock:4.0.8"
com-zegreatrob-jsmints-jsmints-bom = "com.zegreatrob.jsmints:jsmints-bom:4.3.10"
com-zegreatrob-jsmints-jsmints-bom = "com.zegreatrob.jsmints:jsmints-bom:4.3.13"
com-zegreatrob-testmints-testmints-bom = "com.zegreatrob.testmints:testmints-bom:10.0.10"
com-zegreatrob-tools-tools-bom = "com.zegreatrob.tools:tools-bom:0.3.4"
com-zegreatrob-tools-tools-bom = "com.zegreatrob.tools:tools-bom:0.5.4"
org-ajoberstar-grgit-gradle-plugin = "org.ajoberstar.grgit:org.ajoberstar.grgit.gradle.plugin:5.0.0"
org-apache-logging-log4j-log4j-core = { module = "org.apache.logging.log4j:log4j-core", version.ref = "org-apache-logging-log4j" }
org-apache-logging-log4j-log4j-iostreams = { module = "org.apache.logging.log4j:log4j-iostreams", version.ref = "org-apache-logging-log4j" }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.zegreatrob.coupling.plugins

import com.zegreatrob.tools.tagger.ReleaseVersion
import com.zegreatrob.tools.tagger.TaggerExtension

plugins {
Expand All @@ -15,7 +16,7 @@ kotlin {

val serverProject: Project = project.project(":server")

val taggerExtension = TaggerExtension.apply(rootProject)
val taggerExtension: TaggerExtension = rootProject.extensions.getByType(TaggerExtension::class.java)

val deployDir = buildDir.resolve("deploy")

Expand All @@ -40,9 +41,12 @@ tasks {
mustRunAfter(":server:check")
mustRunAfter(":e2e:check")
}
taggerExtension.releaseProvider.configure {
finalizedBy(deploy)
}
rootProject
.tasks
.withType(ReleaseVersion::class.java)
.named("release").configure {
finalizedBy(deploy)
}
}

fun NodeExec.configureDeploy(stage: String) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.zegreatrob.coupling.plugins

import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
import com.zegreatrob.tools.TaggerPlugin
import com.zegreatrob.tools.tagger.TaggerExtension
import com.zegreatrob.tools.tagger.ReleaseVersion

plugins {
base
Expand All @@ -11,10 +11,11 @@ plugins {

rootProject.apply<TaggerPlugin>()

val taggerExtension = rootProject.extensions.getByType(TaggerExtension::class.java)

tasks {
taggerExtension.releaseProvider.configure {
rootProject
.tasks
.withType(ReleaseVersion::class.java)
.named("release").configure {
dependsOn(check)
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ com-zegreatrob-jsmints-jsmints-bom = "com.zegreatrob.jsmints:jsmints-bom:4.3.13"
com-zegreatrob-testmints-testmints-bom = "com.zegreatrob.testmints:testmints-bom:10.0.15"
io-github-microutils-kotlin-logging = "io.github.microutils:kotlin-logging:3.0.5"
io-ktor-ktor-bom = "io.ktor:ktor-bom:2.3.2"
org-jetbrains-kotlin-wrappers-kotlin-wrappers-bom = "org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom:1.0.0-pre.595"
org-jetbrains-kotlin-wrappers-kotlin-wrappers-bom = "org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom:1.0.0-pre.596"
org-jetbrains-kotlinx-kotlinx-coroutines-bom = "org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.7.2"
org-jetbrains-kotlinx-kotlinx-datetime = "org.jetbrains.kotlinx:kotlinx-datetime:0.4.0"
org-jetbrains-kotlinx-kotlinx-serialization-bom = "org.jetbrains.kotlinx:kotlinx-serialization-bom:1.5.1"
Expand Down

0 comments on commit 0198c3a

Please sign in to comment.