FAQ section

pull/69/head
Jakub Chrzanowski 3 years ago committed by GitHub
parent dade55502a
commit 829f85ae53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -34,8 +34,10 @@ In this README, we will highlight the following elements of template-project cre
- [Changelog maintenance](#changelog-maintenance) with the Gradle Changelog Plugin
- [Release flow](#release-flow) using GitHub Releases
- [Publishing the plugin](#publishing-the-plugin) with the Gradle IntelliJ Plugin
- [FAQ](#faq)
- [Useful links](#useful-links)
## Getting started
Before we dive into plugin development and everything related to it, it's worth mentioning the benefits of using GitHub Templates. By creating a new project using the current template, you start with no history and no reference to this repository. This allows you to create a new repository easily without having to copy and paste previous content, clone repositories, or clear the history manually.
@ -50,6 +52,7 @@ For the last step, you have to manually review the configuration variables descr
> **TIP:** To use Java in your plugin, create the `/src/main/java` directory.
## Gradle configuration
The recommended method for plugin development involves using the [Gradle][gradle] setup with the [gradle-intellij-plugin][gh:gradle-intellij-plugin] installed. The gradle-intellij-plugin makes it possible to run the IDE with your plugin and publish your plugin to the Marketplace Repository.
@ -93,6 +96,7 @@ kotlin.stdlib.default.dependency = false
For more details, please see: [Dependency on the standard library][kotlin-docs-dependency-on-stdlib] in Kotlin documentation.
## Plugin template structure
A generated IntelliJ Platform Plugin Template repository contains the following content structure:
@ -121,6 +125,7 @@ In addition to the configuration files, the most crucial part is the `src` direc
> **TIP:** To use Java in your plugin, create the `/src/main/java` directory.
## Plugin configuration file
The plugin configuration file is a [plugin.xml][file:plugin.xml] file located in the `src/main/resources/META-INF` directory. It provides general information about the plugin, its dependencies, extensions, and listeners.
@ -144,6 +149,7 @@ The plugin configuration file is a [plugin.xml][file:plugin.xml] file located in
You can read more about this file in the [Plugin Configuration File][docs:plugin.xml] section of our documentation.
## Sample code
The prepared template provides as little code as possible because it is impossible for a general scaffold to fulfill all the specific requirements for all types of plugins (language support, build tools, VCS related tools). The template contains only the following files:
@ -164,6 +170,7 @@ To start with the actual implementation, you may check our [IntelliJ Platform SD
For those, who value example codes the most, there are also available [IntelliJ SDK Code Samples][gh:code-samples] and [IntelliJ Platform Explorer][jb:ipe] a search tool for browsing Extension Points inside existing implementations of open-source IntelliJ Platform plugins.
## Predefined Run/Debug configurations
Within the default project structure, there is a `.run` directory provided containing three predefined *Run/Debug configurations* that expose corresponding Gradle tasks:
@ -176,6 +183,7 @@ Within the default project structure, there is a `.run` directory provided conta
| Run Tests | Runs [`:check`][gradle-lifecycle-tasks] Gradle task that invokes `:test` and `detekt`/`ktlint` code inspections. |
| Run Verifications | Runs [`:runPluginVerifier`][gh:gradle-intellij-plugin-verifier-dsl] Gradle IntelliJ Plugin task to check the plugin compatibility against the specified IntelliJ IDEs. |
## Continuous integration
Continuous integration depends on [GitHub Actions][gh:actions], a set of workflows that make it possible to automate your testing and release process. Thanks to such automation, you can delegate the testing and verification phases to the CI and instead focus on development (and writing more tests).
@ -238,6 +246,29 @@ You can get that token in the [My Tokens][jb:my-tokens] tab within your Marketpl
> to specify options like the license, repository URL, etc. Please follow
> the [Publishing a Plugin][docs:publishing] instructions.
## FAQ
### How to use Java in my project?
Java language is supported by default along with Kotlin.
Initially, there's `/src/main/kotlin` directory available with some minimal examples.
You can still replace it or add next to it the `/src/main/java` to start working with Java language instead.
### How to disable tests or build job using the `[skip ci]` commit message?
You can disable specific tests using the [`if`][github-actions-if] condition, like:
```yaml
jobs:
test:
name: Test
if: "!contains(github.event.head_commit.message, 'skip ci')
steps:
...
```
## Useful links
- [IntelliJ Platform SDK DevGuide][docs]
@ -290,6 +321,7 @@ You can get that token in the [My Tokens][jb:my-tokens] tab within your Marketpl
[keep-a-changelog]: https://keepachangelog.com
[detekt]: https://detekt.github.io/detekt
[github-actions-if]: https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#example-expression-in-an-if-conditional
[gradle]: https://gradle.org
[gradle-kotlin-dsl]: https://docs.gradle.org/current/userguide/kotlin_dsl.html
[gradle-lifecycle-tasks]: https://docs.gradle.org/current/userguide/java_plugin.html#lifecycle_tasks

Loading…
Cancel
Save