mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-03 23:15:31 +00:00
522aca44f4
Changelog: https://arturbosch.github.io/detekt/changelog.html Fixes https://github.com/mozilla-mobile/fenix/issues/7360. Also use more exact test glob. Co-authored-by: Andrew Gaul <andrew@gaul.org>
88 lines
2.2 KiB
Groovy
88 lines
2.2 KiB
Groovy
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
|
|
buildscript {
|
|
repositories {
|
|
google()
|
|
jcenter()
|
|
}
|
|
dependencies {
|
|
classpath Deps.tools_androidgradle
|
|
classpath Deps.tools_kotlingradle
|
|
classpath Deps.androidx_safeargs
|
|
classpath Deps.allopen
|
|
classpath Deps.osslicenses_plugin
|
|
|
|
// NOTE: Do not place your application dependencies here; they belong
|
|
// in the individual module build.gradle files
|
|
}
|
|
}
|
|
|
|
plugins {
|
|
id("io.gitlab.arturbosch.detekt").version("1.6.0")
|
|
}
|
|
|
|
allprojects {
|
|
repositories {
|
|
google()
|
|
maven {
|
|
url "https://nightly.maven.mozilla.org/maven2"
|
|
}
|
|
maven {
|
|
url "https://maven.mozilla.org/maven2"
|
|
}
|
|
maven {
|
|
url "https://repo.leanplum.com/"
|
|
}
|
|
jcenter()
|
|
}
|
|
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
|
|
kotlinOptions.jvmTarget = "1.8"
|
|
kotlinOptions.allWarningsAsErrors = true
|
|
kotlinOptions.freeCompilerArgs += ["-Xuse-experimental=kotlin.Experimental", "-Xskip-runtime-version-check"]
|
|
}
|
|
}
|
|
|
|
task clean(type: Delete) {
|
|
delete rootProject.buildDir
|
|
}
|
|
|
|
detekt {
|
|
// The version number is duplicated, please refer to plugins block for more details
|
|
version = "1.6.0"
|
|
input = files("$projectDir/app/src")
|
|
config = files("$projectDir/config/detekt.yml")
|
|
|
|
reports {
|
|
html {
|
|
enabled = true
|
|
destination = file("$projectDir/build/reports/detekt.html")
|
|
}
|
|
xml {
|
|
enabled = false
|
|
}
|
|
}
|
|
}
|
|
|
|
configurations {
|
|
ktlint
|
|
}
|
|
|
|
dependencies {
|
|
ktlint "com.pinterest:ktlint:0.34.2"
|
|
detekt project(":mozilla-detekt-rules")
|
|
detekt "io.gitlab.arturbosch.detekt:detekt-cli:${Versions.detekt}"
|
|
}
|
|
|
|
task ktlint(type: JavaExec, group: "verification") {
|
|
description = "Check Kotlin code style."
|
|
classpath = configurations.ktlint
|
|
main = "com.pinterest.ktlint.Main"
|
|
args "app/src/**/*.kt"
|
|
}
|
|
|
|
tasks.withType(io.gitlab.arturbosch.detekt.Detekt.class) {
|
|
exclude("**/resources/**")
|
|
exclude("**/test/**")
|
|
exclude("**/tmp/**")
|
|
}
|