-
Notifications
You must be signed in to change notification settings - Fork 49
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
Improvement: IntelliJ plugin with configurable implementation #18
Conversation
...le-palantir-java-format/src/main/groovy/com/palantir/javaformat/gradle/JavaFormatPlugin.java
Outdated
Show resolved
Hide resolved
...le-palantir-java-format/src/main/groovy/com/palantir/javaformat/gradle/JavaFormatPlugin.java
Outdated
Show resolved
Hide resolved
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.
small nits then should be good to go! super excited about this :)
version = "191.5849.21" | ||
pluginName = "palantir-java-format" | ||
updateSinceUntilBuild = true | ||
version = "191.5849.21" |
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.
do we want to set this to 2019.1 or 2019.2 so we're testing against latest?
idea-plugin/build.gradle
Outdated
version = project.version | ||
sinceBuild = '173' | ||
untilBuild = '' | ||
pluginDescription = "Formats source code using the palantir-java-format tool. This version of " + |
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.
Description is a little lame now that the version can be configured
idea-plugin/build.gradle
Outdated
} | ||
|
||
publishPlugin { | ||
token = project.ext.properties.jetbrainsPluginRepoToken | ||
token = project.ext.properties.jetbrainsPluginRepoToken |
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.
do we need this? do we plan on publishing to intellij?
@@ -102,5 +128,17 @@ public String getEnabled() { | |||
return null; | |||
} | |||
} | |||
|
|||
@Override | |||
public String toString() { |
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.
we should update or remove this
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.
small nits then should be good to go! super excited about this :)
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.
small nits then should be good to go! super excited about this :)
@dansanduleac and I have been pairing to try and make the |
Before this PR
The idea-plugin just bundles the current version of the formatter.
However, the plugin version is global to an IntelliJ installation, so all projects would be forced to use that version of the formatter. This is bad because IntelliJ formatting could get out of sync with
./gradlew format
After this PR
==COMMIT_MSG==
IntelliJ plugin can be automatically configured with a custom version of the formatter, by applying
com.palantir.java-format
in gradle and setting thepalantirJavaFormat.implementationVersion
.==COMMIT_MSG==
In order to achieve this, we've separated palantir-java-format-api out of the formatter. This is a super thin API layer, and the implementation is found by service loading it out of the implementation jar.
Possible downsides?