Skip to content

Commit fc36396

Browse files
committed
chore: semversion mapping
1 parent bcc2ca2 commit fc36396

File tree

6 files changed

+47
-17
lines changed

6 files changed

+47
-17
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,15 @@ sandbox [gradle.properties](/sandbox/gradle.properties).
3838
### Publishing
3939

4040
Push a new tag to trigger the release workflow and publish the plugin
41-
to [maven central](https://repo1.maven.org/maven2/dev/suresh/build/). That's it!
41+
to [maven central](https://repo1.maven.org/maven2/dev/suresh/build/). That's it 🎉.
42+
The next version will be based on the semantic version scope (`major`, `minor`, `patch`)
4243

4344
```bash
44-
$ git tag -am "v1.0.0 release" v1.0.0
45+
$ ./gradlew createSemverTag "-Psemver.scope=patch"
4546
$ git push origin main --follow-tags
47+
48+
# OR in one step
49+
$ ./gradlew pushSemverTag "-Psemver.scope=patch"
4650
```
4751

4852
### Published Plugins

gradle.properties

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ kotlin.code.style=official
1515
kotlin.jvm.target.validation.mode=warning
1616

1717
# Project
18+
semver.tagPrefix=v
1819
semver.project.tagPrefix=v
1920
semver.checkClean=false
2021
semver.commitsMaxCount=100
21-
# semver.logOnlyOnRootProject=true
22+
semver.logOnlyOnRootProject=true
23+
# semver.stage=dev|alpha|beta|rc|snapshot|final|auto
24+
# semver.scope=auto|major|minor|patch
25+
# semver.remote=origin

gradle/build-logic/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ dependencies {
9191
implementation(libs.build.foojay.resolver)
9292
implementation(libs.build.jte.plugin)
9393
implementation(libs.ajalt.mordant.coroutines)
94-
// implementation(libs.build.tomlj)
94+
implementation(libs.build.tomlj)
9595

9696
// For using `kotlin-dsl` in pre-compiled script plugins
9797
implementation("${libs.build.kotlin.dsl.get().module}:${expectedKotlinDslPluginsVersion}")

gradle/build-logic/src/main/kotlin/settings.repo.settings.gradle.kts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
@file:Suppress("UnstableApiUsage")
22

3-
import org.gradle.kotlin.dsl.*
3+
import com.javiersc.semver.project.gradle.plugin.SemverExtension
44
import org.gradle.toolchains.foojay.FoojayToolchainResolver
5+
import org.tomlj.Toml
6+
7+
val versionCatalog by lazy {
8+
// A hack to read version catalog from settings
9+
Toml.parse(file("$rootDir/gradle/libs.versions.toml").readText()).getTable("versions")
10+
?: error("Unable to parse the version catalog!")
11+
}
512

613
pluginManagement {
714
repositories {
@@ -32,6 +39,18 @@ toolchainManagement {
3239
}
3340
}
3441

42+
gradle.beforeProject {
43+
pluginManager.withPlugin("com.javiersc.semver.project") {
44+
configure<SemverExtension> {
45+
// Change version to include kotlin version
46+
// val ktVersion = versionCatalog.getString("kotlin").orEmpty()
47+
// mapVersion {
48+
// it.copy(metadata = ktVersion).toString()
49+
// }
50+
}
51+
}
52+
}
53+
3554
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
3655

3756
enableFeaturePreview("STABLE_CONFIGURATION_CACHE")

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ cache4k = "0.11.0"
7272
intellij-coverage = "1.0.754"
7373
intellij-markdown = "0.7.3"
7474
jgit = "6.5.0.202303070854-r"
75-
jte = "3.1.12"
75+
jte = "3.1.13"
7676
jimfs = "1.3.0"
7777
sshj = "0.38.0"
7878
jsch = "0.2.20"

sandbox/gradle/libs.versions.toml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ kotlinx-metadata = "0.9.0"
3636
kotlinx-reflect-lite = "1.1.0"
3737
kotlinx-bcv = "0.16.3"
3838
kotlin-dokka = "2.0.0-Beta"
39-
kotlin-wrappers = "1.0.0-pre.815"
39+
kotlin-wrappers = "1.0.0-pre.816"
4040
kotlin-redacted = "1.11.0-alpha01"
4141
kotlinx-multik = "0.2.3"
4242
kotlinx-dataframe = "0.13.1"
@@ -45,11 +45,11 @@ evas = "1.0.0"
4545
kopy = "0.11.0+2.0.20"
4646
poko = "0.17.1"
4747
mappie = "0.8.0"
48-
akkurate = "0.9.0"
48+
akkurate = "0.10.0"
4949
konsist = "0.16.1"
5050
karakum = "1.0.0-alpha.40-K2"
5151
seskar = "3.42.0"
52-
spring-boot = "3.3.3"
52+
spring-boot = "3.3.4"
5353
spring-depmgmt = "1.1.6"
5454
ktor = "3.0.0-rc-2"
5555
ktor-cohort = "2.5.1"
@@ -65,23 +65,23 @@ ksp-auto-service = "1.2.0"
6565
gradle-kotlin-dsl = "4.3.1"
6666
zip-prefixer = "0.3.1"
6767
ajalt-mordant = "3.0.0"
68-
ajalt-clikt = "5.0.0"
68+
ajalt-clikt = "5.0.1"
6969
ajalt-colormath = "3.6.0"
7070
classgraph = "4.8.177"
7171
cache4k = "0.11.0"
7272
intellij-coverage = "1.0.754"
7373
intellij-markdown = "0.7.3"
7474
jgit = "6.5.0.202303070854-r"
75-
jte = "3.1.12"
75+
jte = "3.1.13"
7676
jimfs = "1.3.0"
7777
sshj = "0.38.0"
7878
jsch = "0.2.20"
79-
pty4j = "0.12.35"
79+
pty4j = "0.13.0"
8080
junit = "5.11.2"
8181
koin = "4.0.0"
8282
kotest = "6.0.0.M1"
8383
mockk = "1.13.12"
84-
mokkery = "2.3.0"
84+
mokkery = "2.4.0"
8585
wiremock = "3.9.1"
8686
wiremock-kotlin = "2.1.1"
8787
okhttp = "5.0.0-alpha.14"
@@ -92,7 +92,7 @@ log4j = "3.0.0-beta2"
9292
jmh = "1.37"
9393
mrjar = "0.1.1"
9494
ktfmt = "0.52"
95-
google-javaformat = "1.23.0"
95+
google-javaformat = "1.24.0"
9696
palantir-javaformat = "2.50.0"
9797
google-auto-service = "1.1.1"
9898
google-tink = "1.15.0"
@@ -146,8 +146,8 @@ reflect-typetools = "0.6.3"
146146
async-profiler = "3.0"
147147
ap-loader-all = "3.0-9"
148148
openjdk-jmc = "9.0.0"
149-
airlift-aircompressor = "0.27"
150-
airlift-security = "271"
149+
airlift-aircompressor = "2.0.2"
150+
airlift-security = "273"
151151
directory-keystore = "1.1.0"
152152
maven-mima = "3.0.0-alpha-3"
153153
maven-archeologist = "0.0.10"
@@ -160,7 +160,7 @@ okapibarcode = "0.4.1"
160160
chasm = "0.7.1"
161161
kfswatch = "1.3.0"
162162
langchain4j = "0.35.0"
163-
jlama = "0.3.1"
163+
jlama = "0.5.1"
164164
ldaptive = "2.3.2"
165165
chicory = "0.0.12"
166166

@@ -175,6 +175,7 @@ detekt-compose-rules = "0.4.12"
175175
compose-icons = "1.1.0"
176176
compose-routing = "0.4.0"
177177
kottie = "2.0.0"
178+
mosaic = "0.14.0"
178179

179180
# NPM Dependencies
180181
npm-highlightjs = "11.10.0"
@@ -353,6 +354,7 @@ ktor-server-websockets = { module = "io.ktor:ktor-server-websocket
353354
ktor-server-sse = { module = "io.ktor:ktor-server-sse" , version.ref = "ktor"}
354355
ktor-server-test-host = { module = "io.ktor:ktor-server-test-host" , version.ref = "ktor"}
355356
ktor-serialization-json = { module = "io.ktor:ktor-serialization-kotlinx-json" , version.ref = "ktor"}
357+
ktor-serialization-xml = { module = "io.ktor:ktor-serialization-kotlinx-xml" , version.ref = "ktor"}
356358

357359
ktor-client-core = { module = "io.ktor:ktor-client-core" , version.ref = "ktor"}
358360
ktor-client-cio = { module = "io.ktor:ktor-client-cio" , version.ref = "ktor"}
@@ -460,6 +462,7 @@ ajalt-colormath = { module = "com.github.ajalt.colormath:co
460462
ajalt-clikt-core = { module = "com.github.ajalt.clikt:clikt-core" , version.ref = "ajalt-clikt"}
461463
ajalt-clikt = { module = "com.github.ajalt.clikt:clikt" , version.ref = "ajalt-clikt"}
462464
ajalt-clikt-markdown = { module = "com.github.ajalt.clikt:clikt-markdown" , version.ref = "ajalt-clikt"}
465+
mosaic-runtime = { module = "com.jakewharton.mosaic:mosaic-runtime" , version.ref = "mosaic"}
463466
jgit = { module = "org.eclipse.jgit:org.eclipse.jgit" , version.ref = "jgit" }
464467
jte = { module = "gg.jte:jte" , version.ref = "jte" }
465468
jte-runtime = { module = "gg.jte:jte-runtime" , version.ref = "jte" }

0 commit comments

Comments
 (0)