Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/publish-snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:

- name: Publish snapshot
if: success()
run: ./gradlew setSnapshotVersion publishToSonatype closeAndReleaseSonatypeStagingRepository
run: ./gradlew -Psnapshot publishToSonatype closeAndReleaseSonatypeStagingRepository
2 changes: 1 addition & 1 deletion build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ repositories {
}

dependencies {
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.0")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:2.1.0")
implementation("org.jetbrains.dokka:dokka-gradle-plugin:1.9.20")
}
16 changes: 7 additions & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ if (publishPropertiesFile.exists()) {
}
group = "io.github.whathecode.kotlinx.interval"
version = "2.0.0"
if (properties.containsKey("snapshot"))
{
val versionSplit = version.toString().split("-")
val snapshotVersion = "${versionSplit[0]}-SNAPSHOT"
version = snapshotVersion
rootProject.subprojects.forEach { it.version = snapshotVersion }
}
nexusPublishing {
repositories {
sonatype {
Expand All @@ -32,12 +39,3 @@ nexusPublishing {
}
}
}
val setSnapshotVersion: Task by tasks.creating {
doFirst {
val versionSplit = version.toString().split("-")
val snapshotVersion = "${versionSplit[0]}-SNAPSHOT"
version = snapshotVersion

rootProject.subprojects.forEach { it.version = snapshotVersion }
}
}
Loading
Loading