Skip to content

Commit

Permalink
updating gradle, fixing warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
robertfmurdock committed Dec 22, 2024
1 parent b22e07b commit 5fa7b6c
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ tasks {
) + gradle.includedBuild("wdio-testing-library-test")
val includedBuilds = testBuilds + gradle.includedBuild("convention-plugins")

val publish by creating {
val publish by registering {
mustRunAfter(check)
dependsOn(provider { publishableBuilds.map { it.task(":publish") } })
}
"versionCatalogUpdate" {
dependsOn(provider { includedBuilds.map { it.task(":versionCatalogUpdate") } })
}
create("kotlinUpgradeYarnLock") {
register("kotlinUpgradeYarnLock") {
dependsOn(
provider {
listOf(
Expand All @@ -43,14 +43,14 @@ tasks {
}
)
}
create<Copy>("collectResults") {
register<Copy>("collectResults") {
dependsOn(provider { (getTasksByName("collectResults", true) - this).toList() })
dependsOn(provider { testBuilds.map { it.task(":collectResults") } })
from(testBuilds.map { it.projectDir.resolve("build/test-output") })
into(rootProject.layout.buildDirectory.dir("test-output/${project.path}".replace(":", "/")))
}

create("formatKotlin") {
register("formatKotlin") {
dependsOn(provider { (getTasksByName("formatKotlin", true) - this).toList() })
dependsOn(provider { includedBuilds.map { it.task(":formatKotlin") } })
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ signing {
tasks {
publish { finalizedBy("::closeAndReleaseSonatypeStagingRepository") }

val javadocJar by creating(Jar::class) {
val javadocJar by registering(Jar::class) {
archiveClassifier.set("javadoc")
from("${rootDir.absolutePath}/javadocs")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ tasks {
"test-output/${project.path}/results".replace(":", "/"),
)
val check by getting
val copyReportsToRootDirectory by creating(Copy::class) {
val copyReportsToRootDirectory by registering(Copy::class) {
mustRunAfter(check)
from("build/reports")
into(projectResultPath)
}
val copyTestResultsToRootDirectory by creating(Copy::class) {
val copyTestResultsToRootDirectory by registering(Copy::class) {
mustRunAfter(check)
from("build/test-results")
into(projectResultPath)
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=89d4e70e4e84e2d2dfbb63e4daa53e21b25017cc70c37e4eea31ee51fb15098a
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
distributionSha256Sum=7ebdac923867a3cec0098302416d1e3c6c0c729fc4e2e05c10637a8af33a76c5
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
4 changes: 2 additions & 2 deletions libraries/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ tagger {
}

tasks {
create("collectResults") {
register("collectResults") {
dependsOn(provider { (getTasksByName("collectResults", true) - this).toList() })
}
create("formatKotlin") {
register("formatKotlin") {
dependsOn(provider { (getTasksByName("formatKotlin", true) - this).toList() })
}
"versionCatalogUpdate" { dependsOn(":dependency-bom:ncuUpgrade") }
Expand Down
6 changes: 3 additions & 3 deletions plugins/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ tasks {
}
check { dependsOn(provider { (getTasksByName("check", true) - this).toList() }) }
assemble { dependsOn(provider { (getTasksByName("assemble", true) - this).toList() }) }
create("formatKotlin") { dependsOn(provider { (getTasksByName("formatKotlin", true) - this).toList() }) }
create("collectResults") { dependsOn(provider { (getTasksByName("collectResults", true) - this).toList() }) }
register("formatKotlin") { dependsOn(provider { (getTasksByName("formatKotlin", true) - this).toList() }) }
register("collectResults") { dependsOn(provider { (getTasksByName("collectResults", true) - this).toList() }) }
val closeAndReleaseSonatypeStagingRepository by getting {
mustRunAfter(publish)
}
Expand All @@ -59,4 +59,4 @@ tasks {
}
}

fun Project.isSnapshot() = version.toString().contains("SNAPSHOT")
fun Project.isSnapshot() = version.toString().contains("SNAPSHOT")
4 changes: 2 additions & 2 deletions plugins/plugins/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,12 @@ tasks {
}
val projectResultPath = rootProject.layout.buildDirectory
.dir("test-output/${project.path}/results".replace(":", "/"))
val copyReportsToRootDirectory by creating(Copy::class) {
val copyReportsToRootDirectory by registering(Copy::class) {
mustRunAfter(check)
from("build/reports")
into(projectResultPath)
}
val copyTestResultsToRootDirectory by creating(Copy::class) {
val copyTestResultsToRootDirectory by registering(Copy::class) {
mustRunAfter(check)
from("build/test-results")
into(projectResultPath)
Expand Down

0 comments on commit 5fa7b6c

Please sign in to comment.