|
| 1 | +## Contributing |
| 2 | + |
| 3 | +We would absolutely love to get the community involved, and we welcome any form of contributions – comments and questions on different communication channels, issues and pull request and anything that you build and share using our components. |
| 4 | + |
| 5 | +### Communication channels |
| 6 | +* Communication is primarily done using issues. |
| 7 | +* If you need support as soon as possible and you can't wait for any pull request, feel free to use [our support](https://xdev.software/en/services/support). |
| 8 | +* As a last resort measure or on otherwise important matter you may also [contact us directly](https://xdev.software/en/about-us/contact). |
| 9 | + |
| 10 | +### Ways to help |
| 11 | +* **Report bugs**<br/>Create an issue or send a pull request |
| 12 | +* **Send pull requests**<br/>If you want to contribute code, check out the development instructions below. |
| 13 | + * However when contributing new features, please first discuss the change you wish to make via issue with the owners of this repository before making a change. Otherwise your work might be rejected and your effort was pointless. |
| 14 | + |
| 15 | +We also encourage you to read the [contribution instructions by GitHub](https://docs.github.com/en/get-started/quickstart/contributing-to-projects). |
| 16 | + |
| 17 | +## Developing |
| 18 | + |
| 19 | +### Software Requirements |
| 20 | +You should have the following things installed: |
| 21 | +* Git |
| 22 | +* Java 17 - should be as unmodified as possible (Recommended: [Eclipse Adoptium](https://adoptium.net/temurin/releases/)) |
| 23 | +* Gradle (shipped inside the repo as Gradle Wrapper - also available inside IntelliJ) |
| 24 | + |
| 25 | +### Recommended setup |
| 26 | +* Install ``IntelliJ`` (Community Edition is sufficient) |
| 27 | + * Install the following plugins: |
| 28 | + * [Save Actions](https://plugins.jetbrains.com/plugin/22113) - Provides save actions, like running the formatter or adding ``final`` to fields |
| 29 | + * [SonarLint](https://plugins.jetbrains.com/plugin/7973-sonarlint) - CodeStyle/CodeAnalysis |
| 30 | + * [Checkstyle-IDEA](https://plugins.jetbrains.com/plugin/1065-checkstyle-idea) - CodeStyle/CodeAnalysis |
| 31 | + * [Plugin DevKit](https://plugins.jetbrains.com/plugin/22851) - IntelliJ Plugin development |
| 32 | + * Import the project |
| 33 | + * Ensure that everything is encoded in ``UTF-8`` |
| 34 | + * Ensure that the JDK/Java-Version is correct |
| 35 | + |
| 36 | +## Development environment |
| 37 | + |
| 38 | +<i>See also [JetBrains Docs for developing IntelliJ Plugins](https://plugins.jetbrains.com/docs/intellij/developing-plugins.html)</i> |
| 39 | + |
| 40 | +The plugin is built with gradle, but you don't need to install it if you build with the Intellij gradle plugin (check out the [prerequisites](https://plugins.jetbrains.com/docs/intellij/plugin-required-experience.html)). If you don't intend to use the Intellij gradle plugin, you can use native gradle (replace `./gradlew` by `gradle`). |
| 41 | + |
| 42 | +Start idea and import the `build.gradle` file with "File > Open". Then in the "Import Project from Gradle" window, make sure you check "Use gradle 'wrapper' task configuration" before clicking "Finish". You now have a gradle wrapper installed (`gradlew`) that you can use on the command line to generate idea folders: |
| 43 | + |
| 44 | +```bash |
| 45 | +# Initialize idea folders |
| 46 | +./gradlew cleanIdea idea |
| 47 | +``` |
| 48 | + |
| 49 | +IntelliJ should refresh and the project is now configured as a gradle project. You can find IntelliJ gradle tasks in "Gradle > Gradle projects > intellij-plugin-template > Tasks > intellij". To run the plugin, use the `runIde` task: |
| 50 | + |
| 51 | +```bash |
| 52 | +# Run the plugin (starts new idea) |
| 53 | +./gradlew runIde |
| 54 | +``` |
| 55 | + |
| 56 | +## Releasing [](https://github.com/xdev-software/intellij-plugin-template/actions/workflows/release.yml) |
| 57 | + |
| 58 | +Before releasing: |
| 59 | +* Consider doing a [test-deployment](https://github.com/xdev-software/intellij-plugin-template/actions/workflows/test-deploy.yml?query=branch%3Adevelop) before actually releasing. |
| 60 | +* Check the [changelog](CHANGELOG.md) |
| 61 | + |
| 62 | +If the ``develop`` is ready for release, create a pull request to the ``master``-Branch and merge the changes |
| 63 | + |
| 64 | +When the release is finished do the following: |
| 65 | +* Merge the auto-generated PR (with the incremented version number) back into the ``develop`` |
| 66 | + |
0 commit comments