I’ve just published v0.4.0 of the Gradle plugin th...
# ktfmt
g
I’ve just published v0.4.0 of the Gradle plugin that contains the
kotlinLangStyle()
function: https://github.com/cortinico/ktfmt-gradle/releases/tag/0.4.0
❤️ 1
j
What are the differences about google style and default one?
g
The default one is passing
.FACEBOOK
as an enum inside the
FormattingOptions
. I’m unsure if ktfmt is actually using it or not 🤔
j
i think
new FormattingOptions()
is using it
At least that is the conclusion I got yesterday when I was trying to add to the IDE plugin the other styles
c
“Google” isn’t the guidelines that the Android developer site lists. I’ll rename it to “google internal” or something similar. “Default” is Facebook’s internal style, which resembles Java style for better interoperability.
j
@Carmi Grushko I am exposing the 4 styles in the IDEA plugin
Should I only allow default + Kotlinlang?
c
I started reviewing but didn’t finish. I think it’s best to expose all of them (maybe rename “google” to “google (internal)”. The google one might be used by google internally, and dropbox might be used by people and I don’t want to break them.
j
Okay, when you finish the review I will update it if you think it should be called "google (internal)". Personally, if you are going to maintain Google too, I would leave it there without internal, it is probably there are people outside Google which follow their guidelines
c
The guidelines are internal - people outside of Google wouldn't know about them. Maybe... Google (company)? imo "Google (internal)" describes it precisely.
j
Ah, I understand. Then I am going to change it.
I read a doc about java conventions inside Google so I thought it was public 🤔
c
Java yes. Kotlin no, afaik.
👍 1
g
On this topic: are there differences between this two? https://github.com/facebookincubator/ktfmt/blob/0dbef72b3b68d414f3a3c5bc5cfe7f85cfb7eb82/core/src/main/java/com/facebook/ktfmt/Formatter.kt#L4[…]L51 Is the
style
enum used in any form internally?
c
@gammax yes - there are style == GOOGLE checks in KotlinInputAstVisitorBase.kt.
👍 1