Gradle Jar Task Type: Difference between revisions
Jump to navigation
Jump to search
(→with) |
|||
Line 24: | Line 24: | ||
{{External|https://docs.gradle.org/current/dsl/org.gradle.jvm.tasks.Jar.html#org.gradle.jvm.tasks.Jar:with(org.gradle.api.file.CopySpec[])}} | {{External|https://docs.gradle.org/current/dsl/org.gradle.jvm.tasks.Jar.html#org.gradle.jvm.tasks.Jar:with(org.gradle.api.file.CopySpec[])}} | ||
Adds the given [[Gradle_File_Resolution#CoypSpec|CopySpec]] as a child of the current CoypSpec. | Adds the given [[Gradle_File_Resolution#CoypSpec|CopySpec]] as a child of the current CoypSpec. | ||
Example: | |||
<syntaxhighlight lang='groovy'> | |||
task fatJar(type: Jar, dependsOn: jar) { | |||
... | |||
with jar | |||
} | |||
</syntaxhighlight> |
Revision as of 06:06, 22 October 2020
External
- https://docs.gradle.org/current/dsl/org.gradle.api.tasks.bundling.Jar.html
- https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/bundling/Jar.html
Internal
Overview
Exposed by the java plugin as jar task.
Configuration
Properties
archiveBaseName
from
Specifies source files or directories to include in the archive. The given paths are evaluated as per Project.files(Object ...).
exclude
manifest
attributes
duplicatesStrategy
zip64
Methods
with
Adds the given CopySpec as a child of the current CoypSpec.
Example:
task fatJar(type: Jar, dependsOn: jar) {
...
with jar
}