-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Move to Gradle conventions plugins #3464
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
Conversation
d0243bc
to
3009e45
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3464 +/- ##
============================================
+ Coverage 85.74% 85.77% +0.02%
- Complexity 2951 2953 +2
============================================
Files 341 341
Lines 8946 8946
Branches 1114 1114
============================================
+ Hits 7671 7673 +2
Misses 988 988
+ Partials 287 285 -2 ☔ View full report in Codecov by Sentry. |
3528e52
to
e54583d
Compare
buildSrc/src/main/kotlin/mockito.java-library-conventions.gradle.kts
Outdated
Show resolved
Hide resolved
buildSrc/src/main/kotlin/mockito.publication-conventions.gradle.kts
Outdated
Show resolved
Hide resolved
buildSrc/src/main/kotlin/mockito.publication-conventions.gradle.kts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all the work and fixing the commit messages as well, much appreciated!
Ah, I merged some plugin updates and didn't realize that would cause merge conflicts again :( |
13f9cd0
to
2926146
Compare
…droid-tests Fixes #3446
2926146
to
4888857
Compare
This PR port most of the existing sparse Groovy DSL scripts as convention plugins, this is done to switch from decade old accumulation of scripting from the early days of Gradle to best practice of today. Fortunately our script were well split.
For the full motivation see #3446
At this stage, this PR port is almost a 1 to 1, i.e. it doesn't aim at introducing or changing the build behavior. It is not complete, the coverage, shipkit, spotless, licenses still remain to be converted.
tl;dr: what this PR does is changing
apply from: ....gradle
to a convention pluginplugins { id("mockito....-conventions") }
. THese plugin are added in the standardbuildSrc
Create the
buildSrc
project for the conventions pluginsJava lib config
java-library.gradle
-->mockito.library-conventions.gradle.kts
, which applies other convention plugins belowjava-library.gradle
-->mockito.java-library-conventions.gradle.kts
, also sets up Java related configurations found in the rootbuild.gradle
, and appliesmockito.java-conventions
osgi.gradle
-->mockito.osgi-conventions.gradle.kts
, this only applies the plugin as config differ between mockito-core and mockito-junit-jupiter.java-publication.gradle
-->mockito.publication-conventions.gradle.kts
checkstyle.gradle
-->mockito.checkstyle-conventions.gradle.kts
errorprone.gradle
merged inmockito.java-library-conventions.gradle.kts
animalSniffer config in
mockito-core/build.gradle
andmockito-junit-jupiter/build.gradle
--> extracted tomockito.java-backward-compatibility-checks-conventions.gradle.kts
Tests
java-test.gradle
-->mockito.test-conventions.gradle.kts
(which appliesmockito.test-jfr-profiler-conventions
,mockito.java-conventions
)jfr.gradle
-->mockito.test-jfr-profiler-conventions.gradle.kts
test-launcher.gradle
-->mockito.test-launcher-conventions.gradle.kts
retry-test.gradle
-->mockito.test-retry-conventions.gradle.kts
Javadoc
mockito-core/javadoc.gradle
andmockito-junit-jupiter/javadoc.gradle
-->mockito.javadoc-conventions.gradle.kts
mockito-core/src/main/javadoc
->config/javadoc/resources
, because it's shared with junit jupiter extension.Now Mockito Libraries (core and extensions) declare this
And integration tests have this
Android test project also applies our convention.
Two approaches for the review
Checklist
including project members to get a better picture of the change
commit is meaningful and help the people that will explore a change in 2 years
Fixes #<issue number>
in the description if relevantFixes #<issue number>
if relevant