Gradle dependencies formatter for IntelliJ IDEA
IntelliJ IDEA plugin for formatting Gradle dependencies.
Install using the JetBrains Plugin Repository:
File
> Settings
> Plugins
> Browse repositories...
> type gradle dependencies formatter
in search form > Install plugin
Use Show Intention Actions
action (Alt + Enter
or ⌥⏎) and choose Convert to map notation
or Convert to string notation
.
In order to sort dependencies open a .gradle
file and use Sort Gradle dependencies
action from Code
menu.
Features:
groupId
(required), artifactId
(required), version
, classifier
, optional
and exclusions
fieldscompile
, provided
, runtime
, test
If you need to paste XML with maven dependency into gradle file without modification, please use Paste Simple
action.
Note: In version 2016.3 IntelliJ IDEA added a similar feature. It converts a single maven dependency at once and handles only simple cases. This plugin overrides this built-in feature.
Build:
./gradlew build
In order to run tests with specific IntelliJ IDEA version (e.g. 2016.3) use this command:
./gradlew -P ideaVersion=2016.3 test
Run IntelliJ IDEA with the plugin intalled in:
./gradlew runIde
This project uses gradle-intellij-plugin. Please refer to its documentation for information about a configuration.
Note: Currently the project is not prepared to be imported as a IntelliJ Platform Plugin.
StringNotationToMapNotationIntention
#76
MapNotationToStringNotationIntention#getElementPredicate
MavenToGradleDependenciesCopyPasteProcessor
before built-in CopyPasteProcessor
sclassifier
and optional
This project is licensed under the MIT license.