For AI agents: the documentation index is at https://docs.gradle.org/llms.txt. Request any page with the header Accept: text/markdown to get Markdown. User manual pages are also available as Markdown by replacing .html with .md in the URL.

contents

abstract fun contents(action: Action<in CopySpec>): CopySpec(source)

Configures the contents of the distribution.

Can be used to configure the contents of the distribution:

plugins {
    id 'distribution'
}

distributions {
    main {
        contents {
            from "src/readme"
        }
    }
}
The DSL inside the contents{} block is the same DSL used for Copy tasks.

Since

1.5