Skip to end of metadata
Go to start of metadata

Jar

Description

Assembles a JAR archive.

Properties

Name

Type

BasePlugin

Description

destinationDir

File

buildDir/libs

The directory for the generated archive file

archiveName

String

 

The name of the generated archive file. If `archiveName` has not been explicitly set, the pattern for the name is: [baseName]-[appendix]-[version]-[classifier].[extension]

baseName

String

project.name

The first part of the archive name. Usually indicates the prpject it belongs to.

appendix

String

 

The second part of the archive name. Often used if a project creates multiple archives, where the baseName indicates the project and the appendix indicates the content (e.g. gradle-docs)

version

String

project.version

The third part of the archive name. Usually indicating the version of the jar.

classifier

String

 

The 4rd part of the archive name. Similar in its usage to appendix but shows up in the name at a different position. Such a naming pattern is required by Maven if you want to publish multiple artifacts into the same directory in the repository. A typical use case are source and javadoc jars in a Maven repository.

extension

String

jar

The extension of the generated archive file.

manifest

Manifest

 

The manifest object which generates the META-INF/MANIFEST.MF file of the generated jar.

Methods

Provides all methods of the

Name

Arguments

Description

manifest

Closure

Configures the manifest object with the closure.

Labels
  • None