$ ./gradlew :app:bu
build - Assembles and tests this project.
buildDebugPreBundle -
buildDependents - Assembles and tests this project and all projects that depend on it.
buildEnvironment - Displays all buildscript dependencies declared in project :app.
buildKotlinToolingMetadata - Build metadata json file containing information about the used Kotlin tooling
buildNeeded - Assembles and tests this project and all projects it depends on.
buildReleasePreBundle -
bundle - Assemble bundles for all the variants.
bundleDebug - Assembles bundle for variant debug
bundleDebugAndroidTestClassesToCompileJar -
bundleDebugAndroidTestClassesToRuntimeJar -
bundleDebugClassesToCompileJar -
bundleDebugClassesToRuntimeJar -
bundleDebugResources -
bundleDebugUnitTestClassesToCompileJar -
bundleDebugUnitTestClassesToRuntimeJar -
bundleRelease - Assembles bundle for variant release
bundleReleaseClassesToCompileJar -
bundleReleaseClassesToRuntimeJar -
bundleReleaseResources -
bundleReleaseUnitTestClassesToCompileJar -
bundleReleaseUnitTestClassesToRuntimeJar -
having there only build and bundle would be soooo much cleaner. And sub-flavours could be separated with token (., #?) so typing $ ./gradlew :app:bu would yield:
$ ./gradlew :app:bu
build - Assembles and tests this project.
bundle - Assemble bundles for all the variants.
And then afterwards, while making the decission about main/principle tasks and typing (with dot/token/separator): $ ./gradlew :app:build. I would get all the build flavours:
$ ./gradlew :app:build.
DebugPreBundle -
Dependents - Assembles and tests this project and all projects that depend on it.
Environment - Displays all buildscript dependencies declared in project :app.
KotlinToolingMetadata - Build metadata json file containing information about the used Kotlin tooling
Needed - Assembles and tests this project and all projects it depends on.
ReleasePreBundle -
This might make more sense as feature request or pull request to the gradle-completion project.
I think it should be relatively easy to do without changes in Gradle itself.
The tasks you do not initially want to see, should be the “hidden” ones which are listed under “Other tasks” in the output the completion script parses.
So the completion script could see which tasks are in “Other tasks” and which are not and then just provide the “Other” tasks for example if no non-“Other” task matches the typed prefix or if you added the “.” or something like that.
Of course you do not find anything, the functionality is not there.
That’s why I said you should open a feature request or pull request there.
The completion script calls ./gradlew .... tasks --all and parses the output.
In that output there is a section “Other tasks” which are the tasks without set group which are the ones hidden by default for example from ./gradlew tasks and stuffed into the “other” category by IDEs like IntelliJ IDEA.
Those are usually the tasks not meant for direct invocation but are more an implementation detail, so most probably are the tasks which you do not want to get completed by default.
Hmm… but there are still other tasks that are not in the “other” section:
> Task :tasks
------------------------------------------------------------
Tasks runnable from root project 'Atom Xmpp Client'
------------------------------------------------------------
Android tasks
-------------
app:androidDependencies - Displays the Android dependencies of the project.
common:compose-ui:androidDependencies - Displays the Android dependencies of the project.
common:database:androidDependencies - Displays the Android dependencies of the project.
common:main:androidDependencies - Displays the Android dependencies of the project.
common:root:androidDependencies - Displays the Android dependencies of the project.
common:service:androidDependencies - Displays the Android dependencies of the project.
common:util:androidDependencies - Displays the Android dependencies of the project.
app:signingReport - Displays the signing info for the base and test modules
common:compose-ui:signingReport - Displays the signing info for the base and test modules
common:database:signingReport - Displays the signing info for the base and test modules
common:main:signingReport - Displays the signing info for the base and test modules
common:root:signingReport - Displays the signing info for the base and test modules
common:service:signingReport - Displays the signing info for the base and test modules
common:util:signingReport - Displays the signing info for the base and test modules
app:sourceSets - Prints out all the source sets defined in this project.
common:compose-ui:sourceSets - Prints out all the source sets defined in this project.
common:database:sourceSets - Prints out all the source sets defined in this project.
common:main:sourceSets - Prints out all the source sets defined in this project.
common:root:sourceSets - Prints out all the source sets defined in this project.
common:service:sourceSets - Prints out all the source sets defined in this project.
common:util:sourceSets - Prints out all the source sets defined in this project.
Build tasks
-----------
common:compose-ui:allMetadataJar - Assembles a jar archive containing the metadata for all Kotlin source sets.
common:database:allMetadataJar - Assembles a jar archive containing the metadata for all Kotlin source sets.
common:main:allMetadataJar - Assembles a jar archive containing the metadata for all Kotlin source sets.
common:root:allMetadataJar - Assembles a jar archive containing the metadata for all Kotlin source sets.
common:service:allMetadataJar - Assembles a jar archive containing the metadata for all Kotlin source sets.
common:util:allMetadataJar - Assembles a jar archive containing the metadata for all Kotlin source sets.
common:compose-ui:androidDebugSourcesJar - Assembles a jar archive containing the sources of target 'androidDebug'.
common:database:androidDebugSourcesJar - Assembles a jar archive containing the sources of target 'androidDebug'.
common:main:androidDebugSourcesJar - Assembles a jar archive containing the sources of target 'androidDebug'.
common:root:androidDebugSourcesJar - Assembles a jar archive containing the sources of target 'androidDebug'.
common:service:androidDebugSourcesJar - Assembles a jar archive containing the sources of target 'androidDebug'.
common:util:androidDebugSourcesJar - Assembles a jar archive containing the sources of target 'androidDebug'.
common:compose-ui:androidReleaseSourcesJar - Assembles a jar archive containing the sources of target 'androidRelease'.
common:database:androidReleaseSourcesJar - Assembles a jar archive containing the sources of target 'androidRelease'.
common:main:androidReleaseSourcesJar - Assembles a jar archive containing the sources of target 'androidRelease'.
common:root:androidReleaseSourcesJar - Assembles a jar archive containing the sources of target 'androidRelease'.
common:service:androidReleaseSourcesJar - Assembles a jar archive containing the sources of target 'androidRelease'.
common:util:androidReleaseSourcesJar - Assembles a jar archive containing the sources of target 'androidRelease'.
assemble - Assembles the outputs of this project.
app:assemble - Assemble main outputs for all the variants.
common:compose-ui:assemble - Assemble main outputs for all the variants.
common:database:assemble - Assemble main outputs for all the variants.
common:main:assemble - Assemble main outputs for all the variants.
common:root:assemble - Assemble main outputs for all the variants.
common:service:assemble - Assemble main outputs for all the variants.
common:util:assemble - Assemble main outputs for all the variants.
app:assembleAndroidTest - Assembles all the Test applications.
common:compose-ui:assembleAndroidTest - Assembles all the Test applications.
common:database:assembleAndroidTest - Assembles all the Test applications.
common:main:assembleAndroidTest - Assembles all the Test applications.
common:root:assembleAndroidTest - Assembles all the Test applications.
common:service:assembleAndroidTest - Assembles all the Test applications.
common:util:assembleAndroidTest - Assembles all the Test applications.
build - Assembles and tests this project.
app:build - Assembles and tests this project.
common:compose-ui:build - Assembles and tests this project.
common:database:build - Assembles and tests this project.
common:main:build - Assembles and tests this project.
common:root:build - Assembles and tests this project.
common:service:build - Assembles and tests this project.
common:util:build - Assembles and tests this project.
app:buildDependents - Assembles and tests this project and all projects that depend on it.
common:compose-ui:buildDependents - Assembles and tests this project and all projects that depend on it.
common:database:buildDependents - Assembles and tests this project and all projects that depend on it.
common:main:buildDependents - Assembles and tests this project and all projects that depend on it.
common:root:buildDependents - Assembles and tests this project and all projects that depend on it.
common:service:buildDependents - Assembles and tests this project and all projects that depend on it.
common:util:buildDependents - Assembles and tests this project and all projects that depend on it.
app:buildKotlinToolingMetadata - Build metadata json file containing information about the used Kotlin tooling
common:compose-ui:buildKotlinToolingMetadata - Build metadata json file containing information about the used Kotlin tooling
common:database:buildKotlinToolingMetadata - Build metadata json file containing information about the used Kotlin tooling
common:main:buildKotlinToolingMetadata - Build metadata json file containing information about the used Kotlin tooling
common:root:buildKotlinToolingMetadata - Build metadata json file containing information about the used Kotlin tooling
common:service:buildKotlinToolingMetadata - Build metadata json file containing information about the used Kotlin tooling
common:util:buildKotlinToolingMetadata - Build metadata json file containing information about the used Kotlin tooling
app:buildNeeded - Assembles and tests this project and all projects it depends on.
common:compose-ui:buildNeeded - Assembles and tests this project and all projects it depends on.
common:database:buildNeeded - Assembles and tests this project and all projects it depends on.
common:main:buildNeeded - Assembles and tests this project and all projects it depends on.
common:root:buildNeeded - Assembles and tests this project and all projects it depends on.
common:service:buildNeeded - Assembles and tests this project and all projects it depends on.
common:util:buildNeeded - Assembles and tests this project and all projects it depends on.
app:bundle - Assemble bundles for all the variants.
clean - Deletes the build directory.
app:clean - Deletes the build directory.
common:compose-ui:clean - Deletes the build directory.
common:database:clean - Deletes the build directory.
common:main:clean - Deletes the build directory.
common:root:clean - Deletes the build directory.
common:service:clean - Deletes the build directory.
common:util:clean - Deletes the build directory.
common:compose-ui:cleanAllTests - Deletes all the test results.
common:database:cleanAllTests - Deletes all the test results.
common:main:cleanAllTests - Deletes all the test results.
common:root:cleanAllTests - Deletes all the test results.
common:service:cleanAllTests - Deletes all the test results.
common:util:cleanAllTests - Deletes all the test results.
app:compileDebugAndroidTestSources
common:compose-ui:compileDebugAndroidTestSources
common:database:compileDebugAndroidTestSources
common:main:compileDebugAndroidTestSources
common:root:compileDebugAndroidTestSources
common:service:compileDebugAndroidTestSources
common:util:compileDebugAndroidTestSources
app:compileDebugSources
common:compose-ui:compileDebugSources
common:database:compileDebugSources
common:main:compileDebugSources
common:root:compileDebugSources
common:service:compileDebugSources
common:util:compileDebugSources
app:compileDebugUnitTestSources
common:compose-ui:compileDebugUnitTestSources
common:database:compileDebugUnitTestSources
common:main:compileDebugUnitTestSources
common:root:compileDebugUnitTestSources
common:service:compileDebugUnitTestSources
common:util:compileDebugUnitTestSources
common:compose-ui:compileIosMainKotlinMetadata - Compiles a klibrary from the 'iosMain' compilation in target 'metadata'.
common:database:compileIosMainKotlinMetadata - Compiles a klibrary from the 'iosMain' compilation in target 'metadata'.
common:service:compileIosMainKotlinMetadata - Compiles a klibrary from the 'iosMain' compilation in target 'metadata'.
common:util:compileIosMainKotlinMetadata - Compiles a klibrary from the 'iosMain' compilation in target 'metadata'.
common:compose-ui:compileKotlinIosArm64 - Compiles a klibrary from the 'main' compilation in target 'iosArm64'.
common:database:compileKotlinIosArm64 - Compiles a klibrary from the 'main' compilation in target 'iosArm64'.
common:main:compileKotlinIosArm64 - Compiles a klibrary from the 'main' compilation in target 'iosArm64'.
common:root:compileKotlinIosArm64 - Compiles a klibrary from the 'main' compilation in target 'iosArm64'.
common:service:compileKotlinIosArm64 - Compiles a klibrary from the 'main' compilation in target 'iosArm64'.
common:util:compileKotlinIosArm64 - Compiles a klibrary from the 'main' compilation in target 'iosArm64'.
common:compose-ui:compileKotlinIosSimulatorArm64 - Compiles a klibrary from the 'main' compilation in target 'iosSimulatorArm64'.
common:database:compileKotlinIosSimulatorArm64 - Compiles a klibrary from the 'main' compilation in target 'iosSimulatorArm64'.
common:main:compileKotlinIosSimulatorArm64 - Compiles a klibrary from the 'main' compilation in target 'iosSimulatorArm64'.
common:root:compileKotlinIosSimulatorArm64 - Compiles a klibrary from the 'main' compilation in target 'iosSimulatorArm64'.
common:service:compileKotlinIosSimulatorArm64 - Compiles a klibrary from the 'main' compilation in target 'iosSimulatorArm64'.
common:util:compileKotlinIosSimulatorArm64 - Compiles a klibrary from the 'main' compilation in target 'iosSimulatorArm64'.
app:compileReleaseSources
common:compose-ui:compileReleaseSources
common:database:compileReleaseSources
common:main:compileReleaseSources
common:root:compileReleaseSources
common:service:compileReleaseSources
common:util:compileReleaseSources
app:compileReleaseUnitTestSources
common:compose-ui:compileReleaseUnitTestSources
common:database:compileReleaseUnitTestSources
common:main:compileReleaseUnitTestSources
common:root:compileReleaseUnitTestSources
common:service:compileReleaseUnitTestSources
common:util:compileReleaseUnitTestSources
common:compose-ui:compileTestKotlinIosArm64 - Compiles a klibrary from the 'test' compilation in target 'iosArm64'.
common:database:compileTestKotlinIosArm64 - Compiles a klibrary from the 'test' compilation in target 'iosArm64'.
common:main:compileTestKotlinIosArm64 - Compiles a klibrary from the 'test' compilation in target 'iosArm64'.
common:root:compileTestKotlinIosArm64 - Compiles a klibrary from the 'test' compilation in target 'iosArm64'.
common:service:compileTestKotlinIosArm64 - Compiles a klibrary from the 'test' compilation in target 'iosArm64'.
common:util:compileTestKotlinIosArm64 - Compiles a klibrary from the 'test' compilation in target 'iosArm64'.
common:compose-ui:compileTestKotlinIosSimulatorArm64 - Compiles a klibrary from the 'test' compilation in target 'iosSimulatorArm64'.
common:database:compileTestKotlinIosSimulatorArm64 - Compiles a klibrary from the 'test' compilation in target 'iosSimulatorArm64'.
common:main:compileTestKotlinIosSimulatorArm64 - Compiles a klibrary from the 'test' compilation in target 'iosSimulatorArm64'.
common:root:compileTestKotlinIosSimulatorArm64 - Compiles a klibrary from the 'test' compilation in target 'iosSimulatorArm64'.
common:service:compileTestKotlinIosSimulatorArm64 - Compiles a klibrary from the 'test' compilation in target 'iosSimulatorArm64'.
common:util:compileTestKotlinIosSimulatorArm64 - Compiles a klibrary from the 'test' compilation in target 'iosSimulatorArm64'.
common:compose-ui:desktopJar - Assembles an archive containing the main classes.
common:database:desktopJar - Assembles an archive containing the main classes.
common:main:desktopJar - Assembles an archive containing the main classes.
common:root:desktopJar - Assembles an archive containing the main classes.
common:service:desktopJar - Assembles an archive containing the main classes.
common:util:desktopJar - Assembles an archive containing the main classes.
common:compose-ui:desktopMainClasses - Assembles outputs for compilation 'main' of target 'desktop'
common:database:desktopMainClasses - Assembles outputs for compilation 'main' of target 'desktop'
common:main:desktopMainClasses - Assembles outputs for compilation 'main' of target 'desktop'
common:root:desktopMainClasses - Assembles outputs for compilation 'main' of target 'desktop'
common:service:desktopMainClasses - Assembles outputs for compilation 'main' of target 'desktop'
common:util:desktopMainClasses - Assembles outputs for compilation 'main' of target 'desktop'
common:compose-ui:desktopSourcesJar - Assembles a jar archive containing the sources of target 'desktop'.
common:database:desktopSourcesJar - Assembles a jar archive containing the sources of target 'desktop'.
common:main:desktopSourcesJar - Assembles a jar archive containing the sources of target 'desktop'.
common:root:desktopSourcesJar - Assembles a jar archive containing the sources of target 'desktop'.
common:service:desktopSourcesJar - Assembles a jar archive containing the sources of target 'desktop'.
common:util:desktopSourcesJar - Assembles a jar archive containing the sources of target 'desktop'.
common:compose-ui:desktopTestClasses - Assembles outputs for compilation 'test' of target 'desktop'
common:database:desktopTestClasses - Assembles outputs for compilation 'test' of target 'desktop'
common:main:desktopTestClasses - Assembles outputs for compilation 'test' of target 'desktop'
common:root:desktopTestClasses - Assembles outputs for compilation 'test' of target 'desktop'
common:service:desktopTestClasses - Assembles outputs for compilation 'test' of target 'desktop'
common:util:desktopTestClasses - Assembles outputs for compilation 'test' of target 'desktop'
common:compose-ui:embedAndSignAppleFrameworkForXcode - Embed and sign framework as requested by Xcode's environment variables
common:compose-ui:extractDebugAnnotations - Extracts Android annotations for the debug variant into the archive file
common:database:extractDebugAnnotations - Extracts Android annotations for the debug variant into the archive file
common:main:extractDebugAnnotations - Extracts Android annotations for the debug variant into the archive file
common:root:extractDebugAnnotations - Extracts Android annotations for the debug variant into the archive file
common:service:extractDebugAnnotations - Extracts Android annotations for the debug variant into the archive file
common:util:extractDebugAnnotations - Extracts Android annotations for the debug variant into the archive file
common:compose-ui:extractReleaseAnnotations - Extracts Android annotations for the release variant into the archive file
common:database:extractReleaseAnnotations - Extracts Android annotations for the release variant into the archive file
common:main:extractReleaseAnnotations - Extracts Android annotations for the release variant into the archive file
common:root:extractReleaseAnnotations - Extracts Android annotations for the release variant into the archive file
common:service:extractReleaseAnnotations - Extracts Android annotations for the release variant into the archive file
common:util:extractReleaseAnnotations - Extracts Android annotations for the release variant into the archive file
common:compose-ui:iosArm64Binaries - Assembles outputs for target 'iosArm64'.
common:database:iosArm64Binaries - Assembles outputs for target 'iosArm64'.
common:main:iosArm64Binaries - Assembles outputs for target 'iosArm64'.
common:root:iosArm64Binaries - Assembles outputs for target 'iosArm64'.
common:service:iosArm64Binaries - Assembles outputs for target 'iosArm64'.
[…]
(had to cut it as forum complained: “An error occurred: Body is limited to 32000 characters; you entered 38035.” )
Even if I grab it only from “:app” there is still quite a lot of “noise”:
------------------------------------------------------------
Tasks runnable from project ':app'
------------------------------------------------------------
Android tasks
-------------
androidDependencies - Displays the Android dependencies of the project.
signingReport - Displays the signing info for the base and test modules
sourceSets - Prints out all the source sets defined in this project.
Build tasks
-----------
assemble - Assemble main outputs for all the variants.
assembleAndroidTest - Assembles all the Test applications.
build - Assembles and tests this project.
buildDependents - Assembles and tests this project and all projects that depend on it.
buildKotlinToolingMetadata - Build metadata json file containing information about the used Kotlin tooling
buildNeeded - Assembles and tests this project and all projects it depends on.
bundle - Assemble bundles for all the variants.
clean - Deletes the build directory.
compileDebugAndroidTestSources
compileDebugSources
compileDebugUnitTestSources
compileReleaseSources
compileReleaseUnitTestSources
Help tasks
----------
buildEnvironment - Displays all buildscript dependencies declared in project ':app'.
dependencies - Displays all dependencies declared in project ':app'.
dependencyInsight - Displays the insight into a specific dependency in project ':app'.
help - Displays a help message.
javaToolchains - Displays the detected java toolchains.
kotlinDslAccessorsReport - Prints the Kotlin code for accessing the currently available project extensions and conventions.
outgoingVariants - Displays the outgoing variants of project ':app'.
projects - Displays the sub-projects of project ':app'.
properties - Displays the properties of project ':app'.
resolvableConfigurations - Displays the configurations that can be resolved in project ':app'.
tasks - Displays the tasks runnable from project ':app'.
Install tasks
-------------
installDebug - Installs the Debug build.
installDebugAndroidTest - Installs the android (on device) tests for the Debug build.
installRelease - Installs the Release build.
uninstallAll - Uninstall all applications.
uninstallDebug - Uninstalls the Debug build.
uninstallDebugAndroidTest - Uninstalls the android (on device) tests for the Debug build.
uninstallRelease - Uninstalls the Release build.
Verification tasks
------------------
check - Runs all checks.
checkJetifier - Checks whether Jetifier is needed for the current project
checkKotlinGradlePluginConfigurationErrors - Checks that Kotlin Gradle Plugin hasn't reported project configuration errors, failing otherwise. This task always runs before compileKotlin* or similar tasks.
connectedAndroidTest - Installs and runs instrumentation tests for all flavors on connected devices.
connectedCheck - Runs all device checks on currently connected devices.
connectedDebugAndroidTest - Installs and runs the tests for debug on connected devices.
deviceAndroidTest - Installs and runs instrumentation tests using all Device Providers.
deviceCheck - Runs all device checks using Device Providers and Test Servers.
lint - Runs lint on the default variant.
lintAnalyzeDebug - Run lint analysis on the debug variant
lintAnalyzeRelease - Run lint analysis on the release variant
lintDebug - Print text output from the corresponding lint report task
lintFix - Runs lint on the default variant and applies any safe suggestions to the source code.
lintFixDebug - Fix lint on the debug variant
lintFixRelease - Fix lint on the release variant
lintRelease - Print text output from the corresponding lint report task
lintReportDebug - Run lint on the debug variant
lintReportRelease - Run lint on the release variant
test - Run unit tests for all variants.
testDebugUnitTest - Run unit tests for the debug build.
testReleaseUnitTest - Run unit tests for the release build.
updateLintBaseline - Updates the lint baseline using the default variant.
updateLintBaselineDebug - Update the lint baseline using the debug variant
updateLintBaselineRelease - Update the lint baseline using the release variant
I don’t know gradle internals (not using it much, now had to use it and I was a bit stumbling / wanting to improve the “flow” hence the topic ) but IMHO above list should be waaay shorter, like:
------------------------------------------------------------
Tasks runnable from project ':app'
------------------------------------------------------------
Android tasks
-------------
androidDependencies - Displays the Android dependencies of the project.
signingReport - Displays the signing info for the base and test modules
sourceSets - Prints out all the source sets defined in this project.
Build tasks
-----------
assemble - Assemble main outputs for all the variants.
build - Assembles and tests this project.
bundle - Assemble bundles for all the variants.
clean - Deletes the build directory.
Install tasks
-------------
installDebug - Installs the Debug build.
installRelease - Installs the Release build.
uninstallAll - Uninstall all applications.
uninstallDebug - Uninstalls the Debug build.
uninstallRelease - Uninstalls the Release build.
Verification tasks
------------------
check - Runs all checks.
checkJetifier - Checks whether Jetifier is needed for the current project
checkKotlinGradlePluginConfigurationErrors - Checks that Kotlin Gradle Plugin hasn't reported project configuration errors, failing otherwise. This task always runs before compileKotlin* or similar tasks.
deviceCheck - Runs all device checks using Device Providers and Test Servers.
lint - Runs lint on the default variant.
lintFix - Runs lint on the default variant and applies any safe suggestions to the source code.
test - Run unit tests for all variants.
Why do you ask me?
I’m just a user like you.
Besides that this idea has nothing to do with that issue, does it?
And besides that this issue is in the wrong repository.
The completion script just provides the potential completion options. It is your shell / the completion framework itself that does the paging.
I am a developer and I am very insightful regarding Gradle, and I do a lot of Gradle work and I also regularly contribute to Gradle.
But I’m not affiliated to Gradle Inc. in any way.
That’s actually not at all what we talked about, but .
And it is the decision of everyone registering a task in which category they stuff it. Gradle only decides that for the tasks it registers itself / built-in plugins.