Skip to content

Commit

Permalink
Applied workaroung for "Cannot include build" using the release plugin
Browse files Browse the repository at this point in the history
with composite builds (convention plugins).
  • Loading branch information
renelink committed Aug 11, 2024
1 parent ed835f6 commit c522d4c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
29 changes: 29 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,33 @@
import org.gradle.tooling.GradleConnector

plugins {
id("com.link-intersystems.gradle.maven-central-project") version "0.0.4"
id("net.researchgate.release") version "3.0.2"

}

// Work around for Cannot include build 'build-logic' in build '???'. This is not supported yet.
// See /~https://github.com/researchgate/gradle-release/issues/304
configure(listOf(tasks.release, tasks.runBuildTasks)) {
configure {
actions.clear()
doLast {
GradleConnector
.newConnector()
.forProjectDirectory(layout.projectDirectory.asFile)
.connect()
.use { projectConnection ->
val buildLauncher = projectConnection
.newBuild()
.forTasks(*tasks.toTypedArray())
.setStandardInput(System.`in`)
.setStandardOutput(System.out)
.setStandardError(System.err)
gradle.startParameter.excludedTaskNames.forEach {
buildLauncher.addArguments("-x", it)
}
buildLauncher.run()
}
}
}
}
1 change: 0 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ pluginManagement {
mavenCentral()
gradlePluginPortal()
}
includeBuild("build-logic")
}

plugins {
Expand Down

0 comments on commit c522d4c

Please sign in to comment.