File tree Expand file tree Collapse file tree 4 files changed +9
-9
lines changed
test-published-dependencies Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ afterEvaluate {
5252 }
5353 }
5454
55- jacocoTestCoverageVerification {
55+ tasks . named( " jacocoTestCoverageVerification" , JacocoCoverageVerification ) {
5656 violationRules {
5757 rule {
5858 element = ' CLASS'
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ if (project.hasProperty('minJavaVersionForTests') && project.getProperty('minJav
5858 }
5959 }
6060
61- " compileMain_${ name} Java" {
61+ tasks . named( " compileMain_${ name} Java" , JavaCompile ) . configure {
6262 sourceCompatibility = version
6363 targetCompatibility = version
6464 }
@@ -74,7 +74,7 @@ if (project.hasProperty('minJavaVersionForTests') && project.getProperty('minJav
7474 }
7575 }
7676
77- jar {
77+ tasks . named( " jar" , Jar ) {
7878 from sourceSets. " main_$name " . output
7979 }
8080
9898 withSourcesJar()
9999}
100100
101- jar {
101+ tasks . named( " jar" , Jar ) {
102102 /**
103103 Make Jar build fail on duplicate files
104104 By default Gradle Jar task can put multiple files with the same name
@@ -136,7 +136,7 @@ tasks.withType(Javadoc).configureEach {
136136 }
137137}
138138
139- javadoc {
139+ tasks . named( " javadoc" , Javadoc ) {
140140 source = sourceSets. main. java. srcDirs
141141 classpath = configurations. compileClasspath
142142
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ dependencies {
1919 testImplementation(' org.junit.jupiter:junit-jupiter' )
2020}
2121
22- test {
22+ tasks . named( " test" , Test ) {
2323 dependsOn(' jar' )
2424 useJUnitPlatform()
2525 testLogging {
2929 jvmArgs " -Dtest.published.dependencies.jar=${ tasks.jar.archiveFile.get()} "
3030}
3131
32- jar {
32+ tasks . named( " jar" , Jar ) {
3333 manifest {
3434 attributes(' Main-Class' : ' test.published.dependencies.App' )
3535 }
@@ -39,7 +39,7 @@ application {
3939 mainClass = ' test.published.dependencies.App'
4040}
4141
42- compileTestJava {
42+ tasks . named( " compileTestJava" , JavaCompile ) {
4343 sourceCompatibility = JavaVersion . VERSION_1_8
4444 targetCompatibility = JavaVersion . VERSION_1_8
4545}
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ dependencies {
1313 testImplementation(' org.junit.jupiter:junit-jupiter' )
1414}
1515
16- test {
16+ tasks . named( " test" , Test ) {
1717 useJUnitPlatform()
1818 testLogging {
1919 events " passed" , " skipped" , " failed"
You can’t perform that action at this time.
0 commit comments