This file is indexed.

/usr/share/doc/gradle/userguide/pt03.html is in gradle-doc 3.4.1-7ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

1
<html><head><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Part&nbsp;III.&nbsp;Writing Gradle build scripts</title><link xmlns:xslthl="http://xslthl.sf.net" type="text/css" rel="stylesheet" href="base.css"><link xmlns:xslthl="http://xslthl.sf.net" type="text/css" rel="stylesheet" href="docs.css"><link xmlns:xslthl="http://xslthl.sf.net" type="text/css" rel="stylesheet" href="userguide.css"><meta content="DocBook XSL Stylesheets V1.79.1" name="generator"><link rel="home" href="userguide.html" title="Gradle User Guide Version 3.4.1"><link rel="up" href="userguide.html" title="Gradle User Guide Version 3.4.1"><link rel="prev" href="build_cache.html" title="Build Cache - Gradle User Guide Version 3.4.1"><link rel="next" href="tutorial_using_tasks.html" title="Build Script Basics - Gradle User Guide Version 3.4.1"></head><body><div class="navheader"><div><div class="navbar"><a xmlns:xslthl="http://xslthl.sf.net" href="build_cache.html" title="Build Cache - Gradle User Guide Version 3.4.1">Previous</a><span>|</span><a xmlns:xslthl="http://xslthl.sf.net" href="userguide.html" title="Gradle User Guide Version 3.4.1">Contents</a><span>|</span><a xmlns:xslthl="http://xslthl.sf.net" href="tutorial_using_tasks.html" title="Build Script Basics - Gradle User Guide Version 3.4.1">Next</a></div></div></div><div class="part"><div class="titlepage"><div><div><h1 class="title"><a xmlns:xslthl="http://xslthl.sf.net" name="N10DB5"></a>Part&nbsp;III.&nbsp;Writing Gradle build scripts</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="chapter"><a href="tutorial_using_tasks.html">16. Build Script Basics</a></span></dt><dd><dl><dt><span class="section"><a href="tutorial_using_tasks.html#sec:projects_and_tasks">16.1. Projects and tasks</a></span></dt><dt><span class="section"><a href="tutorial_using_tasks.html#sec:hello_world">16.2. Hello world</a></span></dt><dt><span class="section"><a href="tutorial_using_tasks.html#sec:a_shortcut_task_definition">16.3. A shortcut task definition</a></span></dt><dt><span class="section"><a href="tutorial_using_tasks.html#sec:build_scripts_are_code">16.4. Build scripts are code</a></span></dt><dt><span class="section"><a href="tutorial_using_tasks.html#sec:task_dependencies">16.5. Task dependencies</a></span></dt><dt><span class="section"><a href="tutorial_using_tasks.html#sec:dynamic_tasks">16.6. Dynamic tasks</a></span></dt><dt><span class="section"><a href="tutorial_using_tasks.html#sec:manipulating_existing_tasks">16.7. Manipulating existing tasks</a></span></dt><dt><span class="section"><a href="tutorial_using_tasks.html#sec:shortcut_notations">16.8. Shortcut notations</a></span></dt><dt><span class="section"><a href="tutorial_using_tasks.html#sec:extra_task_properties">16.9. Extra task properties</a></span></dt><dt><span class="section"><a href="tutorial_using_tasks.html#sec:using_ant_tasks_tutorial">16.10. Using Ant Tasks</a></span></dt><dt><span class="section"><a href="tutorial_using_tasks.html#sec:using_methods">16.11. Using methods</a></span></dt><dt><span class="section"><a href="tutorial_using_tasks.html#sec:default_tasks">16.12. Default tasks</a></span></dt><dt><span class="section"><a href="tutorial_using_tasks.html#configure-by-dag">16.13. Configure by DAG</a></span></dt><dt><span class="section"><a href="tutorial_using_tasks.html#sec:tasks_tutorial_where_to_next">16.14. Where to next?</a></span></dt></dl></dd><dt><span class="chapter"><a href="build_init_plugin.html">17. Build Init Plugin</a></span></dt><dd><dl><dt><span class="section"><a href="build_init_plugin.html#sec:build_init_tasks">17.1. Tasks</a></span></dt><dt><span class="section"><a href="build_init_plugin.html#sec:what_to_set_up">17.2. What to set up</a></span></dt><dt><span class="section"><a href="build_init_plugin.html#sec:build_init_types">17.3. Build init types</a></span></dt></dl></dd><dt><span class="chapter"><a href="writing_build_scripts.html">18. Writing Build Scripts</a></span></dt><dd><dl><dt><span class="section"><a href="writing_build_scripts.html#sec:the_gradle_build_language">18.1. The Gradle build language</a></span></dt><dt><span class="section"><a href="writing_build_scripts.html#sec:project_api">18.2. The Project API</a></span></dt><dt><span class="section"><a href="writing_build_scripts.html#sec:the_script_api">18.3. The Script API</a></span></dt><dt><span class="section"><a href="writing_build_scripts.html#sec:declaring_variables">18.4. Declaring variables</a></span></dt><dt><span class="section"><a href="writing_build_scripts.html#sec:configuring_arbitrary_objects">18.5. Configuring arbitrary objects</a></span></dt><dt><span class="section"><a href="writing_build_scripts.html#sec:configuring_arbitrary_objects_using_an_external_script">18.6. Configuring arbitrary objects using an external script</a></span></dt><dt><span class="section"><a href="writing_build_scripts.html#groovy-dsl-basics">18.7. Some Groovy basics</a></span></dt><dt><span class="section"><a href="writing_build_scripts.html#script-default-imports">18.8. Default imports</a></span></dt></dl></dd><dt><span class="chapter"><a href="more_about_tasks.html">19. More about Tasks</a></span></dt><dd><dl><dt><span class="section"><a href="more_about_tasks.html#sec:defining_tasks">19.1. Defining tasks</a></span></dt><dt><span class="section"><a href="more_about_tasks.html#sec:locating_tasks">19.2. Locating tasks</a></span></dt><dt><span class="section"><a href="more_about_tasks.html#sec:configuring_tasks">19.3. Configuring tasks</a></span></dt><dt><span class="section"><a href="more_about_tasks.html#sec:adding_dependencies_to_tasks">19.4. Adding dependencies to a task</a></span></dt><dt><span class="section"><a href="more_about_tasks.html#sec:ordering_tasks">19.5. Ordering tasks</a></span></dt><dt><span class="section"><a href="more_about_tasks.html#sec:adding_a_description_to_a_task">19.6. Adding a description to a task</a></span></dt><dt><span class="section"><a href="more_about_tasks.html#sec:replacing_tasks">19.7. Replacing tasks</a></span></dt><dt><span class="section"><a href="more_about_tasks.html#sec:skipping_tasks">19.8. Skipping tasks</a></span></dt><dt><span class="section"><a href="more_about_tasks.html#sec:up_to_date_checks">19.9. Up-to-date checks (AKA Incremental Build)</a></span></dt><dt><span class="section"><a href="more_about_tasks.html#sec:task_rules">19.10. Task rules</a></span></dt><dt><span class="section"><a href="more_about_tasks.html#sec:finalizer_tasks">19.11. Finalizer tasks</a></span></dt><dt><span class="section"><a href="more_about_tasks.html#sec:the_idea_behind_gradle_tasks">19.12. Summary</a></span></dt></dl></dd><dt><span class="chapter"><a href="working_with_files.html">20. Working With Files</a></span></dt><dd><dl><dt><span class="section"><a href="working_with_files.html#sec:locating_files">20.1. Locating files</a></span></dt><dt><span class="section"><a href="working_with_files.html#sec:file_collections">20.2. File collections</a></span></dt><dt><span class="section"><a href="working_with_files.html#sec:file_trees">20.3. File trees</a></span></dt><dt><span class="section"><a href="working_with_files.html#sec:archive_contents">20.4. Using the contents of an archive as a file tree</a></span></dt><dt><span class="section"><a href="working_with_files.html#sec:specifying_multiple_files">20.5. Specifying a set of input files</a></span></dt><dt><span class="section"><a href="working_with_files.html#sec:copying_files">20.6. Copying files</a></span></dt><dt><span class="section"><a href="working_with_files.html#sec:sync_task">20.7. Using the <code class="literal">Sync</code> task</a></span></dt><dt><span class="section"><a href="working_with_files.html#sec:archives">20.8. Creating archives</a></span></dt><dt><span class="section"><a href="working_with_files.html#sec:properties_files">20.9. Properties files</a></span></dt></dl></dd><dt><span class="chapter"><a href="ant.html">21. Using Ant from Gradle</a></span></dt><dd><dl><dt><span class="section"><a href="ant.html#sec:using_ant_tasks">21.1. Using Ant tasks and types in your build</a></span></dt><dt><span class="section"><a href="ant.html#sec:import_ant_build">21.2. Importing an Ant build</a></span></dt><dt><span class="section"><a href="ant.html#sec:ant_properties">21.3. Ant properties and references</a></span></dt><dt><span class="section"><a href="ant.html#sec:ant_logging">21.4. Ant logging</a></span></dt><dt><span class="section"><a href="ant.html#sec:ant_api">21.5. API</a></span></dt></dl></dd><dt><span class="chapter"><a href="build_lifecycle.html">22. The Build Lifecycle</a></span></dt><dd><dl><dt><span class="section"><a href="build_lifecycle.html#sec:build_phases">22.1. Build phases</a></span></dt><dt><span class="section"><a href="build_lifecycle.html#sec:settings_file">22.2. Settings file</a></span></dt><dt><span class="section"><a href="build_lifecycle.html#sec:multi_project_builds">22.3. Multi-project builds</a></span></dt><dt><span class="section"><a href="build_lifecycle.html#sec:initialization">22.4. Initialization</a></span></dt><dt><span class="section"><a href="build_lifecycle.html#sec:configuration_and_execution_of_a_single_project_build">22.5. Configuration and execution of a single project build</a></span></dt><dt><span class="section"><a href="build_lifecycle.html#build_lifecycle_events">22.6. Responding to the lifecycle in the build script</a></span></dt></dl></dd><dt><span class="chapter"><a href="wrapper_plugin.html">23. Wrapper Plugin</a></span></dt><dd><dl><dt><span class="section"><a href="wrapper_plugin.html#sec:wrapper_plugin_usage">23.1. Usage</a></span></dt><dt><span class="section"><a href="wrapper_plugin.html#sec:wrapper_plugin_tasks">23.2. Tasks</a></span></dt></dl></dd><dt><span class="chapter"><a href="logging.html">24. Logging</a></span></dt><dd><dl><dt><span class="section"><a href="logging.html#sec:choosing_a_log_level">24.1. Choosing a log level</a></span></dt><dt><span class="section"><a href="logging.html#sec:sending_your_own_log_messages">24.2. Writing your own log messages</a></span></dt><dt><span class="section"><a href="logging.html#sec:external_tools">24.3. Logging from external tools and libraries</a></span></dt><dt><span class="section"><a href="logging.html#sec:changing_what_gradle_logs">24.4. Changing what Gradle logs</a></span></dt></dl></dd><dt><span class="chapter"><a href="dependency_management.html">25. Dependency Management</a></span></dt><dd><dl><dt><span class="section"><a href="dependency_management.html#sec:Introduction">25.1. Introduction</a></span></dt><dt><span class="section"><a href="dependency_management.html#sec:dependency_management_overview">25.2. Dependency Management Best Practices</a></span></dt><dt><span class="section"><a href="dependency_management.html#sub:configurations">25.3. Dependency configurations</a></span></dt><dt><span class="section"><a href="dependency_management.html#sec:how_to_declare_your_dependencies">25.4. How to declare your dependencies</a></span></dt><dt><span class="section"><a href="dependency_management.html#sec:working_with_dependencies">25.5. Working with dependencies</a></span></dt><dt><span class="section"><a href="dependency_management.html#sec:repositories">25.6. Repositories</a></span></dt><dt><span class="section"><a href="dependency_management.html#sec:dependency_resolution">25.7. How dependency resolution works</a></span></dt><dt><span class="section"><a href="dependency_management.html#sec:finetuning_the_dependency_resolution_process">25.8. Fine-tuning the dependency resolution process</a></span></dt><dt><span class="section"><a href="dependency_management.html#sec:dependency_cache">25.9. The dependency cache</a></span></dt><dt><span class="section"><a href="dependency_management.html#sec:strategies_of_transitive_dependency_management">25.10. Strategies for transitive dependency management</a></span></dt></dl></dd><dt><span class="chapter"><a href="multi_project_builds.html">26. Multi-project Builds</a></span></dt><dd><dl><dt><span class="section"><a href="multi_project_builds.html#sec:cross_project_configuration">26.1. Cross project configuration</a></span></dt><dt><span class="section"><a href="multi_project_builds.html#sec:subproject_configuration">26.2. Subproject configuration</a></span></dt><dt><span class="section"><a href="multi_project_builds.html#sec:execution_rules_for_multi_project_builds">26.3. Execution rules for multi-project builds</a></span></dt><dt><span class="section"><a href="multi_project_builds.html#sec:running_partial_build_from_the_root">26.4. Running tasks by their absolute path</a></span></dt><dt><span class="section"><a href="multi_project_builds.html#sec:project_and_task_paths">26.5. Project and task paths</a></span></dt><dt><span class="section"><a href="multi_project_builds.html#sec:dependencies_which_dependencies">26.6. Dependencies - Which dependencies?</a></span></dt><dt><span class="section"><a href="multi_project_builds.html#sec:project_jar_dependencies">26.7. Project lib dependencies</a></span></dt><dt><span class="section"><a href="multi_project_builds.html#sec:parallel_execution">26.8. Parallel project execution</a></span></dt><dt><span class="section"><a href="multi_project_builds.html#sec:decoupled_projects">26.9. Decoupled Projects</a></span></dt><dt><span class="section"><a href="multi_project_builds.html#sec:multiproject_build_and_test">26.10. Multi-Project Building and Testing</a></span></dt><dt><span class="section"><a href="multi_project_builds.html#sec:multi_project_and_buildsrc">26.11. Multi Project and buildSrc</a></span></dt><dt><span class="section"><a href="multi_project_builds.html#sec:property_and_method_inheritance">26.12. Property and method inheritance</a></span></dt><dt><span class="section"><a href="multi_project_builds.html#sec:multiproject_summary">26.13. Summary</a></span></dt></dl></dd><dt><span class="chapter"><a href="plugins.html">27. Gradle Plugins</a></span></dt><dd><dl><dt><span class="section"><a href="plugins.html#sec:what_plugins_do">27.1. What plugins do</a></span></dt><dt><span class="section"><a href="plugins.html#sec:types_of_plugins">27.2. Types of plugins</a></span></dt><dt><span class="section"><a href="plugins.html#sec:using_plugins">27.3. Using plugins</a></span></dt><dt><span class="section"><a href="plugins.html#sec:script_plugins">27.4. Script plugins</a></span></dt><dt><span class="section"><a href="plugins.html#sec:binary_plugins">27.5. Binary plugins</a></span></dt><dt><span class="section"><a href="plugins.html#sec:finding_community_plugins">27.6. Finding community plugins</a></span></dt><dt><span class="section"><a href="plugins.html#sec:more_on_plugins">27.7. More on plugins</a></span></dt></dl></dd><dt><span class="chapter"><a href="standard_plugins.html">28. Standard Gradle plugins</a></span></dt><dd><dl><dt><span class="section"><a href="standard_plugins.html#sec:language_plugins">28.1. Language plugins</a></span></dt><dt><span class="section"><a href="standard_plugins.html#sec:incubating_language_plugins">28.2. Incubating language plugins</a></span></dt><dt><span class="section"><a href="standard_plugins.html#sec:integration_plugins">28.3. Integration plugins</a></span></dt><dt><span class="section"><a href="standard_plugins.html#sec:incubating_integration_plugins">28.4. Incubating integration plugins</a></span></dt><dt><span class="section"><a href="standard_plugins.html#sec:software_development_plugins">28.5. Software development plugins</a></span></dt><dt><span class="section"><a href="standard_plugins.html#sec:incubating_software_development_plugins">28.6. Incubating software development plugins</a></span></dt><dt><span class="section"><a href="standard_plugins.html#sec:base_plugins">28.7. Base plugins</a></span></dt><dt><span class="section"><a href="standard_plugins.html#sec:third_party_plugins">28.8. Third party plugins</a></span></dt></dl></dd><dt><span class="chapter"><a href="project_reports_plugin.html">29. The Project Report Plugin</a></span></dt><dd><dl><dt><span class="section"><a href="project_reports_plugin.html#sec:project_reports_usage">29.1. Usage</a></span></dt><dt><span class="section"><a href="project_reports_plugin.html#sec:project_reports_tasks">29.2. Tasks</a></span></dt><dt><span class="section"><a href="project_reports_plugin.html#sec:project_reports_project_layout">29.3. Project layout</a></span></dt><dt><span class="section"><a href="project_reports_plugin.html#sec:project_reports_dependency_management">29.4. Dependency management</a></span></dt><dt><span class="section"><a href="project_reports_plugin.html#sec:project_reports_convention_properties">29.5. Convention properties</a></span></dt></dl></dd><dt><span class="chapter"><a href="buildDashboard_plugin.html">30. The Build Dashboard Plugin</a></span></dt><dd><dl><dt><span class="section"><a href="buildDashboard_plugin.html#sec:build_dashboard_usage">30.1. Usage</a></span></dt><dt><span class="section"><a href="buildDashboard_plugin.html#sec:build_dashboard_tasks">30.2. Tasks</a></span></dt><dt><span class="section"><a href="buildDashboard_plugin.html#sec:build_dashboard_project_layout">30.3. Project layout</a></span></dt><dt><span class="section"><a href="buildDashboard_plugin.html#sec:build_dashboard_dependency_management">30.4. Dependency management</a></span></dt><dt><span class="section"><a href="buildDashboard_plugin.html#sec:build_dashboard_configuration">30.5. Configuration</a></span></dt></dl></dd><dt><span class="chapter"><a href="comparing_builds.html">31. Comparing Builds</a></span></dt><dd><dl><dt><span class="section"><a href="comparing_builds.html#sec:definition_of_terms">31.1. Definition of terms</a></span></dt><dt><span class="section"><a href="comparing_builds.html#sec:current_capabilities">31.2. Current Capabilities</a></span></dt><dt><span class="section"><a href="comparing_builds.html#sec:comparing_gradle_builds">31.3. Comparing Gradle Builds</a></span></dt></dl></dd><dt><span class="chapter"><a href="artifact_management.html">32. Publishing artifacts</a></span></dt><dd><dl><dt><span class="section"><a href="artifact_management.html#sec:introduction">32.1. Introduction</a></span></dt><dt><span class="section"><a href="artifact_management.html#sec:artifacts_and_configurations">32.2. Artifacts and configurations</a></span></dt><dt><span class="section"><a href="artifact_management.html#sec:declaring_artifacts">32.3. Declaring artifacts</a></span></dt><dt><span class="section"><a href="artifact_management.html#sec:publishing_artifacts">32.4. Publishing artifacts</a></span></dt><dt><span class="section"><a href="artifact_management.html#project_libraries">32.5. More about project libraries</a></span></dt></dl></dd><dt><span class="chapter"><a href="maven_plugin.html">33. The Maven Plugin</a></span></dt><dd><dl><dt><span class="section"><a href="maven_plugin.html#sec:maven_usage">33.1. Usage</a></span></dt><dt><span class="section"><a href="maven_plugin.html#sec:maven_tasks">33.2. Tasks</a></span></dt><dt><span class="section"><a href="maven_plugin.html#sec:maven_dependency_management">33.3. Dependency management</a></span></dt><dt><span class="section"><a href="maven_plugin.html#sec:maven_convention_properties">33.4. Convention properties</a></span></dt><dt><span class="section"><a href="maven_plugin.html#sec:maven_convention_methods">33.5. Convention methods</a></span></dt><dt><span class="section"><a href="maven_plugin.html#uploading_to_maven_repositories">33.6. Interacting with Maven repositories</a></span></dt></dl></dd><dt><span class="chapter"><a href="signing_plugin.html">34. The Signing Plugin</a></span></dt><dd><dl><dt><span class="section"><a href="signing_plugin.html#sec:signing_usage">34.1. Usage</a></span></dt><dt><span class="section"><a href="signing_plugin.html#sec:signatory_credentials">34.2. Signatory credentials</a></span></dt><dt><span class="section"><a href="signing_plugin.html#sec:specifying_what_to_sign">34.3. Specifying what to sign</a></span></dt><dt><span class="section"><a href="signing_plugin.html#sec:publishing_the_signatures">34.4. Publishing the signatures</a></span></dt><dt><span class="section"><a href="signing_plugin.html#sec:signing_pom_files">34.5. Signing POM files</a></span></dt></dl></dd><dt><span class="chapter"><a href="publishing_ivy.html">35. Ivy Publishing (new)</a></span></dt><dd><dl><dt><span class="section"><a href="publishing_ivy.html#publishing_ivy:plugin">35.1. The &ldquo;<code class="literal">ivy-publish</code>&rdquo; Plugin</a></span></dt><dt><span class="section"><a href="publishing_ivy.html#publishing_ivy:publications">35.2. Publications</a></span></dt><dt><span class="section"><a href="publishing_ivy.html#publishing_ivy:repositories">35.3. Repositories</a></span></dt><dt><span class="section"><a href="publishing_ivy.html#publishing_ivy:publishing">35.4. Performing a publish</a></span></dt><dt><span class="section"><a href="publishing_ivy.html#publishing_ivy:descriptor">35.5. Generating the Ivy module descriptor file without publishing</a></span></dt><dt><span class="section"><a href="publishing_ivy.html#publishing_ivy:example">35.6. Complete example</a></span></dt><dt><span class="section"><a href="publishing_ivy.html#publishing_ivy:future">35.7. Future features</a></span></dt></dl></dd><dt><span class="chapter"><a href="publishing_maven.html">36. Maven Publishing (new)</a></span></dt><dd><dl><dt><span class="section"><a href="publishing_maven.html#sec:the_mavenpublish_plugin">36.1. The &ldquo;<code class="literal">maven-publish</code>&rdquo; Plugin</a></span></dt><dt><span class="section"><a href="publishing_maven.html#publishing_maven:publications">36.2. Publications</a></span></dt><dt><span class="section"><a href="publishing_maven.html#publishing_maven:repositories">36.3. Repositories</a></span></dt><dt><span class="section"><a href="publishing_maven.html#publishing_maven:publishing">36.4. Performing a publish</a></span></dt><dt><span class="section"><a href="publishing_maven.html#publishing_maven:install">36.5. Publishing to Maven Local</a></span></dt><dt><span class="section"><a href="publishing_maven.html#publishing_maven:generate-pom">36.6. Generating the POM file without publishing</a></span></dt></dl></dd><dt><span class="chapter"><a href="distribution_plugin.html">37. The Distribution Plugin</a></span></dt><dd><dl><dt><span class="section"><a href="distribution_plugin.html#sec:distribution_usage">37.1. Usage</a></span></dt><dt><span class="section"><a href="distribution_plugin.html#sec:distribution_tasks">37.2. Tasks</a></span></dt><dt><span class="section"><a href="distribution_plugin.html#sec:distribution_contents">37.3. Distribution contents</a></span></dt><dt><span class="section"><a href="distribution_plugin.html#sec:publishing_distributions">37.4. Publishing distributions</a></span></dt></dl></dd><dt><span class="chapter"><a href="announce_plugin.html">38. The Announce Plugin</a></span></dt><dd><dl><dt><span class="section"><a href="announce_plugin.html#sec:announce_usage">38.1. Usage</a></span></dt><dt><span class="section"><a href="announce_plugin.html#sec:announce_configuration">38.2. Configuration</a></span></dt></dl></dd><dt><span class="chapter"><a href="build_announcements_plugin.html">39. The Build Announcements Plugin</a></span></dt><dd><dl><dt><span class="section"><a href="build_announcements_plugin.html#sec:build_announcements_usage">39.1. Usage</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><div><div class="navbar"><a xmlns:xslthl="http://xslthl.sf.net" href="build_cache.html" title="Build Cache - Gradle User Guide Version 3.4.1">Previous</a><span>|</span><a xmlns:xslthl="http://xslthl.sf.net" href="userguide.html" title="Gradle User Guide Version 3.4.1">Contents</a><span>|</span><a xmlns:xslthl="http://xslthl.sf.net" href="tutorial_using_tasks.html" title="Build Script Basics - Gradle User Guide Version 3.4.1">Next</a></div></div></div></body></html>