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

Move tests to included build to separate classpaths #502

Merged
merged 1 commit into from
Dec 3, 2023

Conversation

TWiStErRob
Copy link
Contributor

Thank you for submitting a pull request! But first:

Fixes:

> Configure project :tests
project ':tests' uses Kotlin 1.9.20

The Kotlin Gradle plugin was loaded multiple times in different subprojects, which is not supported and may break the build.
This might happen in subprojects that apply the Kotlin plugins with the Gradle 'plugins { ... }' DSL if they specify explicit versions, even if the versions are equal.
Please add the Kotlin plugin to the common parent project or the root project, then remove the versions in the subprojects.
If the parent project does not need the plugin, add 'apply false' to the plugin line.
See: https://docs.gradle.org/current/userguide/plugins.html#sec:subprojects_plugins_dsl
The Kotlin plugin was loaded in the following projects: ':mockito-kotlin', ':tests'

The solution requires some explanation while refactoring from the old one.
I'll comment on each change to clarify what it does and why it's needed.
This is the Gradle-idiomatic way of sharing code between two "independent" projects.

Copy link
Contributor Author

@TWiStErRob TWiStErRob left a comment

Choose a reason for hiding this comment

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

I numbered the comments, if you read in order it might make more sense, but no guarantees 😅

tests/settings.gradle Show resolved Hide resolved
settings.gradle Show resolved Hide resolved
build.gradle Show resolved Hide resolved
build.gradle Show resolved Hide resolved
build.gradle Outdated Show resolved Hide resolved
tests/settings.gradle Show resolved Hide resolved
tests/build.gradle Show resolved Hide resolved
tests/build.gradle Show resolved Hide resolved
mockito-kotlin/build.gradle Show resolved Hide resolved
build.gradle Show resolved Hide resolved
@TWiStErRob
Copy link
Contributor Author

Weird error, will rebase and try to fix.

build.gradle Show resolved Hide resolved
@TWiStErRob
Copy link
Contributor Author

@TimvdLippe This is ready on my side

@TimvdLippe TimvdLippe merged commit 4f09043 into mockito:main Dec 3, 2023
4 checks passed
@TimvdLippe
Copy link
Contributor

Thanks for all the fixes!

@TWiStErRob TWiStErRob deleted the include branch December 3, 2023 09:50
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.

2 participants