Skip to content

Commit

Permalink
Example on how to format kts files
Browse files Browse the repository at this point in the history
  • Loading branch information
cortinico committed Aug 13, 2024
1 parent 5d876ca commit fd90227
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion online_formatter/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@
* limitations under the License.
*/

plugins { kotlin("jvm") version "1.8.22" }
import com.ncorti.ktfmt.gradle.tasks.*

plugins {
kotlin("jvm") version "1.8.22"
id("com.ncorti.ktfmt.gradle") version "0.19.0"
}

repositories {
mavenLocal()
Expand Down Expand Up @@ -60,5 +65,16 @@ tasks {
from(processResources)
}

val ktfmtFormatKts by
creating(KtfmtFormatTask::class) {
source = fileTree(rootDir)
include("**/*.gradle.kts")
}
val ktfmtCheckKts by
creating(KtfmtCheckTask::class) {
source = fileTree(rootDir)
include("**/*.gradle.kts")
}

build { dependsOn(packageSkinny) }
}

0 comments on commit fd90227

Please sign in to comment.