hi, I faced an interesting Kotlin/JS + Gradle-rela...
# javascript
p
hi, I faced an interesting Kotlin/JS + Gradle-related problem. When using Kotlin/JS with centralized repositories declaration (
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
), NodeJS and Yarn cannot be downloaded because the custom Ivy repos added by the Kotlin/JS plugin here and here are ignored. I had to add them explicitly here as a workaround: https://github.com/typesafegithub/github-workflows-kt/blob/e469fdd7b9f09f276124d3b499cbd2a933547e8b/buildSrc/repositories.settings.gradle.kts#L[…]30 is it a known problem? CC @Adam S
a
thank you color 1
p
any idea how could it be gracefully handled? my take is that the Kotlin plugin should somehow provide a list of extra repositories that it needs, so that one can define them in the central place
a
yes, that would be my preference. There should be a plugin for
settings.gradle(.kts)
files that you can apply, and it would provide helper functions for adding the repositories. I started making one, but I didn’t release it…
👍 1
p
ideally it should be a companion plugin for the
kotlin("js")
one, but a third-party one as a PoC would be a nice step forward!
a
this the example usage, showing how to add all the repos. If anyone would like to help out, I can share the code and we can publish it.
👍 1
and yeah, it would be best if it was folded into the JetBrains plugins
p
I suggest throwing this idea into the comments under the issue you shared, along with the source code
i
Please file an issue - https://kotl.in/issue
p
@Ivan Kubyshkin [JetBrains] it’s already tracked as https://youtrack.jetbrains.com/issue/KT-51379 right?
i
Oh, sorry, I missed it.
👌 1