id = "gradle" name = "Gradle" homepage = "https://gradle.org" description = "A highly scalable build automation tool designed to handle everything from large, multi-project enterprise builds to quick development tasks." icon = "theSVG:gradle" executables = ["gradle", "gradlew"] [dotfiles] # https://docs.gradle.org/current/userguide/directory_layout.html — "By # default, the Gradle User Home (~/.gradle or C:\Users\\.gradle) # stores global configuration properties, initialization scripts, caches, and # log files", overridable with GRADLE_USER_HOME. The Windows spelling is the # user profile root, which resolves to this same ~/.gradle. # https://docs.gradle.org/current/userguide/init_scripts.html adds the two # places Gradle picks up initialization scripts on its own: # $GRADLE_USER_HOME/init.gradle(.kts) and $GRADLE_USER_HOME/init.d/. paths = [ "~/.gradle/gradle.properties", "~/.gradle/init.gradle", "~/.gradle/init.gradle.kts", "~/.gradle/init.d/", ] # The same directory_layout page lists these as the rest of the Gradle User # Home: downloaded dependencies and build state, daemon registries and logs, # toolchain JDKs, and distributions fetched by the wrapper. exclude = [ "~/.gradle/caches/", "~/.gradle/daemon/", "~/.gradle/jdks/", "~/.gradle/wrapper/", ] # gradle.properties mixes credentials with ordinary build settings, so it is # not a whole-file secret; the fields are lifted out below. secret = [] # https://docs.gradle.org/current/userguide/signing_plugin.html — "a good # practice is to store them in the gradle.properties file in the user's Gradle # home directory", listing signing.keyId / signing.password / # signing.secretKeyRingFile. # https://docs.gradle.org/current/userguide/publishing_gradle_plugins.html — # "Provide the credentials as Gradle properties (gradle.publish.key and # gradle.publish.secret), usually in $HOME/.gradle/gradle.properties". # https://docs.gradle.org/current/userguide/networking.html shows # systemProp.http.proxyPassword in gradle.properties, and # https://docs.gradle.org/current/userguide/gradle_wrapper.html shows # systemProp.gradle.wrapperPassword for distributions behind HTTP Basic auth. [[dotfiles.secret_paths]] file = "~/.gradle/gradle.properties" match = { prefix = [ "signing.password", "gradle.publish.key", "gradle.publish.secret", "systemProp.gradle.wrapperPassword", "systemProp.http.proxyPassword", "systemProp.https.proxyPassword", ] } # signing.keyId names the OpenPGP key this machine holds and # signing.secretKeyRingFile is an absolute path to the keyring on its disk; # org.gradle.java.home is documented as "the Java home for the Gradle build # process", another absolute path; the proxy host is the network this machine # sits behind. Everything else — org.gradle.parallel, org.gradle.caching, # org.gradle.jvmargs — is a preference the user wants on every machine. # All five are this user's own: the JDK they installed under their home, the # signatory they hold, the network this box sits behind. Every one has to be # set up by hand again after a rebuild, so they are kept: backup. [[dotfiles.machine_lines]] file = "~/.gradle/gradle.properties" match = { prefix = [ "org.gradle.java.home", "signing.keyId", "signing.secretKeyRingFile", "systemProp.http.proxyHost", "systemProp.https.proxyHost", ] } scope = "backup" [commands] format = 1 label = "Run Gradle tasks" description = "Run one or more Gradle tasks with the common logging and build options. Init scripts, -D properties and dependency-lock options are left out." quality = "ai-draft" base = "fig:gradle" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/gradle.ts" license = "MIT" [[commands.field]] id = "tasks" label = "Tasks" description = "Task names such as build or test. Leave empty to run the default tasks." type = "string" position = 0 multiple = true sources = ["fig"] [[commands.field]] id = "dry_run" label = "Dry run" description = "Show which tasks would run without executing their actions." type = "boolean" option = ["--dry-run"] sources = ["fig"] [[commands.field]] id = "offline" label = "Offline" description = "Do not access network resources." type = "boolean" option = ["--offline"] sources = ["fig"] [[commands.field]] id = "refresh" label = "Refresh dependencies" type = "boolean" option = ["--refresh-dependencies"] sources = ["fig"] [[commands.field]] id = "parallel" label = "Parallel" description = "Build projects in parallel." type = "boolean" option = ["--parallel"] sources = ["fig"] [[commands.field]] id = "build_cache" label = "Build cache" description = "Reuse outputs from previous builds." type = "boolean" option = ["--build-cache"] sources = ["fig"] [[commands.field]] id = "no_daemon" label = "No daemon" description = "Do not use the Gradle daemon." type = "boolean" option = ["--no-daemon"] sources = ["fig"] [[commands.field]] id = "info" label = "Info logging" type = "boolean" option = ["--info", "-i"] sources = ["fig"] [[commands.field]] id = "stacktrace" label = "Stacktrace" description = "Print the stacktrace for user exceptions." type = "boolean" option = ["--stacktrace", "-s"] sources = ["fig"] [[commands.field]] id = "scan" label = "Build scan" description = "Create a build scan." type = "boolean" option = ["--scan"] sources = ["fig"] [[commands.field]] id = "console" label = "Console mode" type = "string" option = ["--console"] suggestions = [{ value = "auto", label = "auto" }, { value = "plain", label = "plain" }, { value = "rich", label = "rich" }, { value = "verbose", label = "verbose" }] sources = ["fig"] [[commands.field]] id = "build_file" label = "Build file" type = "path" option = ["--build-file", "-b"] path = { kind = "file", role = "input" } sources = ["fig"] [[commands.field]] id = "project_dir" label = "Project directory" type = "path" option = ["--project-dir", "-p"] path = { kind = "directory", role = "input" } sources = ["fig"] [[commands.field]] id = "max_workers" label = "Max workers" type = "integer" option = ["--max-workers"] sources = ["fig"] [[commands.field]] id = "quiet" label = "Quiet" description = "Log errors only." type = "boolean" option = ["--quiet", "-q"] sources = ["fig"] [[commands.field]] id = "debug" label = "Debug logging" type = "boolean" option = ["--debug", "-d"] sources = ["fig"] [[commands.task]] id = "build" label = "Build" fields = ["tasks", "parallel", "offline", "info", "stacktrace"] required = [] set = { tasks = ["build"] } [[commands.task]] id = "test" label = "Test" fields = ["tasks", "info", "offline"] required = [] set = { tasks = ["test"] } [[commands.task]] id = "plan" label = "Preview tasks" fields = ["tasks", "dry_run"] required = ["tasks"] set = { dry_run = [true] } [[commands.group]] id = "basic" label = "Basic" fields = ["tasks", "dry_run", "offline", "parallel"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["build_file", "project_dir", "max_workers", "build_cache", "no_daemon", "scan", "console", "refresh", "debug", "quiet", "info", "stacktrace"]