Skip to content

Commit

Permalink
chore(deps): update dependency gradle to v8.10 (#618)
Browse files Browse the repository at this point in the history
* chore(deps): update dependency gradle to v8.10

* Adopt settings.gradle.kts to Gradle 8.10

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Robert Stupp <snazy@snazy.de>
  • Loading branch information
renovate[bot] and snazy authored Aug 19, 2024
1 parent 1b30d75 commit ddb5e94
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
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=258e722ec21e955201e31447b0aed14201765a3bfbae296a46cf60b70e66db70
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip
distributionSha256Sum=682b4df7fe5accdca84a4d1ef6a3a6ab096b3efd5edf7de2bd8c758d95a93703
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
21 changes: 14 additions & 7 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@

import java.util.Locale
import java.util.Properties
import org.gradle.api.internal.artifacts.DefaultBuildIdentifier
import org.gradle.api.internal.attributes.ImmutableAttributes
import org.gradle.api.internal.project.ProjectIdentity
import org.gradle.internal.component.local.model.DefaultProjectComponentSelector
import org.gradle.util.Path

if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_11)) {
throw GradleException("Build requires Java 11")
Expand Down Expand Up @@ -281,7 +285,7 @@ fun DependencySubstitution.manageNessieProjectDependency(
) {
val module = if (req.module == "nessie") "" else req.module
val targetBuild =
if (nessieIcebergProjects.contains(req.module)) "nessie-iceberg" else "nessie"
if (nessieIcebergProjects.contains(req.module)) ":nessie:nessie-iceberg" else ":nessie"

// project() doesn't handle included builds :(
// useTarget(project(":$targetBuild:$module"), "Project managed via $includedBuildDesc")
Expand Down Expand Up @@ -311,12 +315,15 @@ fun projectFromIncludedBuild(includedBuild: String, projectPath: String): Projec
// TODO this is dirty, but does its job, which is to substitute dependencies to
// org.projectnessie:nessie-* to the projects built by the included Nessie build
try {
val inclBuild = gradle.includedBuild(includedBuild)
val inclBuildInternal = inclBuild as org.gradle.internal.composite.IncludedBuildInternal
val inclBuildTarget = inclBuildInternal.target
val nessiePrj = inclBuildTarget.projects.getProject(org.gradle.util.Path.path(projectPath))
val prjIdent = nessiePrj.componentIdentifier
return DefaultProjectComponentSelector.newSelector(prjIdent)
val path = Path.path(projectPath)
val buildIdent = DefaultBuildIdentifier(Path.path(includedBuild))
val buildTreePath = Path.path("$includedBuild:$projectPath")
val prjIdentity = ProjectIdentity(buildIdent, buildTreePath, path, path.name ?: "root")
return DefaultProjectComponentSelector(
prjIdentity,
ImmutableAttributes.EMPTY,
emptyList<Capability>()
)
} catch (x: Exception) {
x.printStackTrace()
throw x
Expand Down

0 comments on commit ddb5e94

Please sign in to comment.