-
Notifications
You must be signed in to change notification settings - Fork 5k
A bunch of improvements to the build init plugin #6489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or 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
… build init generator implementation and apply as a decoration instead.
…own options or unsupported combinations of options.
…w the name of the generated project to be specified.
… package used for generated source files to be specified.
… that were not specified on the command-line.
…when they enter a value that isn't valid for the question. Add some test coverage for user prompting.
…emon and no-daemon execution. Instead, the test runs with whichever execution the current test suite is using, and all of the execution modes will be covered at least once in various stages of CI.
…so that it lives in only one place. The flag is still on `StartParameter` but is unused and should later be deprecated and removed.
…dlib in generated kotlin projects.
… used by the `init` task. Ideally, the console infrastructure would better handle the prompts but this requires some deeper changes. The work-arounds allow us to try out the interactive behaviour and can be fixed later.
…verting a Maven build. - Do not suggest `pom` as a build type when there is no `pom.xml` present, as the conversion makes no sense in this case. - Do not prompt for a DSL or project name when converting a Maven build, as these are not supported or ignored by the Maven build conversion. - When the `--project` or `--package` options are used with the `init` task, fail when the selected build type does not support these options, e.g. when converting to Maven build.
…ownloading all of the external tools on each test invocation.
…s present in the current directory, by first asking the user if they would like to generate a Gradle build for the Maven build. If the user answers 'yes', proceed without asking any further questions. If the user answers 'no', only then ask the user to select which type of build they would like to create.
…izers that generate a Gradle build from some existing build and those that generate a new build an supporting files from scratch.
…build's root directory.
… is derived from the project name, rather than an empty package name.
…ture to generate the Gradle settings file for a Maven build, rather than creating a string with ad hoc formatting.
…cture to generate part of the root build script when generating a Gradle build from a Maven build.
…the Gradle build scripts when converting a Maven build.
…the Gradle build scripts when converting a Maven build.
…the Gradle build scripts when converting a Maven build.
…the Gradle build scripts when converting a Maven build.
…the Gradle build scripts when converting a Maven build.
…ndencies in the Gradle build scripts when converting a Maven build.
…n from a Maven build.
…o generate all build and settings scripts, including for Maven build conversion.
This was referenced Aug 23, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
This PR contains a bunch of changes to the build init plugin implemented to fill in time on some long haul flights. And to improve the bootstrap experience of course.
gradle init
is run from an interactive console..gitignore
file.BuildScriptBuilder
infrastructure for Maven conversion. For now, this just means more consistent formatting in the generated scripts, but later will make it much easier to generate Kotlin DSL scripts instead.UserInputHandler
service to allow prompting the user with various kinds of questions. This could later evolve into a public service.init
task on validation failures.Contributor Checklist
<subproject>/src/integTest
) to verify changes from a user perspective<subproject>/src/test
) to verify logic./gradlew <changed-subproject>:check
Gradle Core Team Checklist