(not sure which channel, this one is the closest o...
# ktlint
p
(not sure which channel, this one is the closest one) I use https://github.com/jeremymailen/kotlinter-gradle/ Gradle plugin for ktlint and I’ve just realized it doesn’t add its task to my Kotlin/JS module, while my IDEA plugin does show some violations. Is it a known problem?
CC @mateusz.kwiecinski
are you open for contribution?
j
Yes, I believe it’s just a missing feature. If the Kotlin JS gradle plugin allows you to enumerate the sourceSets, it should be something we can add.
m
FYI: I took a stab at it in https://github.com/jeremymailen/kotlinter-gradle/pull/300 🙂 However, given I’m not familiar with kotlin-js setup, I was able to only follow simple setup from the official documentation. I hope it will work in all cases🤞
p
Cool, looks good! I can test it on my project if I knew how to test a Gradle plugin locally. Is it as simple as publishing to Maven local and telling Gradle to use the local repo?
m
Is it as simple as publishing to Maven local and telling Gradle to use the local repo?
Correct, you can run
./gradlew publishToMavenLocal
and point your project to fetch the version from
mavenLocal()
(you may also want to override plugin version before publishing) 🙂
p
FYI (you may want to incorporate it in your tests), my project config looks like this (
build.gradle.kts
):
Copy code
plugins {
    kotlin("js")
    id("org.jmailen.kotlinter") version "3.12.0"
}

...

kotlin.js {
    browser()
}
I think it’s more or less equivalent to what you’ve already got in
build.gradle
, but sending just FYI
thanks a lot. it was quick! 🙂 when do you plan to release? perhaps when ktlint 0.48 comes up?
hi @mateusz.kwiecinski @Jeremy Mailen, here’s a friendly ping about releasing the feature ☝️ 🙏 or giving some ETA
j
I see @mateusz.kwiecinski already put out a PR for releasing https://github.com/jeremymailen/kotlinter-gradle/pull/301 Let me check with him. Thanks for your patience, holiday season is crazy busy.
m
Yes, sorry. I was on a vacation, not having my PC anywhere near me 🙂 I’ll try to move things forward today or tomorrow, as soon as I catch up with all the things that happened recently 🙂
@Piotr Krzemiński I'm happy to announce the changes you requested are now available in 3.13.0 release 🙂