Skip to content

Commit 8aacb86

Browse files
committed
Update build logic in preparation for release
1 parent fd2ba1a commit 8aacb86

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: publish-candidate
3838
if: contains(github.ref, '-rc.')
3939
timeout-minutes: 30
40-
run: ./gradlew ${GRADLE_SWITCHES} -Prelease.disableGitChecks=true -Prelease.useLastTag=true candidate publish closeAndReleaseSonatypeStagingRepository -x test
40+
run: ./gradlew ${GRADLE_SWITCHES} -Preleasing -Prelease.disableGitChecks=true -Prelease.useLastTag=true candidate publish closeAndReleaseSonatypeStagingRepository
4141
env:
4242
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }}
4343
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_TOKEN }}
@@ -47,7 +47,7 @@ jobs:
4747
- name: publish-release
4848
if: (!contains(github.ref, '-rc.'))
4949
timeout-minutes: 30
50-
run: ./gradlew ${GRADLE_SWITCHES} -Prelease.disableGitChecks=true -Prelease.useLastTag=true final publish closeAndReleaseSonatypeStagingRepository -x test
50+
run: ./gradlew ${GRADLE_SWITCHES} -Preleasing -Prelease.disableGitChecks=true -Prelease.useLastTag=true final publish closeAndReleaseSonatypeStagingRepository
5151
env:
5252
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }}
5353
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_TOKEN }}

build.gradle.kts

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ plugins {
1616
`maven-publish`
1717
signing
1818

19-
id("org.jetbrains.kotlin.jvm") version "1.5.0"
19+
id("org.jetbrains.kotlin.jvm") version "latest.release"
2020
id("nebula.maven-resolved-dependencies") version "17.3.2"
2121
id("nebula.release") version "15.3.1"
2222
id("io.github.gradle-nexus.publish-plugin") version "1.0.0"
@@ -32,7 +32,7 @@ plugins {
3232
id("nebula.source-jar") version "17.3.2"
3333
id("nebula.maven-apache-license") version "17.3.2"
3434

35-
id("org.openrewrite.rewrite") version "5.0.0"
35+
id("org.openrewrite.rewrite") version "latest.release"
3636
}
3737

3838
apply(plugin = "nebula.publish-verification")
@@ -49,9 +49,11 @@ group = "org.openrewrite.recipe"
4949
description = "Eliminate legacy Spring patterns and migrate between major Spring Boot versions. Automatically."
5050

5151
repositories {
52-
mavenLocal()
53-
maven {
54-
url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
52+
if(!project.hasProperty("releasing")) {
53+
mavenLocal()
54+
maven {
55+
url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
56+
}
5557
}
5658
mavenCentral()
5759
}
@@ -79,8 +81,11 @@ configurations.all {
7981
}
8082
}
8183

82-
val rewriteVersion = "latest.integration"
83-
val testingFrameworksVersion = "latest.integration"
84+
var rewriteVersion = if(project.hasProperty("releasing")) {
85+
"latest.release"
86+
} else {
87+
"latest.integration"
88+
}
8489
dependencies {
8590
compileOnly("org.projectlombok:lombok:latest.release")
8691
annotationProcessor("org.projectlombok:lombok:latest.release")
@@ -98,7 +103,7 @@ dependencies {
98103
// see https://github.com/gradle/kotlin-dsl-samples/issues/1301 for why (okhttp is leaking parts of kotlin stdlib)
99104
compileOnly("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
100105

101-
runtimeOnly("org.openrewrite.recipe:rewrite-testing-frameworks:${testingFrameworksVersion}")
106+
runtimeOnly("org.openrewrite.recipe:rewrite-testing-frameworks:${rewriteVersion}")
102107

103108
testImplementation("org.jetbrains.kotlin:kotlin-reflect")
104109
testImplementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")

0 commit comments

Comments
 (0)