-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Applied workaroung for "Cannot include build" using the release plugin
with composite builds (convention plugins).
- Loading branch information
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,6 @@ pluginManagement { | |
mavenCentral() | ||
gradlePluginPortal() | ||
} | ||
includeBuild("build-logic") | ||
} | ||
|
||
plugins { | ||
|