forked from gradle/gradle
-
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.
Merge pull request gradle#27264 Gradle-init source package property
Fixes gradle#26219 The `gradle init` task behavior is changed in the following way: - Source package can be specified via Gradle property - Using `org.gradle.buildinit.source.package` Gradle property users can specify package name to use for new projects generated by `gradle init` - The package name can be also empty, resulting in an [unnamed package](https://docs.oracle.com/javase/specs/jls/se8/html/jls-7.html#jls-7.4.2) for sources in subprojects that don't have their own package prefixes like `app` or `lib` - *Before: it was not possible to specify a the source package like that* - When no source package is specified (neither via `init --package` nor via Gradle property) - Interactive dialog does request to provide it - A fixed package name `org.example` is used: `org.example.Main` - For multi-project builds, it's used as a prefix, e.g. `org.example.app.App` - *Before: uses had to answer an interactive question with a default value generated from project name, e.g. `my-toy-project` resulted in `my.toy.project` package default* - For new projects, convention plugins generated in `buildSrc` or `build-logic` - Have a fixed name prefix `buildlogic`, e.g. `buildlogic.java-common-conventions.gradle.kts` - *Before: the source package name was used, e.g. `my.toy.project.java-common-conventions.gradle.kts`* - For Maven-to-Gradle conversions, convention plugins generated in `buildSrc` or `build-logic` - Have a fixed name prefix `buildlogic`, e.g. `buildlogic.java-common-conventions.gradle.kts` - *Before: the Maven's root project group id was used, e.g. `my.toy.project.java-common-conventions.gradle.kts`* Co-authored-by: Alex Semin <asemin@gradle.com>
- Loading branch information
Showing
42 changed files
with
284 additions
and
330 deletions.
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
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
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
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
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
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
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
Oops, something went wrong.