Skip to content

Commit

Permalink
Update build logic in preparation for release
Browse files Browse the repository at this point in the history
  • Loading branch information
sambsnyd committed Jun 11, 2021
1 parent fd2ba1a commit 8aacb86
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: publish-candidate
if: contains(github.ref, '-rc.')
timeout-minutes: 30
run: ./gradlew ${GRADLE_SWITCHES} -Prelease.disableGitChecks=true -Prelease.useLastTag=true candidate publish closeAndReleaseSonatypeStagingRepository -x test
run: ./gradlew ${GRADLE_SWITCHES} -Preleasing -Prelease.disableGitChecks=true -Prelease.useLastTag=true candidate publish closeAndReleaseSonatypeStagingRepository
env:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_TOKEN }}
Expand All @@ -47,7 +47,7 @@ jobs:
- name: publish-release
if: (!contains(github.ref, '-rc.'))
timeout-minutes: 30
run: ./gradlew ${GRADLE_SWITCHES} -Prelease.disableGitChecks=true -Prelease.useLastTag=true final publish closeAndReleaseSonatypeStagingRepository -x test
run: ./gradlew ${GRADLE_SWITCHES} -Preleasing -Prelease.disableGitChecks=true -Prelease.useLastTag=true final publish closeAndReleaseSonatypeStagingRepository
env:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_TOKEN }}
Expand Down
21 changes: 13 additions & 8 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ plugins {
`maven-publish`
signing

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

id("org.openrewrite.rewrite") version "5.0.0"
id("org.openrewrite.rewrite") version "latest.release"
}

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

repositories {
mavenLocal()
maven {
url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
if(!project.hasProperty("releasing")) {
mavenLocal()
maven {
url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
}
}
mavenCentral()
}
Expand Down Expand Up @@ -79,8 +81,11 @@ configurations.all {
}
}

val rewriteVersion = "latest.integration"
val testingFrameworksVersion = "latest.integration"
var rewriteVersion = if(project.hasProperty("releasing")) {
"latest.release"
} else {
"latest.integration"
}
dependencies {
compileOnly("org.projectlombok:lombok:latest.release")
annotationProcessor("org.projectlombok:lombok:latest.release")
Expand All @@ -98,7 +103,7 @@ dependencies {
// see https://github.com/gradle/kotlin-dsl-samples/issues/1301 for why (okhttp is leaking parts of kotlin stdlib)
compileOnly("org.jetbrains.kotlin:kotlin-stdlib-jdk8")

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

testImplementation("org.jetbrains.kotlin:kotlin-reflect")
testImplementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
Expand Down

0 comments on commit 8aacb86

Please sign in to comment.