-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated README.md for Diktat 2.0 (#1839)
- updated section about CLI - updated sections for plugins
- Loading branch information
Showing
6 changed files
with
64 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,5 @@ | ||
## Building | ||
Build of gradle plugin is performed by gradle, but is wrapped in maven build. The module's `pom.xml` isn't exactly accurate | ||
and doesn't include gradle-specific dependencies, that are automatically provided by gradle when applying the plugin. | ||
## Local testing | ||
|
||
To avoid versions duplication, diktat and ktlint versions are passed to gradle via properties when running gradle task from maven. | ||
These versions are then written in a file and then included in the plugin jar to determine dependencies for JavaExec. | ||
|
||
Gradle plugin marker pom, which is normally produced by `java-gradle-plugin` plugin during gradle build, | ||
is added manually as a maven module. | ||
|
||
Please be advised that to run functional tests of Gradle plugin you will need to have Java 11 or **older**. | ||
This does not affect the plugin itself and only affect functional tests : | ||
``` | ||
Starting Build | ||
java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7 | ||
``` | ||
You can build and publish to maven local by using `gradlew :diktat-gradle-plugin:publishToMavenLocal`. | ||
Then you can use a built version in projects in examples. | ||
A calculated version will be printed in logs by `reckon` plugin. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
## Building | ||
To build and test the plugin, use regular maven commands. | ||
## Local testing | ||
|
||
To generate plugin descriptor using data from KDocs, we use [kotlin-maven-plugin-tools](https://github.com/gantsign/kotlin-maven-plugin-tools). | ||
This plugin is only available in github packages, which require authentication via `settings.xml`. However, | ||
this plugin is activated only in release profile (`-Prelease`) and package repository doesn't require any authentication for local development. | ||
If you need to run it locally, see [release.yml](../.github/workflows/release.yml) as an example of adding an entry to `settings.xml` `servers` section. | ||
You can build and publish to maven local by using `:diktat-api:publishToMavenLocal :diktat-rules:publishToMavenLocal :diktat-runner:publishToMavenLocal :diktat-common:publishToMavenLocal :diktat-ktlint-engine:publishToMavenLocal :diktat-maven-plugin:publishToMavenLocal`. | ||
Then you can use a built version in projects in examples. | ||
A calculated version will be printed in logs by `reckon` plugin. |