File tree Expand file tree Collapse file tree 2 files changed +21
-10
lines changed
Expand file tree Collapse file tree 2 files changed +21
-10
lines changed Original file line number Diff line number Diff line change 1+ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2+
13plugins {
24 id ' com.android.application'
35 id ' org.jetbrains.kotlin.android'
@@ -24,8 +26,10 @@ android {
2426 sourceCompatibility JavaVersion . VERSION_17
2527 targetCompatibility JavaVersion . VERSION_17
2628 }
27- kotlinOptions {
28- jvmTarget = ' 17'
29+ kotlin {
30+ compilerOptions {
31+ jvmTarget. set(JvmTarget . JVM_17 )
32+ }
2933 }
3034 buildFeatures {
3135 viewBinding true
Original file line number Diff line number Diff line change 1+ import io.gitlab.arturbosch.detekt.Detekt
2+
13// Top-level build file where you can add configuration options common to all sub-projects/modules.
24buildscript {
35 dependencies {
@@ -15,22 +17,27 @@ plugins {
1517 id ' io.gitlab.arturbosch.detekt' version ' 1.23.8'
1618}
1719
18- detekt {
19- input = files(rootProject. rootDir)
20- config = files(" $projectDir /detekt.yml" )
20+ tasks. withType(Detekt ). configureEach {
21+ // Files to analyze
22+ setSource(files(rootProject. rootDir))
23+
24+ // Configuration
25+ config. setFrom(files(" $projectDir /detekt.yml" ))
2126 allRules = true
2227 buildUponDefaultConfig = true
2328
2429 reports {
25- html. enabled = true
26- xml. enabled = true
27- xml. destination = file(" $buildDir /reports/detekt/detekt-checkstyle.xml" )
28- html. destination = file(" $buildDir /reports/detekt/detekt-report.html" )
30+ html. required. set(true )
31+ html. outputLocation. set(layout. buildDirectory. file(" reports/detekt/detekt-report.html" ))
32+
33+ xml. required. set(true )
34+ xml. outputLocation. set(layout. buildDirectory. file(" reports/detekt/detekt-checkstyle.xml" ))
2935 }
3036}
3137
38+
3239tasks. register(' clean' , Delete ) {
33- delete rootProject. buildDir
40+ delete rootProject. layout . buildDirectory
3441}
3542
3643allprojects {
You can’t perform that action at this time.
0 commit comments