Repository navigation
Review do PR upstream #1521 #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -18,9 +18,9 @@ import org.jetbrains.intellij.platform.gradle.TestFrameworkType | |||||
|
|
||||||
| // https://github.com/JetBrains/intellij-platform-gradle-plugin/releases | ||||||
| plugins { | ||||||
| id("org.jetbrains.intellij.platform") version "2.20.0" | ||||||
| id("org.jetbrains.intellij.platform") version "2.18.1" | ||||||
| // See https://plugins.jetbrains.com/docs/intellij/using-kotlin.html#bundled-stdlib-versions | ||||||
| kotlin("jvm") version "2.4.21" | ||||||
| kotlin("jvm") version "2.4.10" | ||||||
| } | ||||||
|
|
||||||
| repositories { | ||||||
|
|
@@ -31,7 +31,7 @@ repositories { | |||||
|
|
||||||
| // https://github.com/google/google-java-format/releases | ||||||
| val googleJavaFormatVersion = "2.0.0" | ||||||
| val pluginPatchVersion = "1" | ||||||
| val pluginPatchVersion = "0" | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use a patch version that is not already published.
Suggested fix
Committable suggestion
|
||||||
|
|
||||||
| java { | ||||||
| toolchain { languageVersion = JavaLanguageVersion.of(21) } | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -72,21 +72,11 @@ boolean isUninitialized() { | |
| } | ||
|
|
||
| JavaFormatterOptions.Style getStyle() { | ||
| UiFormatterStyle style = state.style != null ? state.style : UiFormatterStyle.GOOGLE; | ||
| return style.convert().toBuilder().maxLineLength(state.maxLineLength).build(); | ||
| return state.style; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Preserve the default style when the loaded style is null. If Return
|
||
| } | ||
|
|
||
| void setStyle(JavaFormatterOptions.Style style) { | ||
| state.style = UiFormatterStyle.convert(style); | ||
| state.maxLineLength = style.maxLineLength(); | ||
| } | ||
|
|
||
| int getMaxLineLength() { | ||
| return state.maxLineLength; | ||
| } | ||
|
|
||
| void setMaxLineLength(int maxLineLength) { | ||
| state.maxLineLength = maxLineLength; | ||
| state.style = style; | ||
| } | ||
|
|
||
| enum EnabledState { | ||
|
|
@@ -98,8 +88,7 @@ enum EnabledState { | |
| static class State { | ||
|
|
||
| private EnabledState enabled = EnabledState.UNKNOWN; | ||
| public UiFormatterStyle style = UiFormatterStyle.GOOGLE; | ||
| public int maxLineLength = JavaFormatterOptions.Style.GOOGLE.maxLineLength(); | ||
| public JavaFormatterOptions.Style style = JavaFormatterOptions.Style.GOOGLE; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update the settings tests for the new state representation.
Update the style assignments and assertions. Remove or replace the maximum-line-length tests. Otherwise, plugin test compilation fails.
|
||
|
|
||
| // enabled used to be a boolean so we use bean property methods for backwards compatibility | ||
| public void setEnabled(@Nullable String enabledStr) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Serialize release runs before the shared staging cleanup.
The workflow declares no
concurrencygroup. Twoworkflow_dispatchruns can therefore overlap. The cleanup step deletes every package in the sharedgoogle-java-fmt--mavencentralrepository, so a later run can delete packages that an earlier run has already staged. The run-specific manifest name does not limit the cleanup to one run's packages.Add a workflow-level concurrency group that does not cancel runs in progress:
Suggested fix
permissions: {} + +concurrency: + group: google-java-format-release + cancel-in-progress: false