File tree 7 files changed +29
-5
lines changed
buildSrc/src/main/kotlin/com/bugsnag/android
features/fixtures/mazerunner
7 files changed +29
-5
lines changed Original file line number Diff line number Diff line change @@ -67,9 +67,9 @@ class BugsnagBuildPlugin : Plugin<Project> {
67
67
68
68
if (bugsnag.compilesCode) {
69
69
project.configureKotlinOptions()
70
+ project.configureCheckstyle()
70
71
71
72
project.apply (from = project.file(" ../gradle/detekt.gradle" ))
72
- project.apply (from = project.file(" ../gradle/checkstyle.gradle" ))
73
73
}
74
74
}
75
75
@@ -215,6 +215,7 @@ class BugsnagBuildPlugin : Plugin<Project> {
215
215
plugins.apply (" com.github.hierynomus.license" )
216
216
217
217
if (bugsnag.compilesCode) {
218
+ plugins.apply (" checkstyle" )
218
219
plugins.apply (" kotlin-android" )
219
220
plugins.apply (" io.gitlab.arturbosch.detekt" )
220
221
plugins.apply (" org.jlleitschuh.gradle.ktlint" )
Original file line number Diff line number Diff line change
1
+ package com.bugsnag.android
2
+
3
+ import org.gradle.api.Project
4
+ import org.gradle.api.plugins.quality.Checkstyle
5
+ import org.gradle.api.plugins.quality.CheckstyleExtension
6
+ import org.gradle.kotlin.dsl.get
7
+
8
+ fun Project.configureCheckstyle () {
9
+ extensions.getByType(CheckstyleExtension ::class .java).apply {
10
+ toolVersion = " 8.18"
11
+ }
12
+
13
+ val checkstyle = tasks.register(" checkstyle" , Checkstyle ::class .java) {
14
+ configFile = rootProject.file(" config/checkstyle/checkstyle.xml" )
15
+ source = fileTree(" src/" ) {
16
+ include(" **/*.java" )
17
+ exclude(" **/external/**/*.java" )
18
+ }
19
+ classpath = files()
20
+ }
21
+
22
+ tasks[" check" ].dependsOn(checkstyle)
23
+ }
Original file line number Diff line number Diff line change @@ -94,4 +94,4 @@ dependencies {
94
94
95
95
apply from : " ../bugsnag-dependency.gradle"
96
96
apply from : " ../../../../gradle/detekt.gradle"
97
- apply from : " ../../../../ gradle/checkstyle.gradle"
97
+ apply from : " ../gradle/checkstyle.gradle"
Original file line number Diff line number Diff line change @@ -46,4 +46,4 @@ dependencies {
46
46
}
47
47
48
48
apply from : " ../../../../gradle/detekt.gradle"
49
- apply from : " ../../../../ gradle/checkstyle.gradle"
49
+ apply from : " ../gradle/checkstyle.gradle"
Original file line number Diff line number Diff line change @@ -43,4 +43,4 @@ dependencies {
43
43
44
44
apply from : " ../bugsnag-dependency.gradle"
45
45
apply from : " ../../../../gradle/detekt.gradle"
46
- apply from : " ../../../../ gradle/checkstyle.gradle"
46
+ apply from : " ../gradle/checkstyle.gradle"
File renamed without changes.
Original file line number Diff line number Diff line change @@ -48,4 +48,4 @@ private boolean useLegacyOkHttp() {
48
48
49
49
apply from : " ../bugsnag-dependency.gradle"
50
50
apply from : " ../../../../gradle/detekt.gradle"
51
- apply from : " ../../../../ gradle/checkstyle.gradle"
51
+ apply from : " ../gradle/checkstyle.gradle"
You can’t perform that action at this time.
0 commit comments