Skip to content

Commit

Permalink
Detecting deprecated code via detekt and fixed detekt detection for t…
Browse files Browse the repository at this point in the history
…he issues in project
  • Loading branch information
MohitMaliDeveloper committed Jul 4, 2023
1 parent efc723f commit d5671f9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions buildSrc/src/main/kotlin/plugin/AllProjectConfigurer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import Config
import Libs
import com.android.build.api.dsl.CommonExtension
import com.android.build.gradle.BaseExtension
import io.gitlab.arturbosch.detekt.Detekt
import io.gitlab.arturbosch.detekt.DetektCreateBaselineTask
import io.gitlab.arturbosch.detekt.extensions.DetektExtension
import org.gradle.api.Project
import org.gradle.kotlin.dsl.apply
Expand Down Expand Up @@ -67,6 +69,12 @@ class AllProjectConfigurer {
target.tasks.withType(KotlinCompile::class.java) {
kotlinOptions.jvmTarget = "1.8"
}
target.tasks.withType(Detekt::class.java).configureEach {
jvmTarget = "1.8"
}
target.tasks.withType(DetektCreateBaselineTask::class.java).configureEach {
jvmTarget = "1.8"
}
buildFeatures.viewBinding = true

testOptions {
Expand Down
2 changes: 1 addition & 1 deletion team-props/git-hooks/pre-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

echo "Running lint..."

./gradlew ktlintCheck detekt app:lintDebug custom:lintCustomexampleDebug --daemon
./gradlew ktlintCheck detektDebug detektCustomExampleDebug app:lintDebug custom:lintCustomexampleDebug --daemon

status=$?

Expand Down

0 comments on commit d5671f9

Please sign in to comment.