From f82eb75e4db92c482260549fc28c01a2c91a9147 Mon Sep 17 00:00:00 2001 From: Ali Khaleqi Yekta Date: Sat, 19 Jun 2021 13:36:01 +0430 Subject: [PATCH] Add ktlint --- build.gradle.kts | 7 +++++-- buildSrc/src/main/java/Dependencies.kt | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index bdf6752..daafd10 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -12,9 +12,14 @@ buildscript { classpath("com.squareup.sqldelight:gradle-plugin:${Versions.sqlDelight}") classpath("gradle.plugin.com.github.jengelman.gradle.plugins:shadow:7.0.0") } + plugins { + id("org.jlleitschuh.gradle.ktlint") version Versions.ktlintGradle + } } allprojects { + apply(plugin = "org.jlleitschuh.gradle.ktlint") // Version should be inherited from parent + repositories { google() mavenCentral() @@ -22,5 +27,3 @@ allprojects { maven(url = "https://jitpack.io") } } - - diff --git a/buildSrc/src/main/java/Dependencies.kt b/buildSrc/src/main/java/Dependencies.kt index e0a2295..302d5ac 100644 --- a/buildSrc/src/main/java/Dependencies.kt +++ b/buildSrc/src/main/java/Dependencies.kt @@ -16,6 +16,8 @@ object Versions { const val junit = "4.13" const val mockito = "3.7.7" const val testRunner = "1.3.0" + + const val ktlintGradle = "10.1.0" }