Skip to content

Conversation

@WhosNickDoglio
Copy link
Contributor

@WhosNickDoglio WhosNickDoglio commented Jan 3, 2026

Replaces #68. Now that the compiler plugin stuff is merged this is now unblocked.

More KMP targets were initially blocked by #86 but now that Mockingbird is a compiler plugin it should be able to support all KMP targets 🎉

Some noteworthy changes/implications:

  • Supporting no-jvm platforms removes access to Java based reflection in commonMain. I created a jvmMain directory which still uses Java reflection to avoid breaking any usages when upgrading.
  • Adding all the Apple targets (iOS/tvOS/watchOS) required Xcode to be installed on my computer and some simulators to be installed to actually be able to run all the tests. This was kinda annoying so worth mentioning.

@WhosNickDoglio WhosNickDoglio force-pushed the feature/ndoglio/kmp-part2 branch from 342db2e to 9a2a5dd Compare January 6, 2026 12:05
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Some of the WASM/JS stuff setup some repositories behind the scenes which is not compatible with this setting.

package com.anthonycr.mockingbird.core

import org.junit.Test
import kotlin.test.Test
Copy link
Contributor Author

Choose a reason for hiding this comment

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

No junit now in commonTest

class FakesKtTest {

@Test
fun `inline fake throws exception when there is no gradle plugin applied`() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is due to an issue with backticks in method names and Kotlin/JS. It should be fixed though and once we bump the language level above 2.1 we can revert this change.

@WhosNickDoglio WhosNickDoglio changed the title WIP Adding more KMP targets Adding more KMP targets Jan 6, 2026
@WhosNickDoglio WhosNickDoglio force-pushed the feature/ndoglio/kmp-part2 branch from 9a2a5dd to 6944f92 Compare January 6, 2026 12:15
@WhosNickDoglio WhosNickDoglio marked this pull request as ready for review January 6, 2026 12:17
@WhosNickDoglio WhosNickDoglio force-pushed the feature/ndoglio/kmp-part2 branch 2 times, most recently from 5997766 to 7b76239 Compare January 6, 2026 12:28
@WhosNickDoglio WhosNickDoglio force-pushed the feature/ndoglio/kmp-part2 branch from 7b76239 to 38c1cd6 Compare January 8, 2026 04:57
@anthonycr
Copy link
Owner

will get to this tomorrow, didn't have time to get xcode set up yet

@anthonycr
Copy link
Owner

finally got xcode setup and installed, looks great! merging.

@anthonycr anthonycr merged commit 745f158 into anthonycr:main Jan 10, 2026
1 check passed
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