Skip to content
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.

Commit

Permalink
chore: merge upstream branch gradle/master into main
Browse files Browse the repository at this point in the history
This commit synchronizes the latest 3 changes from the https://github.com/gradle/gradle/tree/master. The changes include:

7aa0f23: gradle/gradle#27172 Fix CC incompatibility in Kotlin model building
88c2174: Make fixture Isolated Projects compatible
2e6a523: Avoid capturing project in configure action
  • Loading branch information
meowool-bot committed Nov 27, 2023
2 parents f272fd0 + 7aa0f23 commit dba00b8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ fun Project.enableScriptCompilationOf(
dependsOn(generatePrecompiledScriptPluginAccessors)
metadataDir.set(accessorsMetadata)
classPathFiles.from(compileClasspath)
val objects = objects
onConfigure { resolverEnvironment ->
configureKotlinCompilerArguments(objects, resolverEnvironment)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,33 +209,34 @@ trait KotlinDslTestProjectInitiation {
withDefaultSettingsIn("buildSrc").append("""
include(":a", ":b", ":c")
""")
withFile("buildSrc/$defaultBuildKotlinFileName", """

withBuildScriptIn("buildSrc", """
plugins {
java
`kotlin-dsl` apply false
}
val kotlinDslProjects = listOf(project.project(":a"), project.project(":b"))
kotlinDslProjects.forEach {
it.apply(plugin = "org.gradle.kotlin.kotlin-dsl")
}
dependencies {
kotlinDslProjects.forEach {
"runtimeOnly"(project(it.path))
}
"runtimeOnly"(project(":a"))
"runtimeOnly"(project(":b"))
}
""")

withFile("buildSrc/a/$defaultBuildKotlinFileName", """
// Duplication in build scripts to avoid Isolated Projects violations without introducing shared build logic
withBuildScriptIn("buildSrc/a", """
plugins {
id("org.gradle.kotlin.kotlin-dsl")
}
$repositoriesBlock
""")
withFile("buildSrc/b/$defaultBuildKotlinFileName", """
withBuildScriptIn("buildSrc/b", """
plugins {
id("org.gradle.kotlin.kotlin-dsl")
}
$repositoriesBlock
dependencies { implementation(project(":c")) }
""")
withFile("buildSrc/c/$defaultBuildKotlinFileName", """
withBuildScriptIn("buildSrc/c", """
plugins { java }
$repositoriesBlock
""")
Expand Down

0 comments on commit dba00b8

Please sign in to comment.