Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

diktat-gradle-plugin #514

Merged
merged 24 commits into from
Nov 16, 2020
Merged

diktat-gradle-plugin #514

merged 24 commits into from
Nov 16, 2020

Conversation

petertrr
Copy link
Member

@petertrr petertrr commented Nov 11, 2020

What's done:

  • Added gradle plugin sources
  • Added gradle plugin to maven build

This pull request closes #259

  • This should work on gradle 6.4+, because in this version they have introduces mainClass property for JavaExec instead of soon to be deprecated main. Added version check and usage of main for older gradle versions, tested it on gradle 5.0.

Fixme

  • Need to investigate further if all artifacts will be correctly deployed by maven release
  • Test in gradle groovy script and in both plugins and buildscript syntax
  • Test on different gradle versions (6.0 or even older)
  • Update usage instructions in README.md
  • Until gradle 6.8 (probably) embedded kotlin is 1.3 and we can't use kx.serialization. Until then plugin is basically a wrapper around JavaExec.

### What's done:
* Added gradle plugin sources
* Added gradle plugin to maven build
### What's done:
* Added readme for gradle plugin
* Disable gradle invocation on windows
### What's done:
* Update build.gradle.kts
@codecov
Copy link

codecov bot commented Nov 11, 2020

Codecov Report

Merging #514 (c9334f6) into master (00ec217) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #514   +/-   ##
=========================================
  Coverage     81.79%   81.79%           
  Complexity     1596     1596           
=========================================
  Files            76       76           
  Lines          4026     4026           
  Branches       1278     1278           
=========================================
  Hits           3293     3293           
  Misses          215      215           
  Partials        518      518           
Flag Coverage Δ Complexity Δ
unittests 81.79% <ø> (ø) 0.00 <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 00ec217...c20b917. Read the comment docs.

### What's done:
* Added instructions to README.md
* Moved tasks to separate class
* Fixed detekt check
### What's done:
* Generate sources in gradle
* Updated README.md
### What's done:
* Fix detekt run on gradle plugin marker
@petertrr petertrr marked this pull request as ready for review November 13, 2020 07:43
### What's done:
* Support for gradle <6.4
* Refactoring
### What's done:
* Detekt code style
### What's done:
* Diktat code style
### What's done:
* Disable version check to use JavaExec on gradle 6.8+ for now
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
// configuration to provide JavaExec with correct classpath
val diktatConfiguration = project.configurations.create(DIKTAT_CONFIGURATION) { configuration ->
configuration.isVisible = false
configuration.dependencies.add(project.dependencies.create("org.jetbrains.kotlin:kotlin-stdlib:1.4.10"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there any way not to hardcode dependencies?

Copy link
Member Author

@petertrr petertrr Nov 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added passing versions via properties from maven and a little of codegen to use them in plugin: 300fa1d

README.md Outdated Show resolved Hide resolved
Copy link
Member

@orchestr7 orchestr7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@petertrr petertrr merged commit e83f1e4 into master Nov 16, 2020
@petertrr petertrr deleted the feature/diktat-gradle-plugin#259 branch November 16, 2020 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gradle plugin: diktat should have it's own gradle plugin
2 participants