Gradle Jar Task Type
Jump to navigation
Jump to search
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
Input Properties
archiveBaseName
from
Specifies source files or directories to include in the archive. The given paths are evaluated as per Project.files(Object ...).
The values passed to "from" become inputs for the task and they are used for up-to-date checks.
exclude
manifest
attributes
Example:
task myJar(type: Jar) {
...
manifest.attributes 'Main-Class': "playground.Main"
}
duplicatesStrategy
zip64
Output Properties
archiveFile
Methods
with
Adds the given CopySpec as a child of the current CoypSpec.
Example:
task fatJar(type: Jar, dependsOn: jar) {
...
with jar
}