Kynetics/uf-android-client

View on GitHub
ktlint.gradle

Summary

Maintainability
Test Coverage
/*
 * Copyright © 2017-2023  Kynetics  LLC
 * 
 * This program and the accompanying materials are made
 * available under the terms of the Eclipse Public License 2.0
 * which is available at https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 */

repositories {
    mavenCentral()
}

configurations {
    ktlint
}

dependencies {
    ktlint "com.pinterest:ktlint:0.34.2"}

task checkStyle(type: JavaExec, group: "klint") {
    description = "Check Kotlin code style."
    classpath = configurations.ktlint
    main = "com.pinterest.ktlint.Main"
    args "src/**/*.kt"
}

task fixStyle(type: JavaExec, group: "klint") {
    description = "Fix Kotlin code style deviations."
    classpath = configurations.ktlint
    main = "com.pinterest.ktlint.Main"
    args "-F", "src/**/*.kt"
}

task configureIntellij(type: JavaExec, group: "klint"){
    description = "Configure intellij"
    classpath = configurations.ktlint
    workingDir = project.rootDir
    main = "com.pinterest.ktlint.Main"
    args "--apply-to-idea-project", "--android", "-y"
}