Created
July 15, 2022 09:52
-
-
Save Antimonit/40c56b97c9a77bfd8606501c3fa5bcbb to your computer and use it in GitHub Desktop.
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
// Run `:pluginDependencies`. | |
project(":").apply { | |
buildFile.writeText( | |
""" | |
def container = new PluginDependenciesContainer() | |
ext.pluginDependenciesContainer = container | |
tasks.register("pluginDependencies") { | |
doLast { | |
container.compute() | |
} | |
} | |
""".trimIndent() | |
) | |
} | |
File(rootProject.projectDir, "empty").also { | |
if (!it.exists()) it.mkdir() | |
} | |
include(":empty") | |
project(":empty").apply { | |
buildFile.writeText( | |
""" | |
def transitive = plugins.collect { it.getClass().canonicalName } | |
def dependency = new PluginTransitiveDependency("empty", transitive) | |
def container = (PluginDependenciesContainer) rootProject.ext.pluginDependenciesContainer | |
container.addPlugin(dependency) | |
""".trimIndent() | |
) | |
} | |
listOf( | |
"help-tasks", | |
"project-report", | |
"project-reports", | |
"binary-base", | |
"component-base", | |
"component-model-base", | |
"language-base", | |
"lifecycle-base", | |
"build-dashboard", | |
"reporting-base", | |
"application", | |
"base", | |
"distribution", | |
"groovy-base", | |
"groovy", | |
"java-base", | |
"java-library-distribution", | |
"java-library", | |
"java-platform", | |
"java-test-fixtures", | |
"java", | |
"jvm-ecosystem", | |
"jvm-test-suite", | |
"test-report-aggregation", | |
"version-catalog", | |
"war", | |
"test-suite-base", | |
"publishing", | |
"antlr", | |
"build-init", | |
"wrapper", | |
"checkstyle", | |
"codenarc", | |
"pmd", | |
"ear", | |
"eclipse-wtp", | |
"eclipse", | |
"idea", | |
"visual-studio", | |
"xcode", | |
"ivy-publish", | |
"jacoco-report-aggregation", | |
"jacoco", | |
"assembler-lang", | |
"assembler", | |
"c-lang", | |
"c", | |
"cpp-application", | |
"cpp-lang", | |
"cpp-library", | |
"cpp", | |
"objective-c-lang", | |
"objective-c", | |
"objective-cpp-lang", | |
"objective-cpp", | |
"swift-application", | |
"swift-library", | |
"swiftpm-export", | |
"windows-resource-script", | |
"windows-resources", | |
"maven-publish", | |
"clang-compiler", | |
"gcc-compiler", | |
"microsoft-visual-cpp-compiler", | |
"native-component-model", | |
"native-component", | |
"standard-tool-chains", | |
"groovy-gradle-plugin", | |
"java-gradle-plugin", | |
"validate-external-gradle-plugin", | |
"scala-base", | |
"scala", | |
"signing", | |
"cpp-unit-test", | |
"cunit-test-suite", | |
"cunit", | |
"google-test-test-suite", | |
"google-test", | |
//"xctest", | |
).forEach { pluginName -> | |
File(rootProject.projectDir, pluginName).also { | |
if (!it.exists()) it.mkdir() | |
} | |
include(":$pluginName") | |
project(":$pluginName").apply { | |
buildFile.writeText( | |
""" | |
plugins { | |
id("$pluginName") | |
} | |
def transitive = plugins.collect { it.getClass().canonicalName } | |
def dependency = new PluginTransitiveDependency("$pluginName", transitive) | |
def container = (PluginDependenciesContainer) rootProject.ext.pluginDependenciesContainer | |
container.addPlugin(dependency) | |
""".trimIndent() | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment