Add pipeline: codeAnalysis, tests and clean up gradle
This commit is contained in:
parent
472b7591f5
commit
516b097e9e
27 changed files with 681 additions and 394 deletions
24
gradlescripts/detekt.config.gradle
Normal file
24
gradlescripts/detekt.config.gradle
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
|
||||
detekt {
|
||||
toolVersion = "$detekt_version"
|
||||
|
||||
source = files(
|
||||
"$projectDir/app/src/main/java",
|
||||
"$projectDir/core/src/main/java",
|
||||
"$projectDir/mockserver/src/main/java",
|
||||
"$projectDir/model/src/main/java",
|
||||
"$projectDir/network/src/main/java"
|
||||
)
|
||||
config = files("$projectDir/detekt/detekt.yml")
|
||||
baseline = file("$projectDir/detekt/baseline.xml")
|
||||
reports {
|
||||
txt {
|
||||
enabled = true
|
||||
destination = file("build/reports/detekt.txt")
|
||||
}
|
||||
html {
|
||||
enabled = true
|
||||
destination = file("build/reports/detekt.html")
|
||||
}
|
||||
}
|
||||
}
|
||||
3
gradlescripts/ktlint.gradle
Normal file
3
gradlescripts/ktlint.gradle
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
subprojects {
|
||||
apply plugin: "org.jlleitschuh.gradle.ktlint"
|
||||
}
|
||||
34
gradlescripts/lint.gradle
Normal file
34
gradlescripts/lint.gradle
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
subprojects { module ->
|
||||
plugins.withType(JavaPlugin).whenPluginAdded {
|
||||
configure(module) {
|
||||
apply plugin: "com.android.lint"
|
||||
lintOptions {
|
||||
warningsAsErrors true
|
||||
abortOnError true
|
||||
textReport true
|
||||
ignore 'Overdraw'
|
||||
textOutput "stdout"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
plugins.withId("com.android.application") {
|
||||
module.android.lintOptions {
|
||||
warningsAsErrors true
|
||||
abortOnError true
|
||||
textReport true
|
||||
ignore 'Overdraw'
|
||||
textOutput "stdout"
|
||||
}
|
||||
}
|
||||
|
||||
plugins.withId("com.android.library") {
|
||||
module.android.lintOptions {
|
||||
warningsAsErrors true
|
||||
abortOnError true
|
||||
textReport true
|
||||
ignore 'Overdraw'
|
||||
textOutput "stdout"
|
||||
}
|
||||
}
|
||||
}
|
||||
44
gradlescripts/testoptions.gradle
Normal file
44
gradlescripts/testoptions.gradle
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
subprojects { module ->
|
||||
plugins.withType(JavaPlugin).whenPluginAdded {
|
||||
module.test {
|
||||
useJUnitPlatform()
|
||||
testLogging {
|
||||
events 'started', 'passed', 'skipped', 'failed'
|
||||
exceptionFormat "full"
|
||||
showStandardStreams true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
plugins.withId("com.android.application") {
|
||||
module.android.testOptions.unitTests.all {
|
||||
useJUnitPlatform()
|
||||
testLogging {
|
||||
events 'started', 'passed', 'skipped', 'failed'
|
||||
exceptionFormat "full"
|
||||
showStandardStreams true
|
||||
}
|
||||
}
|
||||
module.android.testOptions {
|
||||
unitTests {
|
||||
includeAndroidResources = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
plugins.withId("com.android.library") {
|
||||
module.android.testOptions.unitTests.all {
|
||||
useJUnitPlatform()
|
||||
testLogging {
|
||||
events 'started', 'passed', 'skipped', 'failed'
|
||||
exceptionFormat "full"
|
||||
showStandardStreams true
|
||||
}
|
||||
}
|
||||
module.android.testOptions {
|
||||
unitTests {
|
||||
includeAndroidResources = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue