[Git][java-team/gradle-completion][master] 12 commits: New upstream version 1.4.0
Emmanuel Bourg (@ebourg)
gitlab at salsa.debian.org
Mon Nov 16 18:20:18 GMT 2026
Emmanuel Bourg pushed to branch master at Debian Java Maintainers / gradle-completion
Commits:
1cf66412 by Emmanuel Bourg at 2026-11-16T18:16:21+01:00
New upstream version 1.4.0
- - - - -
54f789a4 by Emmanuel Bourg at 2026-11-16T18:16:21+01:00
New upstream version 1.4.1
- - - - -
32a5e475 by Ayusman Nanda at 2026-11-16T19:15:00+01:00
Install zsh completion file (Closes: #920134)
- - - - -
527c7e31 by Emmanuel Bourg at 2026-11-16T19:15:00+01:00
Marked the package Multi-Arch: foreign
- - - - -
2ba2611c by Emmanuel Bourg at 2026-11-16T19:15:00+01:00
Converted debian/watch to the version 5 format
- - - - -
d58c8a6c by Emmanuel Bourg at 2026-11-16T19:15:01+01:00
Standards-Version updated to 4.7.4
- - - - -
12c530bb by Emmanuel Bourg at 2026-11-16T19:15:01+01:00
Removed the Priority field
- - - - -
0125b921 by Emmanuel Bourg at 2026-11-16T19:15:01+01:00
Switch to debhelper level 13
- - - - -
a8802bfe by Emmanuel Bourg at 2026-11-16T19:15:01+01:00
Update upstream source from tag 'upstream/1.4.1'
- - - - -
f3620649 by Emmanuel Bourg at 2026-11-16T19:15:08+01:00
Fixed CVE-2026-25063: Command injection in the Bash completion (Closes: #1126696)
- - - - -
cf11222d by Emmanuel Bourg at 2026-11-16T19:17:54+01:00
Wrap and sort
- - - - -
19ee2339 by Emmanuel Bourg at 2026-11-16T19:18:08+01:00
Upload to unstable
- - - - -
11 changed files:
- + CONTRIBUTING.md
- README.md
- _gradle
- debian/changelog
- − debian/compat
- debian/control
- + debian/install
- + debian/patches/CVE-2026-25063.patch
- + debian/patches/series
- debian/watch
- gradle-completion.bash
Changes:
=====================================
CONTRIBUTING.md
=====================================
@@ -0,0 +1,107 @@
+## Accept Developer Certificate of Origin
+
+In order for your contributions to be accepted, you must [sign off](https://git-scm.com/docs/git-commit#git-commit---signoff) your Git commits to indicate that you agree to the terms of [Developer Certificate of Origin](https://developercertificate.org/).
+
+## Follow the Code of Conduct
+
+In order to foster a more inclusive community, Gradle has adopted the [Contributor Covenant](https://www.contributor-covenant.org/version/1/4/code-of-conduct/).
+
+Contributors must follow the Code of Conduct outlined at [https://gradle.org/conduct/](https://gradle.org/conduct/).
+
+## Making Changes
+
+### Development setup
+
+You can test local changes to `gradle-completion.bash` by executing
+
+```bash
+source path/to/gradle-completion.bash
+```
+
+and then using completion as normal.
+
+For ZSH, set your `fpath` to point to the cloned git repository
+
+```bash
+export fpath=($HOME/src/your_user/gradle-completion \$fpath)
+```
+
+Then execute `unfunction _gradle && autoload -U _gradle` to reload the gradle completion function, after which you can try completion as normal.
+
+### Debugging
+
+You can get a debug trace of zsh completion by typing `Ctrl-X ?` instead of hitting `[TAB]`. That is especially helpful when submitting bug reports.
+
+Here's a handy [how-to on bash completion](https://iridakos.com/tutorials/2018/03/01/bash-programmable-completion-tutorial.html) and [zsh completion reference](https://github.com/zsh-users/zsh-completions/blob/master/zsh-completions-howto.org).
+
+## Updating Homebrew formula
+Updating the `gradle-completion` formula for Homebrew takes extra setup to perform all of the verification Homebrew requires.
+
+First you will need to ensure you can build native ruby gem extensions necessary for `brew audit`:
+
+```
+xcode-select --install
+brew vendor-install ruby
+
+# Check for any homebrew issues
+brew doctor
+
+# Add this to your environment
+export PATH="/usr/local/opt/ruby/bin:$PATH"
+export LDFLAGS="-L/usr/local/opt/ruby/lib"
+export CPPFLAGS="-I/usr/local/opt/ruby/include"
+export PKG_CONFIG_PATH="/usr/local/opt/ruby/lib/pkgconfig"
+```
+
+Ensure you have created a release tag on GitHub for `VERSION`.
+
+```
+export GRADLE_COMPLETION_VERSION="1.4.1"
+wget "https://github.com/gradle/gradle-completion/archive/v${GRADLE_COMPLETION_VERSION}.tar.gz"
+cat "vgradle-completion-${GRADLE_COMPLETION_VERSION}.tar.gz" | shasum -a 256 | awk '{print $1}'
+
+# Use brew tools to audit and create PR to homebrew/core
+brew bump-formula-pr --url=https://github.com/gradle/gradle-completion/archive/v<VERSION>.tar.gz --sha256=<SHA_256> gradle-completion
+```
+
+### Creating Commits And Writing Commit Messages
+
+The commit messages that accompany your code changes are an important piece of documentation, please follow these guidelines when writing commit messages:
+
+* Keep commits discrete: avoid including multiple unrelated changes in a single commit
+* Keep commits self-contained: avoid spreading a single change across multiple commits. A single commit should make sense in isolation
+* If your commit pertains to a GitHub issue, include (`Issue: #123`) in the commit message on a separate line
+* [Sign off](https://git-scm.com/docs/git-commit#git-commit---signoff) your commits to indicate that you agree to the terms of [Developer Certificate of Origin](https://developercertificate.org/).
+
+### Submitting Your Change
+
+After you submit your pull request, a Gradle core developer will review it. It is normal that this takes several iterations, so don't get discouraged by change requests. They ensure the high quality that we all enjoy.
+
+If you need to check on CI status as an external contributor, login as a guest.
+
+### Signing Off Commits After Submitting a Pull Request
+
+Pull requests are automatically verified that all commit messages contain the Signed-off-by line with an email address that matches the commit author. In case you didn't sign off your commits before creating a pull request, you can still fix that to confirm that you agree to the terms of [Developer Certificate of Origin](https://developercertificate.org/).
+
+To sign off a single commit:
+
+`git commit --amend --signoff`
+
+To sign off one or multiple commits:
+
+`git filter-branch --msg-filter "cat - && echo && echo 'Signed-off-by: Your Name <Your.Name at example.com>'" HEAD`
+
+Then force push your branch:
+
+`git push --force origin test-branch`
+
+## Getting Help
+
+If you run into any trouble, please reach out to us on the issue you are working on.
+
+## Our Thanks
+
+We deeply appreciate your effort toward improving Gradle. For any contribution, large or small, you will be immortalized in the release notes for the version you've contributed to.
+
+If you enjoyed this process, perhaps you should consider getting [paid to develop Gradle](https://gradle.com/careers)?
+
=====================================
README.md
=====================================
@@ -55,10 +55,10 @@ source ~/.zsh/gradle-completion/_gradle 1>&2 2>/dev/null; __gradle-completion-in
### Install via [Homebrew](https://brew.sh)
```
-brew install bash-completion gradle-completion
+brew install gradle-completion
# Source completion scripts from bash-completion in your bash profile
-echo '[ -f $(brew --prefix)/etc/bash_completion ] && . $(brew --prefix)/etc/bash_completion' >> ~/.bash_profile
+echo '[[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh"' >> ~/.bash_profile
# Load changes to bash profile
source ~/.bash_profile
@@ -72,7 +72,7 @@ mkdir $HOME/bash_completion.d
curl -LA gradle-completion https://edub.me/gradle-completion-bash -o $HOME/bash_completion.d/gradle-completion.bash
```
-Ensure `bash-completion` 1.2+ is installed using your favorite package manager or by following the [bash-completion installation instructions](https://github.com/scop/bash-completion/blob/master/README.md#installation).
+NOTE: Ensure `bash-completion` 1.2+ is installed using your favorite package manager or by following the [bash-completion installation instructions](https://github.com/scop/bash-completion/blob/master/README.md#installation).
Add the following to your `.bash_profile` (macOS) or `.bashrc` (Linux) file:
```
@@ -161,8 +161,9 @@ may be disabled. Enable it by adding the following to your `~/.zshrc` file:
zstyle ':completion:*' use-cache on
```
-You can get a debug trace of zsh completion by typing `Ctrl-X ?` instead of hitting `[TAB]`. That is especially helpful
-when submitting bug reports.
+## Contributing
+
+See the [contributing guide](CONTRIBUTING.md).
## Acknowledgements
Bash completion is inspired by [Nolan Lawson's Gradle tab completion for bash](https://gist.github.com/nolanlawson/8694399).
@@ -171,7 +172,7 @@ Zsh completion is an improved version of [zsh](https://github.com/zsh-users/zsh)
Current improvements over built-in support:
- Subproject tasks are completed
- - Gradle CLI options are current as of Gradle 4.1
+ - Gradle CLI options are current as of Gradle 5.2
- Common Gradle properties are completed
- Handles default build file as specified in settings.gradle
- ~20x faster completion speed for medium to large projects
=====================================
_gradle
=====================================
@@ -4,7 +4,7 @@ __gradle-set-project-root-dir() {
local dir=`pwd`
project_root_dir=`pwd`
while [[ $dir != '/' ]]; do
- if [[ -f "$dir/settings.gradle" || -f "$dir/gradlew" ]]; then
+ if [[ -f "$dir/settings.gradle" || -f "$dir/settings.gradle.kts" || -f "$dir/gradlew" ]]; then
project_root_dir=$dir
return 0
fi
@@ -18,16 +18,31 @@ __gradle-init-cache-dir() {
mkdir -p $cache_dir
}
+__gradle-set-settings-file() {
+ # In order of precedence: --settings-file=filename, settings.gradle, settings.gradle.kts
+
+ local default_gradle_settings_file="$project_root_dir/settings.gradle"
+ if [[ ! -f $default_gradle_settings_file ]]; then
+ default_gradle_settings_file="$project_root_dir/settings.gradle.kts"
+ fi
+ gradle_settings_file=${${(v)opt_args[(i)-c|--settings-file]}:-$default_gradle_settings_file}
+}
+
__gradle-set-build-file() {
- # Look for default build script in the settings file (settings.gradle by default)
- # Otherwise, default is the file 'build.gradle' in the current directory.
- local gradle_settings_file=${${(v)opt_args[(i)-c|--settings-file]}:-"$project_root_dir/settings.gradle"}
- local default_gradle_build_file="$project_root_dir/build.gradle"
+ __gradle-set-settings-file
+ # In order of precedence: --build-file=filename, rootProject.buildFileName, build.gradle, build.gradle.kts
- if [[ -f $gradle_settings_file ]]; then
- default_gradle_build_file=${$(grep "^rootProject\.buildFileName" $gradle_settings_file | \
+ local default_gradle_build_file_name="build.gradle"
+ if [[ -r $gradle_settings_file ]]; then
+ default_gradle_build_file_name=${$(grep "^rootProject\.buildFileName" $gradle_settings_file | \
sed -n -e "s/rootProject\.buildFileName = [\'\"]\(.*\)[\'\"]/\1/p")}
- default_gradle_build_file="$project_root_dir/${default_gradle_build_file:-build.gradle}"
+
+ default_gradle_build_file_name="${default_gradle_build_file:-build.gradle}"
+ fi
+
+ local default_gradle_build_file="$project_root_dir/$default_gradle_build_file_name"
+ if [[ ! -f $default_gradle_build_file ]]; then
+ default_gradle_build_file="$project_root_dir/build.gradle.kts"
fi
# If a build file is specified after '-b' or '--build-file', use this file.
@@ -54,7 +69,7 @@ __gradle-set-files-checksum() {
__gradle-generate-script-cache() {
# Invalidate cache after 3 weeks by default
local cache_ttl_mins=${$(echo $GRADLE_CACHE_TTL_MINUTES):-30240}
- local script_exclude_pattern=${$(echo $GRADLE_COMPLETION_EXCLUDE_PATTERN):-"/(build|integTest|out)/"}
+ local script_exclude_pattern=${$(echo $GRADLE_COMPLETION_EXCLUDE_PATTERN):-"/(.git|build|integTest|samples|templates|smokeTest|testFixtures|out)/"}
if [[ ! $(find $cache_dir/$cache_name -mmin -$cache_ttl_mins 2>/dev/null) ]]; then
zle -R "Generating Gradle build script cache"
# Cache all Gradle scripts
@@ -79,9 +94,9 @@ __gradle-generate-tasks-cache() {
# Reuse Gradle Daemon if IDLE but don't start a new one.
local gradle_tasks_output
if [[ ! -z "$($gradle_cmd --status 2>/dev/null | grep IDLE)" ]]; then
- gradle_tasks_output="$($gradle_cmd --daemon --build-file $gradle_build_file -q tasks --all)"
+ gradle_tasks_output="$($gradle_cmd --daemon --build-file $gradle_build_file -q tasks --all 2>/dev/null)"
else
- gradle_tasks_output="$($gradle_cmd --no-daemon --build-file $gradle_build_file -q tasks --all)"
+ gradle_tasks_output="$($gradle_cmd --no-daemon --build-file $gradle_build_file -q tasks --all 2>/dev/null)"
fi
local gradle_all_tasks="" root_tasks="" subproject_tasks="" output_line
local -a match
@@ -180,12 +195,12 @@ __gradle_subcommand() {
case "$words[1]" in
(dependencies)
_arguments \
- '--configuration[The configuration to generate the report for.]' && ret=0
+ '--configuration=[The configuration to generate the report for.]:dependency configuration:_gradle_dependency_configurations' && ret=0
;;
(dependencyInsight)
_arguments \
- '--dependency[Shows the details of given dependency.]' \
- '--configuration[Looks for the dependency in given configuration.]' && ret=0
+ '--dependency=[Shows the details of given dependency.]' \
+ '--configuration=[Looks for the dependency in given configuration.]:dependency configuration:_gradle_dependency_configurations' && ret=0
;;
(help)
_arguments \
@@ -193,17 +208,30 @@ __gradle_subcommand() {
;;
(init)
_arguments \
- '--type=[Project type to generate.]:*:project type:(basic groovy-application groovy-library java-library pom scala-library)' && ret=0
+ '--dsl=[DSL to be used in generated scripts.]:dsl:(groovy kotlin)' \
+ '--package=[Package for the generated source.]' \
+ '--project-name=[Name of the generated project.]' \
+ '--test-framework=[Test framework to be used.]:test framework:(junit kotlintest scalatest spock testng)' \
+ '--type=[Project type to generate.]:project type:(basic cpp-application cpp-library groovy-application groovy-library java-application java-library kotlin-application kotlin-library pom scala-library)' && ret=0
;;
(tasks)
_arguments \
- '--all[List all tasks, including subproject tasks]' && ret=0
+ '--all[List all tasks, including subproject tasks.]' \
+ '--group=[Show tasks only from given task group.]' && ret=0
+ ;;
+ (test)
+ _arguments -C \
+ '--debug-jvm[Enable debugging for the test process. The process is started suspended and listening on port 5005. Requires the "java" plugin.]' \
+ '--fail-fast[Stops test execution after the first failed test. Requires the "java" plugin.]' \
+ '--tests=[Sets test class or method name to be included, * is supported. Requires the "java" plugin.]' \
+ '(-)*:: :->task-or-option' && ret=0
;;
(wrapper)
_arguments \
'--distribution-type=[Binary-only or all with docs and sources]:*:distribution type:(bin all)' \
'--gradle-version=[Set Gradle version for wrapper]' \
- '--gradle-distribution-url[Set Gradle distribution URL]' && ret=0
+ '--gradle-distribution-sha256-sum=[SHA-256 checksum]' \
+ '--gradle-distribution-url=[Set Gradle distribution URL]' && ret=0
;;
(*)
_arguments -C \
@@ -225,7 +253,8 @@ __gradle_subcommand() {
'-Dorg.gradle.java.home=[Set JDK home dir.]' \
'-Dorg.gradle.logging.level=[Set default Gradle log level.]:log level:(quiet warn lifecycle info debug)' \
'-Dorg.gradle.parallel=[Set true to enable parallel project builds.]:enable parallel build:(true false)' \
- '-Dorg.gradle.parallel.intra=[Set true to enable intra-project parallel builds.]' \
+ '-Dorg.gradle.priority=[Set priority for Gradle worker processes.]:priority:(low normal)' \
+ '-Dorg.gradle.warning.mode=[Set types of warnings to log.]:warning level:(all summary none)' \
'-Dorg.gradle.workers.max=[Set the number of workers Gradle is allowed to use.]' \
'(-i --info -w --warn -q --quiet)'{-d,--debug}'[Log in debug mode (includes normal stacktrace).]' \
'(--no-daemon)--daemon[Uses the Gradle daemon to run the build. Starts the daemon if not running.]' \
@@ -247,6 +276,7 @@ __gradle_subcommand() {
{-p,--project-dir}'[Specifies the start directory for Gradle.]:start directory:_directories' \
'(--no-parallel)--parallel[Build projects in parallel. Gradle will attempt to determine the optimal number of executor threads to use.]' \
'--profile[Profiles build execution time and generates a report in the <build_dir>/reports/profile directory.]' \
+ '--priority[Set priority for Gradle worker processes.]:priority:(low normal)' \
'--project-cache-dir[Specifies the project-specific cache directory.]:cache directory:_directories' \
'(-d --debug -w --warn -i --info)'{-q,--quiet}'[Log errors only.]' \
'--recompile-scripts[Force build script recompiling.]' \
@@ -259,7 +289,10 @@ __gradle_subcommand() {
'--system-prop[system property (prop=val)]' \
{-t,--continuous}'[Enables continuous build. Gradle does not exit and will re-execute tasks when task file inputs change.]' \
{-u,--no-search-upward}"[Don't search in parent folders for a settings.gradle file.]" \
+ '(--write-locks)--update-locks[Perform a partial update of the dependency lock.]' \
'(-d --debug -q --quiet -i --info)'{-w,--warn}'[Log warnings and errors only.]' \
+ '--warning-mode=[Set types of warnings to log.]:warning mode:(all summary none)' \
+ '(--update-locks)--write-locks[Persists dependency resolution for locked configurations.]' \
{-x,--exclude-task}'[Specify a task to be excluded from execution.]' && ret=0
;;
esac
@@ -267,6 +300,18 @@ __gradle_subcommand() {
return ret
}
+(( $+functions[_gradle_dependency_configurations] )) ||
+_gradle_dependency_configurations() {
+ local configurations
+ configurations=(
+ 'compileClasspath'
+ 'runtimeClasspath'
+ 'testCompileClasspath'
+ 'testRuntimeClasspath'
+ )
+ _describe -t 'dependency configurations' "dependency configuration" configurations
+}
+
_gradle() {
local cur=${words[CURRENT]}
local curcontext="$curcontext" state
@@ -292,8 +337,9 @@ _gradle() {
'-Dorg.gradle.jvmargs=[Set JVM arguments.]' \
'-Dorg.gradle.java.home=[Set JDK home dir.]' \
'-Dorg.gradle.logging.level=[Set default Gradle log level.]:log level:(quiet warn lifecycle info debug)' \
- '-Dorg.gradle.parallel=[Set true to enable parallel project builds.]' \
- '-Dorg.gradle.parallel.intra=[Set true to enable intra-project parallel builds.]' \
+ '-Dorg.gradle.parallel=[Set true to enable parallel project builds.]:(true false)' \
+ '-Dorg.gradle.priority=[Set priority for Gradle worker processes.]:priority:(low normal)' \
+ '-Dorg.gradle.warning.mode=[Set types of warnings to log.]:warning level:(all summary none)' \
'-Dorg.gradle.workers.max=[Set the number of workers Gradle is allowed to use.]' \
'(-i --info -w --warn -q --quiet)'{-d,--debug}'[Log in debug mode (includes normal stacktrace).]' \
'(--no-daemon)--daemon[Uses the Gradle daemon to run the build. Starts the daemon if not running.]' \
@@ -315,8 +361,9 @@ _gradle() {
\*{-P+,--project-prop}'[Set project property for the build script (e.g. -Pmyprop=myvalue).]:project property (prop=val):->argument-expected' \
{-p,--project-dir}'[Specifies the start directory for Gradle.]:start directory:_directories:->argument-expected' \
'(--no-parallel)--parallel[Build projects in parallel. Gradle will attempt to determine the optimal number of executor threads to use.]' \
+ '--priority=[Set priority for Gradle worker processes.]:priority:(low normal)' \
'--profile[Profiles build execution time and generates a report in the <build_dir>/reports/profile directory.]' \
- '--project-cache-dir[Specifies the project-specific cache directory.]:cache directory:_directories:->argument-expected' \
+ '--project-cache-dir=[Specifies the project-specific cache directory.]:cache directory:_directories:->argument-expected' \
'(-d --debug -w --warn -i --info)'{-q,--quiet}'[Log errors only.]' \
'--recompile-scripts[Force build script recompiling.]' \
'--refresh[Refresh the state of resources of the type(s) specified.]:refresh policy:(dependencies)' \
@@ -330,8 +377,11 @@ _gradle() {
'--system-prop[system property (prop=val)]' \
{-t,--continuous}'[Enables continuous build. Gradle does not exit and will re-execute tasks when task file inputs change.]' \
{-u,--no-search-upward}"[Don't search in parent folders for a settings.gradle file.]" \
+ '(--write-locks)--update-locks[Perform a partial update of the dependency lock.]' \
'(-)'{-v,--version}'[Print version info.]' \
'(-d --debug -q --quiet -i --info)'{-w,--warn}'[Log warnings and errors only.]' \
+ '--warning-mode=[Set types of warnings to log.]:warning mode:(all summary none)' \
+ '(--update-locks)--write-locks[Persists dependency resolution for locked configurations.]' \
{-x,--exclude-task}'[Specify a task to be excluded from execution.]' \
'(-)*:: :->task-or-option' && ret=0
=====================================
debian/changelog
=====================================
@@ -1,3 +1,24 @@
+gradle-completion (1.4.1-1) unstable; urgency=medium
+
+ * Team upload.
+
+ [ Debian Janitor ]
+ * Marked the package Multi-Arch: foreign
+
+ [ Ayusman Nanda ]
+ * Install the Zsh completion file (Closes: #920134)
+
+ [ Emmanuel Bourg ]
+ * New upstream release
+ * Fixed CVE-2026-25063: Command injection in the Bash completion
+ (Closes: #1126696)
+ * Converted debian/watch to the version 5 format
+ * Standards-Version updated to 4.7.4
+ * Removed the Priority field
+ * Switch to debhelper level 13
+
+ -- Emmanuel Bourg <ebourg at apache.org> Mon, 16 Nov 2026 19:17:59 +0100
+
gradle-completion (1.3.1-1) unstable; urgency=medium
* Initial release. (Closes: #900951)
=====================================
debian/compat deleted
=====================================
@@ -1 +0,0 @@
-9
\ No newline at end of file
=====================================
debian/control
=====================================
@@ -1,19 +1,18 @@
Source: gradle-completion
Section: java
-Priority: optional
Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
Uploaders: Hans-Christoph Steiner <hans at eds.org>
-Build-Depends: debhelper (>= 9~),
- bash-completion,
-Standards-Version: 4.3.0
+Build-Depends:
+ debhelper-compat (= 13),
+ bash-completion
+Standards-Version: 4.7.4
Vcs-Git: https://salsa.debian.org/java-team/gradle-completion.git
Vcs-Browser: https://salsa.debian.org/java-team/gradle-completion
Homepage: https://github.com/gradle/gradle-completion
Package: gradle-completion
Architecture: all
-Depends: ${misc:Depends},
- bash-completion,
+Depends: ${misc:Depends}, bash-completion
Suggests: gradle
Multi-Arch: foreign
Description: Bash and Zsh completion support for Gradle
=====================================
debian/install
=====================================
@@ -0,0 +1 @@
+_gradle usr/share/zsh/vendor-completions/
=====================================
debian/patches/CVE-2026-25063.patch
=====================================
@@ -0,0 +1,78 @@
+Description: Fix CVE-2026-25063: command injection in the Bash completion
+ The task names and descriptions read from the build were evaluated by the
+ shell when the completion list was built.
+Author: Reinhold Degenfellner <rdegenfellner at gradle.com>
+Origin: backport, https://github.com/gradle/gradle-completion/commit/f0034a8a44b8191e5b764cf9b0211cade6ee55d7
+Bug-Debian: https://bugs.debian.org/1126696
+--- a/gradle-completion.bash
++++ b/gradle-completion.bash
+@@ -196,11 +196,11 @@
+ local cached_checksum="$(cat "$cache_dir/$cache_name.md5")"
+ local -a cached_tasks
+ if [[ -z "$cur" ]]; then
+- cached_tasks=( $(cat "$cache_dir/$cached_checksum") )
++ readarray -t cached_tasks < <(cat "$cache_dir/$cached_checksum")
+ else
+- cached_tasks=( $(grep "^$cur" "$cache_dir/$cached_checksum") )
++ readarray -t cached_tasks < <(grep "^$cur" "$cache_dir/$cached_checksum")
+ fi
+- COMPREPLY=( $(compgen -W "${cached_tasks[*]}" -- "$cur") )
++ COMPREPLY=( "${cached_tasks[@]}" )
+ else
+ __gradle-notify-tasks-cache-build
+ fi
+@@ -282,18 +282,39 @@
+ local -a gradle_all_tasks=()
+ local -a root_tasks=()
+ local -a subproject_tasks=()
++ local OLDIFS="$IFS"
++ IFS=$'\n'
+ for output_line in ${gradle_tasks_output}; do
+- if [[ "$output_line" =~ ^([[:lower:]][[:alnum:][:punct:]]*)([[:space:]]-[[:space:]]([[:print:]]*))? ]]; then
++ # The forbidden characters should be aligned with this variable org.gradle.util.internal.NameValidator.FORBIDDEN_CHARACTERS in the gradle/gradle repo
++ if [[ "$output_line" =~ ^([[:alpha:]][^/\\:<>\"?*|]*)\ -\ (.*)$ ]]; then
++ # Task with description (exclude forbidden gradle chars: /, \, :, <, >, ", ?, *, |)
+ task_name="${BASH_REMATCH[1]}"
+- task_description="${BASH_REMATCH[3]}"
++ task_description="${BASH_REMATCH[2]}"
++ elif [[ "$output_line" =~ ^([[:alpha:]][^/\\:<>\"?*|]*)$ ]]; then
++ # Task without description (exclude forbidden gradle chars)
++ task_name="${BASH_REMATCH[1]}"
++ task_description=""
++ else
++ continue
++ fi
++
++ # No escaping needed - tasks are used directly without shell evaluation
++ if [[ -n "$task_description" ]]; then
+ gradle_all_tasks+=( "$task_name - $task_description" )
+- # Completion for subproject tasks with ':' prefix
+- if [[ "$task_name" =~ ^([[:alnum:][:punct:]]+):([[:alnum:]]+) ]]; then
++ else
++ gradle_all_tasks+=( "$task_name" )
++ fi
++
++ # Completion for subproject tasks with ':' prefix
++ if [[ "$task_name" =~ ^([[:alpha:]][^/\\:<>\"?*|]*):([[:alnum:]_]+)$ ]]; then
++ if [[ -n "$task_description" ]]; then
+ gradle_all_tasks+=( ":$task_name - $task_description" )
+- subproject_tasks+=( "${BASH_REMATCH[2]}" )
+ else
+- root_tasks+=( "$task_name" )
++ gradle_all_tasks+=( ":$task_name" )
+ fi
++ subproject_tasks+=( "${BASH_REMATCH[2]}" )
++ else
++ root_tasks+=( "$task_name" )
+ fi
+ done
+
+@@ -306,6 +327,8 @@
+ done
+ fi
+
++ IFS="$OLDIFS"
++
+ printf "%s\n" "${gradle_all_tasks[@]}" >| "$cache_dir/$gradle_files_checksum"
+ echo "$gradle_files_checksum" >| "$cache_dir/$cache_name.md5"
+ }
=====================================
debian/patches/series
=====================================
@@ -0,0 +1 @@
+CVE-2026-25063.patch
=====================================
debian/watch
=====================================
@@ -1,2 +1,5 @@
-version=4
-https://github.com/gradle/gradle-completion/tags /gradle/gradle-completion/archive/v at ANY_VERSION@.tar.gz
+Version: 5
+Mode: git
+Source: https://github.com/gradle/gradle-completion
+Matching-Pattern: refs/tags/v([\d.]+)
+Compression: xz
=====================================
gradle-completion.bash
=====================================
@@ -6,7 +6,7 @@ __gradle-set-project-root-dir() {
local dir=$(pwd)
project_root_dir=$(pwd)
while [[ "$dir" != '/' ]]; do
- if [[ -f "$dir/settings.gradle" || -f "$dir/gradlew" ]]; then
+ if [[ -f "$dir/settings.gradle" || -f "$dir/settings.gradle.kts" || -f "$dir/gradlew" ]]; then
project_root_dir="$dir"
return 0
fi
@@ -20,14 +20,30 @@ __gradle-init-cache-dir() {
mkdir -p "$cache_dir"
}
+__gradle-set-settings-file() {
+ # In order of precedence: --settings-file=filename, settings.gradle, settings.gradle.kts
+
+ local default_gradle_settings_file="$project_root_dir/settings.gradle"
+ if [[ ! -f $default_gradle_settings_file ]]; then
+ default_gradle_settings_file="$project_root_dir/settings.gradle.kts"
+ fi
+ gradle_settings_file=$default_gradle_settings_file
+}
+
__gradle-set-build-file() {
- # Look for default build script in the settings file (settings.gradle by default)
- # Otherwise, default is the file 'build.gradle' in the current directory.
- gradle_build_file="$project_root_dir/build.gradle"
- if [[ -f "$project_root_dir/settings.gradle" ]]; then
- local build_file_name=$(grep "^rootProject\.buildFileName" "$project_root_dir/settings.gradle" | \
- sed -n -e "s/rootProject\.buildFileName = [\'\"]\(.*\)[\'\"]/\1/p")
- gradle_build_file="$project_root_dir/${build_file_name:-build.gradle}"
+ __gradle-set-settings-file
+ # In order of precedence: --build-file=filename, rootProject.buildFileName, build.gradle, build.gradle.kts
+
+ local default_gradle_build_file_name="build.gradle"
+ if [[ -f $gradle_settings_file ]]; then
+ local build_file_name=$(grep "^rootProject\.buildFileName" $gradle_settings_file | \
+ sed -n -e "s/rootProject\.buildFileName = [\'\"]\(.*\)[\'\"]/\1/p")
+ default_gradle_build_file_name="${build_file_name:-build.gradle}"
+ fi
+
+ gradle_build_file="$project_root_dir/$default_gradle_build_file_name"
+ if [[ ! -f $gradle_build_file ]]; then
+ gradle_build_file="$project_root_dir/build.gradle.kts"
fi
}
@@ -50,7 +66,7 @@ __gradle-set-files-checksum() {
__gradle-generate-script-cache() {
# Invalidate cache after 3 weeks by default
local cache_ttl_mins=${GRADLE_CACHE_TTL_MINUTES:-30240}
- local script_exclude_pattern=${GRADLE_COMPLETION_EXCLUDE_PATTERN:-"/(build|integTest|out)/"}
+ local script_exclude_pattern=${GRADLE_COMPLETION_EXCLUDE_PATTERN:-"/(.git|build|integTest|samples|templates|smokeTest|testFixtures|out)/"}
if [[ ! $(find "$cache_dir/$cache_name" -mmin "-${cache_ttl_mins}" 2>/dev/null) ]]; then
# Cache all Gradle scripts
@@ -64,7 +80,7 @@ __gradle-long-options() {
_get_comp_words_by_ref -n : cur
local args="--build-cache - Enables the Gradle build cache
---build-file - Specifies the build file
+--build-file= - Specifies the build file
--configure-on-demand - Only relevant projects are configured
--console= - Type of console output to generate (plain auto rich verbose)
--continue - Continues task execution after a task failure
@@ -72,40 +88,45 @@ __gradle-long-options() {
--daemon - Use the Gradle Daemon
--debug - Log at the debug level
--dry-run - Runs the build with all task actions disabled
---exclude-task - Specify a task to be excluded
+--exclude-task= - Specify a task to be excluded
--full-stacktrace - Print out the full (very verbose) stacktrace
---gradle-user-home - Specifies the Gradle user home directory
+--gradle-user-home= - Specifies the Gradle user home directory
--gui - Launches the Gradle GUI app (Deprecated)
--help - Shows a help message
---include-build - Run the build as a composite, including the specified build
+--include-build= - Run the build as a composite, including the specified build
--info - Set log level to INFO
---init-script - Specifies an initialization script
---max-workers - Set the maximum number of workers that Gradle may use
+--init-script= - Specifies an initialization script
+--max-workers= - Set the maximum number of workers that Gradle may use
--no-build-cache - Do not use the Gradle build cache
--no-configure-on-demand - Disables configuration on demand
--no-daemon - Do not use the Gradle Daemon
--no-parallel - Disables parallel execution to build projects
--no-rebuild - Do not rebuild project dependencies
--no-scan - Do not create a build scan
---no-search-upwards - Do not search in parent directories for a settings.gradle
+--no-search-upwards - Do not search parent directories for a settings.gradle (removed)
--offline - Build without accessing network resources
--parallel - Build projects in parallel
--profile - Profile build time and create report
---project-cache-dir - Specifies the project-specific cache directory
---project-dir - Specifies the start directory for Gradle
+--priority= - Set priority for Gradle worker processes (low normal)
+--project-cache-dir= - Specifies the project-specific cache directory
+--project-dir= - Specifies the start directory for Gradle
--project-prop - Sets a project property of the root project
--quiet - Log errors only
--recompile-scripts - Forces scripts to be recompiled, bypassing caching
--refresh-dependencies - Refresh the state of dependencies
--rerun-tasks - Specifies that any task optimization is ignored
--scan - Create a build scan
---settings-file - Specifies the settings file
+--settings-file= - Specifies the settings file
--stacktrace - Print out the stacktrace also for user exceptions
--status - Print Gradle Daemon status
--stop - Stop all Gradle Daemons
--system-prop - Set a system property
+--update-locks - Perform a partial update of the dependency lock
--version - Prints Gradle version info
---warn - Log warnings and errors only"
+--warn - Log warnings and errors only
+--warning-mode= - Set types of warnings to log (all summary none)
+--write-locks - Persists dependency resolution for locked configurations"
+
COMPREPLY=( $(compgen -W "$args" -- "$cur") )
}
@@ -123,9 +144,10 @@ __gradle-properties() {
-Dorg.gradle.java.home= - Set JDK home dir
-Dorg.gradle.logging.level= - Set default Gradle log level (quiet warn lifecycle info debug)
-Dorg.gradle.parallel= - Set true to enable parallel project builds (incubating)
--Dorg.gradle.parallel.intra= - Set true to enable intra-project parallel builds (incubating)
+-Dorg.gradle.priority= - Set priority for Gradle worker processes (low normal)
+-Dorg.gradle.warning.mode= - Set types of warnings to log (all summary none)
-Dorg.gradle.workers.max= - Set the number of workers Gradle is allowed to use"
- COMPREPLY=( $(compgen -W "$args" -- "$cur}") )
+ COMPREPLY=( $(compgen -W "$args" -- "$cur") )
return 0
}
@@ -146,7 +168,7 @@ __gradle-short-options() {
-q - Log errors only
-s - Print out the stacktrace also for user exceptions
-t - Continuous mode. Automatically re-run build after changes
--u - Do not search in parent directories for a settings.gradle
+-u - Do not search parent directories for a settings.gradle
-v - Prints Gradle version info
-w - Log warnings and errors only
-x - Specify a task to be excluded
View it on GitLab: https://salsa.debian.org/java-team/gradle-completion/-/compare/1eb563cd360fd5c571f2ce1ae86e04d0474b35b6...19ee2339cb06dad5d169589018ed9b2eeca55ea7
--
View it on GitLab: https://salsa.debian.org/java-team/gradle-completion/-/compare/1eb563cd360fd5c571f2ce1ae86e04d0474b35b6...19ee2339cb06dad5d169589018ed9b2eeca55ea7
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20261116/04acb2d7/attachment.htm>
More information about the pkg-java-commits
mailing list