Gradle Artifact Publishing Concepts: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 30: Line 30:


Publishing plugin allow it to be [[Gradle_Maven_Publish_Plugin#Custom_Artifact_Publication|configured]].
Publishing plugin allow it to be [[Gradle_Maven_Publish_Plugin#Custom_Artifact_Publication|configured]].
=<span id='Configuration'></span>Dependency Configuration=
The [[Gradle_Dependencies_and_Dependency_Configurations#Dependency_Configuration|configurations used to specify dependencies]] are also used to specify publishing artifacts. There are two configurations introduced by the [[Gradle_Java_Plugin#Overview|Java plugin]] that are relevant to artifact generation and publishing: [[Gradle_Java_Plugin#archives|archives]] and [[Gradle_Java_Plugin#runtime|runtime]]. Their relationship with artifact publishing is explained in the [[Gradle_Java_Plugin#Overview|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=
=Declaring an Artifact=

Revision as of 15:52, 22 May 2018

External

Internal

Overview

Publishing plugins, such as Maven and Maven Publish, define publishing tasks, which then can be configured in build scripts and used to publish artifacts.

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. In most cases, these files are pushed to a repository.

Extension

Maven 'extension'

Publishing plugin allow it to be configured.

Classifier

Maven 'classifier'

Publishing plugin allow it to be configured.

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