Upgrade ktlint-maven-plugin to 3.0.0 (bumps ktlint from 0.39.0 to 1.0.0 #98
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As a follow up of #96 , here we apply the changes correctly to master (missed it due to PR / rebase hell).
Feature
Improved ktlint handling:
verify
phase (instead of compile)check
mvn ktlint:format@ktlint-format
-Dquality.skip
Bonus
Added 3 local build improvement flags (besides
quality.skip
):<gpg.skip>true</gpg.skip>
- by default don't try to gpg sign the created jar in the verify step. Also, this doesn't work for everybody because gpg needs to be set up. Not needed for local development.<dokka.skip>true</dokka.skip>
- by default, don't create a javaDocJar. This is only needed when doing a release (and maybe during CI, just for regression sake.<kotlin.compiler.incremental>true</kotlin.compiler.incremental>
- don't compile stuff again, if you already have the results. The incremental compiler of kotlin allows you to run multiplemvn compile
(or later phases likepackage
orinstall
) and reuse the classes in the target folder. This can speed up local builds with 20-30% easily.I ran a benchmark for the dokka plugin with
mvnd
:mvnd clean install -Dmvnd.buildTime -Dsmartbuilder.profiling=true -Ddokka.skip=false
, and surprise, this save about 60% compiler time (this is cumulative time spent per module, executions may have been done in parallel).