Skip to content

Commit

Permalink
Detekt cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacSweers committed Aug 13, 2020
1 parent 88f1801 commit 5c5add0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/main/kotlin/com/bugsnag/android/gradle/BugsnagPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class BugsnagPlugin : Plugin<Project> {
*
* See https://sites.google.com/a/android.com/tools/tech-docs/new-build-system/user-guide#TOC-Build-Variants
*/
@Suppress("LongParameterList")
@Suppress("LongParameterList", "LongMethod", "ComplexMethod")
private fun registerBugsnagTasksForVariant(
project: Project,
android: AppExtension,
Expand Down Expand Up @@ -276,6 +276,7 @@ class BugsnagPlugin : Plugin<Project> {
/**
* Creates a bugsnag task to upload proguard mapping file
*/
@Suppress("LongParameterList")
private fun registerProguardUploadTask(
project: Project,
output: ApkVariantOutput,
Expand All @@ -299,6 +300,7 @@ class BugsnagPlugin : Plugin<Project> {
}
}

@Suppress("LongParameterList")
private fun registerSharedObjectUploadTask(
project: Project,
variant: ApkVariant,
Expand Down Expand Up @@ -329,6 +331,7 @@ class BugsnagPlugin : Plugin<Project> {
}
}

@Suppress("LongParameterList")
private fun registerReleasesUploadTask(
project: Project,
variant: ApkVariant,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@file:Suppress("MatchingDeclarationName") // This file contains multiple top-level members
@file:Suppress("MatchingDeclarationName", "TooManyFunctions") // This file contains multiple top-level members
package com.bugsnag.android.gradle.internal

import com.android.build.gradle.AppExtension
Expand Down Expand Up @@ -53,6 +53,7 @@ internal fun File.md5HashCode(): Int {
}
}

@Suppress("SpreadOperator")
internal fun <T: Task> TaskProvider<out T>.dependsOn(vararg tasks: TaskProvider<out Task>): TaskProvider<out T> {
if (tasks.isEmpty().not()) {
configure { it.dependsOn(*tasks) }
Expand All @@ -78,6 +79,7 @@ internal fun BaseVariant.register(project: Project, provider: TaskProvider<out T
}
}

@Suppress("TooGenericExceptionCaught")
private fun BaseVariant.registerAgp4(provider: TaskProvider<out Task>): Boolean {
return try {
// This is of type ComponentPropertiesImpl
Expand All @@ -94,6 +96,7 @@ private fun BaseVariant.registerAgp4(provider: TaskProvider<out Task>): Boolean
}
}

@Suppress("TooGenericExceptionCaught")
private fun BaseVariant.registerAgp3(provider: TaskProvider<out Task>): Boolean {
return try {
if (this is ApplicationVariantImpl) {
Expand Down

0 comments on commit 5c5add0

Please sign in to comment.