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

Update build config, migrate away from deprecated Kotlin Multiplatform Gradle plugins #854

Closed
aSemy opened this issue Jul 21, 2022 · 2 comments
Labels

Comments

@aSemy
Copy link
Contributor

aSemy commented Jul 21, 2022

When building the project locally I see an warning in the logs

The 'org.jetbrains.kotlin.platform.*' plugins are deprecated and will no longer be available in Kotlin 1.4.
Please migrate the project to the 'org.jetbrains.kotlin.multiplatform' plugin.
See: https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html

problems running tests

I also experience problems when running the project locally, like not being able to run the tests of an individual subproject.

> ./gradlew :mock-common:test

image

And in IntelliJ if I try and run a test from a gutter icon I get an error

Execution failed for task ':mockk-common:test'.
> No tests found for given includes: [io.mockk.it.ValueClassTest](--tests filter)

I can also see that the build logic of the project is a bit scattered. There's some scripts in ./gradle/, and some project-local plugins in ./plugins/. Some of the Gradle scripts are in Groovy, but most are in Kotlin. It would be nicer if they were all Kotlin.

Proposal

Here's what I suggest:

  • Combine MockK subprojects into Kotlin Multiplatform projects
    • mockk
    • mockk-dsl
    • mockk-agent
  • Create buildSrc convention plugins for
    • Kotlin JVM/JS/Multiplatform
    • Publishing to Maven
    • common build scripts (./gradle/jacoco.gradle, ./gradle/upload.gradle etc)

This could be done incrementally, or in one big-bang. There wouldn't be any change to the source code - although it would be moved.

I am not an Android developer, so I don't know how the Android subprojects should be managed. Can they be combined with the Kotlin Multiplatform subprojects? Or maybe there should be a mockk-android subproject?

See also

These issues have a lot of interest. This ticket would provide a good basis for them.

Raibaz added a commit that referenced this issue Aug 12, 2022
#854 update projects to use new Kotlin Multiplatform Gradle plugin
@stale
Copy link

stale bot commented Nov 2, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If you are sure that this issue is important and should not be marked as stale just ask to put an important label.

@stale stale bot added the stale label Nov 2, 2022
@aSemy
Copy link
Contributor Author

aSemy commented Dec 5, 2022

This was completed in #855

@aSemy aSemy closed this as completed Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant