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 CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ The plugins can be released using the following command (from the main branch of

# Optional command: ./gradlew clean

./gradlew --info publishToCentral -Drelease=true
./gradlew -Prelease=true release

The command will both publish the plugin to the Gradle Plugin Portal and to Maven Central.

Expand Down
6 changes: 5 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ tasks.withType<Wrapper>().configureEach {

tasks.getByName("afterReleaseBuild") {
dependsOn(
":common:publish", ":analyzer:publish", ":manipulation:publish", ":cli:publish",
":analyzer:publishPlugins", ":manipulation:publishPlugins", ":publishToCentral"
)
}
Expand Down Expand Up @@ -624,12 +625,15 @@ fun loadSettings(extension: MavenSettingsPluginExtension, repository: String) {
}


val isReleaseBuild = ("true" == System.getProperty("release", ""))
val isReleaseBuild = ("true" == gradle.startParameter.projectProperties.getOrDefault("release", ""))
if (isReleaseBuild && org.gradle.util.GradleVersion.current().version != "${project.extra.get("gradleReleaseVersion")}") {
throw GradleException("Gradle ${project.extra.get("gradleReleaseVersion")} is required to release this project")
} else if (isReleaseBuild) {
logger.lifecycle ("Running as release build")
}
if (System.getProperty("release") != null) {
throw GradleException("Pass release=true as a -P parameter")
}

if (org.gradle.util.GradleVersion.current() >= org.gradle.util.GradleVersion.version("8.3") &&
org.gradle.util.GradleVersion.current() < org.gradle.util.GradleVersion.version("9.0.0")) {
Expand Down
Loading