Gradle Artifact Publishing Concepts: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 25: Line 25:
==Classifier==
==Classifier==


{{Internal|https://kb.novaordis.com/index.php/Maven_Concepts#Classifier|Maven 'classifier'}}
{{Internal|Maven_Concepts#Classifier|Maven 'classifier'}}


=<span id='Configuration'></span>Dependency Configuration=
=<span id='Configuration'></span>Dependency Configuration=

Revision as of 01:43, 21 May 2018

External

Internal

Overview

Publishing plugins, such as Maven, define publishing tasks, that can be configured in build.gradle.

Artifact

Projects use Gradle to produce artifacts, also referred to as publication artifacts. Artifacts of a project are the files the project provides to the outside world.

Extension

Maven 'extension'

Classifier

Maven 'classifier'

Dependency Configuration

The configurations used to specify dependencies are also used to specify publishing artifacts. There are two configurations introduced by the Java plugin that are relevant to artifact generation and publishing: archives and runtime. Their relationship with artifact publishing is explained in the Java plugin page. Any custom archive created as part of the build are not automatically assigned to any configuration. If such as assignment is desired, it will have to be explicitly declared.

Declaring an Artifact

https://docs.gradle.org/current/userguide/artifact_management.html#sec:archive_task_artifacts

Publishing an Artifact

https://docs.gradle.org/current/userguide/artifact_management.html#sec:publishing_artifacts

Publishing to a Maven Repository