File tree Expand file tree Collapse file tree 8 files changed +25
-18
lines changed
Expand file tree Collapse file tree 8 files changed +25
-18
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import com.android.build.gradle.internal.tasks.factory.dependsOn
1818import org.jetbrains.dokka.gradle.DokkaTask
1919
2020plugins {
21+ kotlin(" jvm" ) version " 1.3.72" apply false
2122 id(" io.gitlab.arturbosch.detekt" ) version " 1.10.0"
2223 id(" com.appmattus.markdown" ) version " 0.6.0"
2324 id(" org.jetbrains.dokka" ) version " 0.10.1"
@@ -26,10 +27,8 @@ plugins {
2627buildscript {
2728 repositories {
2829 google()
29- jcenter()
3030 }
3131 dependencies {
32- classpath(" org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72" )
3332 classpath(" com.android.tools.build:gradle:4.0.1" )
3433 }
3534}
@@ -46,7 +45,7 @@ allprojects {
4645 }
4746}
4847
49- task (" clean" , type = Delete :: class ) {
48+ tasks.register< Delete > (" clean" ) {
5049 delete(rootProject.buildDir)
5150}
5251
Original file line number Diff line number Diff line change @@ -73,5 +73,7 @@ tasks.withType<KotlinCompile> {
7373 kotlinOptions.jvmTarget = " 1.8"
7474}
7575
76- tasks.getByName(" check" ).finalizedBy(rootProject.tasks.getByName(" detekt" ))
77- tasks.getByName(" check" ).finalizedBy(rootProject.tasks.getByName(" markdownlint" ))
76+ tasks.named(" check" ) {
77+ finalizedBy(rootProject.tasks.named(" detekt" ))
78+ finalizedBy(rootProject.tasks.named(" markdownlint" ))
79+ }
Original file line number Diff line number Diff line change @@ -64,5 +64,7 @@ tasks.whenTaskAdded {
6464 }
6565}
6666
67- tasks.getByName(" check" ).finalizedBy(rootProject.tasks.getByName(" detekt" ))
68- tasks.getByName(" check" ).finalizedBy(rootProject.tasks.getByName(" markdownlint" ))
67+ tasks.named(" check" ) {
68+ finalizedBy(rootProject.tasks.named(" detekt" ))
69+ finalizedBy(rootProject.tasks.named(" markdownlint" ))
70+ }
Original file line number Diff line number Diff line change @@ -64,5 +64,7 @@ tasks.whenTaskAdded {
6464 }
6565}
6666
67- tasks.getByName(" check" ).finalizedBy(rootProject.tasks.getByName(" detekt" ))
68- tasks.getByName(" check" ).finalizedBy(rootProject.tasks.getByName(" markdownlint" ))
67+ tasks.named(" check" ) {
68+ finalizedBy(rootProject.tasks.named(" detekt" ))
69+ finalizedBy(rootProject.tasks.named(" markdownlint" ))
70+ }
Original file line number Diff line number Diff line change @@ -64,5 +64,7 @@ tasks.whenTaskAdded {
6464 }
6565}
6666
67- tasks.getByName(" check" ).finalizedBy(rootProject.tasks.getByName(" detekt" ))
68- tasks.getByName(" check" ).finalizedBy(rootProject.tasks.getByName(" markdownlint" ))
67+ tasks.named(" check" ) {
68+ finalizedBy(rootProject.tasks.named(" detekt" ))
69+ finalizedBy(rootProject.tasks.named(" markdownlint" ))
70+ }
Original file line number Diff line number Diff line change @@ -75,5 +75,7 @@ tasks.whenTaskAdded {
7575 }
7676}
7777
78- tasks.getByName(" check" ).finalizedBy(rootProject.tasks.getByName(" detekt" ))
79- tasks.getByName(" check" ).finalizedBy(rootProject.tasks.getByName(" markdownlint" ))
78+ tasks.named(" check" ) {
79+ finalizedBy(rootProject.tasks.named(" detekt" ))
80+ finalizedBy(rootProject.tasks.named(" markdownlint" ))
81+ }
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ val dokka = tasks.named<DokkaTask>("dokka") {
4444 }
4545}
4646
47- project. tasks.create <Jar >(" dokkaJar" ) {
47+ tasks.register <Jar >(" dokkaJar" ) {
4848 dependsOn(dokka)
4949
5050 archiveClassifier.set(" javadoc" )
Original file line number Diff line number Diff line change 1616
1717apply<JacocoPlugin >()
1818
19- val jacocoTask = tasks.create<JacocoReport >(" jacocoTestReport" ) {
20- afterEvaluate {
21- dependsOn(tasks.named(" testDebugUnitTest" ))
22- }
19+ val jacocoTask = tasks.register<JacocoReport >(" jacocoTestReport" ) {
20+ dependsOn(tasks.named(" testDebugUnitTest" ))
2321
2422 reports {
2523 html.isEnabled = true
You can’t perform that action at this time.
0 commit comments