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

Fix build script to avoid jvm plugin applied #3389

Merged
merged 1 commit into from
Jan 19, 2021

Conversation

chao2zhang
Copy link
Member

This addresses #3345.

Why moving the script back to root build.gradle? (Partially reverting #2621)

According to Gradle official doc, buildSrc is being imported as included build. buildSrc is useful for pinning versions for common dependencies, or defining tasks or plugins that are shareable across multiple projects.

Although common.gradle.kts has kotlin("jvm") apply false, when root build.gradle applies the plugin common from buildSrc, koltin("jvm") is still applied. This behavior caused the issue in #3345 that Kotlin/JVM gradle plugin is applied to the root project.

Test

Before: https://scans.gradle.com/s/vetym5o5m7fj6 577 tasks
After: https://gradle.com/s/5w5rmu7is7vyk 572 tasks

Out of scope

This PR only solves a limited problem for Kotlin/JVM gradle plugin being applied to the root build.gradle. There are still other scripts like packaging, releasing, and detekt in the buildSrc. There are still top-level tasks registered, like :jar, :detekt etc.

@codecov
Copy link

codecov bot commented Jan 19, 2021

Codecov Report

Merging #3389 (7443ffd) into master (a7efff2) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #3389   +/-   ##
=========================================
  Coverage     80.46%   80.46%           
  Complexity     2739     2739           
=========================================
  Files           448      448           
  Lines          8282     8282           
  Branches       1573     1573           
=========================================
  Hits           6664     6664           
  Misses          771      771           
  Partials        847      847           

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 a7efff2...7443ffd. Read the comment docs.

@schalkms schalkms merged commit 44ad8d9 into detekt:master Jan 19, 2021
@chao2zhang chao2zhang deleted the rootproject branch January 19, 2021 21:33
@cortinico cortinico added the housekeeping Marker for housekeeping tasks and refactorings label Feb 19, 2021
@cortinico cortinico added this to the 1.16.0 milestone Feb 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
housekeeping Marker for housekeeping tasks and refactorings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants