gammax
12/24/2020, 3:42 PMJavier
12/24/2020, 3:59 PMJavier
12/24/2020, 4:00 PMJavier
12/24/2020, 4:35 PMgradlew build
run check and/or format tasks?Javier
12/24/2020, 10:51 PMgammax
12/24/2020, 10:52 PMJavier
02/22/2021, 10:36 AMgammax
02/22/2021, 10:36 AMktfmt-gradle
?gammax
02/22/2021, 10:43 AMYeah, I am using dropbox-style. But currently, there is no way to use it with any Gradle plugin no?I’m not sure I follow you there? 🤔 Isn’t that supported with the Gradle plugin?
Carmi Grushko
02/26/2021, 10:44 AMgammax
02/27/2021, 12:30 PMkotlinLangStyle()
function: https://github.com/cortinico/ktfmt-gradle/releases/tag/0.4.0Colton Idle
05/01/2021, 6:01 PMid("com.diffplug.spotless") version "5.12.4"
then I added this block in my root build.gradle.kts
spotless {
kotlin {
ktfmt("0.24").dropboxStyle() // version and dropbox style are optional
}
}
When I try to run ./gradlew spotlessCheck
I get
Could not determine the dependencies of task ':spotlessCheck'.
> Could not create task ':spotlessKotlinCheck'.
> Could not create task ':spotlessKotlin'.
> You must either specify 'target' manually or apply a kotlin plugin.
Any ideas?gammax
05/02/2021, 8:34 AMColton Idle
05/07/2021, 12:11 AMCarmi Grushko
05/07/2021, 2:35 PMColton Idle
05/08/2021, 2:29 AMColton Idle
05/08/2021, 9:32 PM# build.gradle.kts
plugins { id("com.diffplug.spotless") }
// version and style are optional
spotless { kotlin { ktfmt('0.25').kotlinlangStyle() } }
but spotless docs say:
spotless { // if you are using build.gradle.kts, instead of 'spotless {' use:
// configure<com.diffplug.gradle.spotless.SpotlessExtension> {
...
So should it be spotless {
or configure<com.diffplug.gradle.spotless.SpotlessExtension> {
for kts files?
Are the spotless docs wrong/out of date? Or should the ktfmt website show the proper api for applying to a kts file?
(this is a super small detail but as someone that just felt like they jumped through a bunch of hoops to get this working with kts build files on Android, I want to make sure the docs are up to date) 😄Colton Idle
08/12/2021, 5:11 PMColton Idle
09/24/2021, 6:24 PMColton Idle
09/25/2021, 1:42 PMNote thatDoes it? I'd say in general it works really well. 😄 I've had a way better experience than ktlint. Should the docs highlight any of these rough edges so that it's easier (from the maintainers POV) what is still a rough experience?still has some rough edges which we're constantly working on fixing.ktfmt
Colton Idle
10/12/2021, 1:42 PM// version and style are optional
spotless { kotlin { ktfmt('0.29').kotlinlangStyle() } }
From the ktfmt website ^
Does that mean that if I omit the ktfmt version, it will always use the latest?Colton Idle
10/12/2021, 9:33 PMNote: There is no configurability as to the formatter's algorithm for formatting (apart fromIt looks like when using spotless there are four styles? 1. default (no style selected) 2. dropbox 3. google 4. kotlin Should those be added to the readme, or are they the same or something?). This is a deliberate design decision to unify our code formatting on a single format.--dropbox-style
Colton Idle
12/15/2021, 5:10 AMpablisco
06/14/2022, 10:05 AMAaron Shakibpanah
08/01/2022, 2:34 PMJavier
08/01/2022, 3:02 PMAaron Shakibpanah
08/01/2022, 3:11 PMJavier
08/01/2022, 3:17 PMAaron Shakibpanah
08/01/2022, 7:13 PMAaron Shakibpanah
08/01/2022, 7:13 PMAaron Shakibpanah
08/01/2022, 7:13 PM