Skip to content
Merged
Show file tree
Hide file tree
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
27 changes: 27 additions & 0 deletions OneSignalSDK/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ buildscript {
minSdkVersion: 21
]
androidGradlePluginVersion = '8.8.2'
detektVersion = '1.21.0'
googleServicesGradlePluginVersion = '4.3.10'
huaweiAgconnectVersion = '1.9.1.304'
huaweiHMSPushVersion = '6.3.0.304'
huaweiHMSLocationVersion = '4.0.0.300'
kotlinVersion = '1.7.10'
coroutinesVersion = '1.7.3'
kotestVersion = '5.8.0'
ioMockVersion = '1.13.2'
// AndroidX Lifecycle and Activity versions
lifecycleVersion = '2.6.2'
activityVersion = '1.7.2'
Expand All @@ -35,6 +37,7 @@ buildscript {
"com.google.gms:google-services:$googleServicesGradlePluginVersion",
"com.huawei.agconnect:agcp:$huaweiAgconnectVersion",
"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion",
"io.gitlab.arturbosch.detekt:detekt-gradle-plugin:$detektVersion",
"com.diffplug.spotless:spotless-plugin-gradle:$spotlessVersion",
"com.vanniktech.maven.publish:com.vanniktech.maven.publish.gradle.plugin:0.32.0"
]
Expand Down Expand Up @@ -77,3 +80,27 @@ allprojects {
}
}
}

subprojects {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this part will ignore the test files and as it doesnt make sense to run detekt on tests.

plugins.withId("io.gitlab.arturbosch.detekt") {
afterEvaluate {
def configureDetektTask = { task ->
// Only analyze main source sets
task.source = files(
"$projectDir/src/main/java",
"$projectDir/src/main/kotlin"
)
// Exclude all test-related files and directories
task.exclude "**/test/**", "**/androidTest/**", "**/src/test/**", "**/src/androidTest/**",
"**/*Test.kt", "**/*Tests.kt", "**/*Spec.kt",
"**/*Test.java", "**/*Tests.java", "**/*Spec.java"

// Enable type resolution to catch !! operator
task.jvmTarget = "1.8"
}

tasks.withType(io.gitlab.arturbosch.detekt.Detekt).configureEach(configureDetektTask)
tasks.withType(io.gitlab.arturbosch.detekt.DetektCreateBaselineTask).configureEach(configureDetektTask)
}
}
}
487 changes: 487 additions & 0 deletions OneSignalSDK/detekt/detekt-baseline-core.xml

Large diffs are not rendered by default.

133 changes: 133 additions & 0 deletions OneSignalSDK/detekt/detekt-baseline-in-app-messages.xml

Large diffs are not rendered by default.

53 changes: 53 additions & 0 deletions OneSignalSDK/detekt/detekt-baseline-location.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" ?>
<SmellBaseline>
<ManuallySuppressedIssues></ManuallySuppressedIssues>
<CurrentIssues>
<ID>ComplexMethod:LocationManager.kt$LocationManager$override suspend fun requestPermission(): Boolean</ID>
<ID>ConstructorParameterNaming:GmsLocationController.kt$GmsLocationController$private val _applicationService: IApplicationService</ID>
<ID>ConstructorParameterNaming:GmsLocationController.kt$GmsLocationController$private val _fusedLocationApiWrapper: IFusedLocationApiWrapper</ID>
<ID>ConstructorParameterNaming:GmsLocationController.kt$GmsLocationController.GoogleApiClientListener$private val _parent: GmsLocationController</ID>
<ID>ConstructorParameterNaming:GmsLocationController.kt$GmsLocationController.LocationUpdateListener$private val _applicationService: IApplicationService</ID>
<ID>ConstructorParameterNaming:GmsLocationController.kt$GmsLocationController.LocationUpdateListener$private val _fusedLocationApiWrapper: IFusedLocationApiWrapper</ID>
<ID>ConstructorParameterNaming:GmsLocationController.kt$GmsLocationController.LocationUpdateListener$private val _parent: GmsLocationController</ID>
<ID>ConstructorParameterNaming:HmsLocationController.kt$HmsLocationController$private val _applicationService: IApplicationService</ID>
<ID>ConstructorParameterNaming:HmsLocationController.kt$HmsLocationController.LocationUpdateListener$private val _applicationService: IApplicationService</ID>
<ID>ConstructorParameterNaming:HmsLocationController.kt$HmsLocationController.LocationUpdateListener$private val _parent: HmsLocationController</ID>
<ID>ConstructorParameterNaming:LocationBackgroundService.kt$LocationBackgroundService$private val _applicationService: IApplicationService</ID>
<ID>ConstructorParameterNaming:LocationBackgroundService.kt$LocationBackgroundService$private val _capturer: ILocationCapturer</ID>
<ID>ConstructorParameterNaming:LocationBackgroundService.kt$LocationBackgroundService$private val _locationManager: ILocationManager</ID>
<ID>ConstructorParameterNaming:LocationBackgroundService.kt$LocationBackgroundService$private val _prefs: ILocationPreferencesService</ID>
<ID>ConstructorParameterNaming:LocationBackgroundService.kt$LocationBackgroundService$private val _time: ITime</ID>
<ID>ConstructorParameterNaming:LocationCapturer.kt$LocationCapturer$private val _applicationService: IApplicationService</ID>
<ID>ConstructorParameterNaming:LocationCapturer.kt$LocationCapturer$private val _controller: ILocationController</ID>
<ID>ConstructorParameterNaming:LocationCapturer.kt$LocationCapturer$private val _prefs: ILocationPreferencesService</ID>
<ID>ConstructorParameterNaming:LocationCapturer.kt$LocationCapturer$private val _propertiesModelStore: PropertiesModelStore</ID>
<ID>ConstructorParameterNaming:LocationCapturer.kt$LocationCapturer$private val _time: ITime</ID>
<ID>ConstructorParameterNaming:LocationManager.kt$LocationManager$private val _applicationService: IApplicationService</ID>
<ID>ConstructorParameterNaming:LocationManager.kt$LocationManager$private val _capturer: ILocationCapturer</ID>
<ID>ConstructorParameterNaming:LocationManager.kt$LocationManager$private val _locationController: ILocationController</ID>
<ID>ConstructorParameterNaming:LocationManager.kt$LocationManager$private val _locationPermissionController: LocationPermissionController</ID>
<ID>ConstructorParameterNaming:LocationManager.kt$LocationManager$private val _prefs: IPreferencesService</ID>
<ID>ConstructorParameterNaming:LocationPermissionController.kt$LocationPermissionController$private val _applicationService: IApplicationService</ID>
<ID>ConstructorParameterNaming:LocationPermissionController.kt$LocationPermissionController$private val _requestPermission: IRequestPermissionService</ID>
<ID>ConstructorParameterNaming:LocationPreferencesService.kt$LocationPreferencesService$private val _prefs: IPreferencesService</ID>
<ID>ForbiddenComment:GmsLocationController.kt$GmsLocationController$// TODO: google api client has a blocking connect with timeout, use that instead of our withTimeout?</ID>
<ID>LongMethod:GmsLocationController.kt$GmsLocationController$override suspend fun start(): Boolean</ID>
<ID>LongMethod:HmsLocationController.kt$HmsLocationController$override suspend fun start(): Boolean</ID>
<ID>LongMethod:LocationManager.kt$LocationManager$override suspend fun requestPermission(): Boolean</ID>
<ID>MagicNumber:GmsLocationController.kt$GmsLocationController.LocationUpdateListener$1.5</ID>
<ID>MagicNumber:HmsLocationController.kt$HmsLocationController.LocationUpdateListener$1.5</ID>
<ID>MagicNumber:LocationBackgroundService.kt$LocationBackgroundService$1000</ID>
<ID>MagicNumber:LocationCapturer.kt$LocationCapturer$7</ID>
<ID>MagicNumber:LocationManager.kt$LocationManager$29</ID>
<ID>MayBeConst:GmsLocationController.kt$GmsLocationController.Companion$val API_FALLBACK_TIME = 30000</ID>
<ID>PrintStackTrace:GoogleApiClientCompatProxy.kt$GoogleApiClientCompatProxy$t</ID>
<ID>ProtectedMemberInFinalClass:GmsLocationController.kt$GmsLocationController$LocationHandlerThread : HandlerThread</ID>
<ID>SwallowedException:GmsLocationController.kt$GmsLocationController$e: TimeoutCancellationException</ID>
<ID>SwallowedException:LocationUtils.kt$LocationUtils$e: NoClassDefFoundError</ID>
<ID>TooGenericExceptionCaught:FusedLocationApiWrapperImpl.kt$FusedLocationApiWrapperImpl$t: Throwable</ID>
<ID>TooGenericExceptionCaught:GoogleApiClientCompatProxy.kt$GoogleApiClientCompatProxy$t: Throwable</ID>
<ID>TooGenericExceptionCaught:HmsLocationController.kt$HmsLocationController$e: Exception</ID>
<ID>TooGenericExceptionCaught:LocationManager.kt$LocationManager$t: Throwable</ID>
<ID>TooGenericExceptionThrown:GmsLocationController.kt$GmsLocationController.LocationUpdateListener$throw Exception("googleApiClient not connected, cannot listen!")</ID>
</CurrentIssues>
</SmellBaseline>
Loading
Loading