-
Notifications
You must be signed in to change notification settings - Fork 36
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
0.4.3 breaks when used in standalone precompiled script plugin #499
Comments
Please include a stacktrace of the error |
Ah right. Here you go:
|
I'm going to close this as it looks like it's actually an issue with KGP upstream. Specifically this bit
If you're still having this issue, please file one upstream on the kotlin issue tracker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We have a precompiled script plugin that looks like this:
note that plugin only includes MoshiX, without Kotlin and KSP. That's because plugin is meant to be applied on top of existing project that already includes its flavor of Kotlin and KSP. We cannot include kotlin in this file, because this plugin is applied on both JVM and Android projects, so we cannot hardcode
kotlin("jvm")
orkotlin("android")
.This approach worked fine until
0.4.3
. In this new version, apparently Moshi will attempt to access kotlin extension earlier than before and thus just building gradle KTS accessors fails.Reproducer project: https://github.com/matejdro/issues/tree/moshi-buildSrc. To reproduce, just run
./gradlew assemble
. If you downgrade MoshiX version, build goes through.Maybe a workaround would be to check whether
target.name == "gradle-kotlin-dsl-accessors"
and not apply the kotlin plugin in this case (gradle only needs registered extensions for this operation)?The text was updated successfully, but these errors were encountered: