Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,15 @@ def versionMinor = 9
def versionPatch = 0
def versionBuild = 0 // 0-50=Alpha / 51-98=RC / 90-99=stable

def taskRequest = getGradle().getStartParameter().getTaskRequests().toString()
if (taskRequest.contains("Gplay") || taskRequest.contains("lint")) {
apply from: 'gplay.gradle'
for (TaskExecutionRequest tr : getGradle().getStartParameter().getTaskRequests()) {
for (String arg : tr.args) {
// any gplay, but only exact "build", as e.g. buildGeneric shall not apply gplay.grade
if (arg.contains("Gplay") || arg.contains("lint") || arg == "build") {
apply from: 'gplay.gradle'
System.console().println("Applying gplay.gradle")
break
}
}
}

spotbugs {
Expand Down Expand Up @@ -194,7 +200,7 @@ android {

tasks.register("pmd", Pmd) {
ruleSetFiles = files("${project.rootDir}/ruleset.xml")
ignoreFailures = false
ignoreFailures = true // should continue checking
ruleSets = []

source 'src'
Expand All @@ -217,7 +223,7 @@ android {
String variantName = variant.name
String capVariantName = variantName.substring(0, 1).toUpperCase() + variantName.substring(1)
tasks.register("spotbugs${capVariantName}", SpotBugsTask) {
ignoreFailures = false
ignoreFailures = true // should continue checking
effort = "max"
reportLevel = "medium"
classes = fileTree("$project.buildDir/intermediates/javac/${variantName}/classes/")
Expand All @@ -238,7 +244,7 @@ android {
}
}

check.dependsOn 'checkstyle', 'spotbugs', 'pmd', 'lint', 'ktlint'
check.dependsOn 'checkstyle', 'spotbugsGplayDebug', 'pmd', 'lint', 'ktlint', 'detekt'

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand Down