Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Gradle Dependency Management

You're reading from   Gradle Dependency Management

Arrow left icon
Product type Paperback
Published in Jun 2015
Publisher
ISBN-13 9781784392789
Length 188 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Hubert Klein Ikkink Hubert Klein Ikkink
Author Profile Icon Hubert Klein Ikkink
Hubert Klein Ikkink
Arrow right icon
View More author details
Toc

Defining publication

We must add the maven-publish plugin to our project to add the new publication feature of Gradle. The plugin allows us to define and deploy our project artifacts in the Maven format. This means our deployed project can be used by other developers and projects that support the Maven format. For example, other projects could use Gradle or Maven and define a dependency to our published artifacts.

The maven-publish plugin is based on a general publishing plugin. The publishing plugin adds a new publishing extension to our project. We can use a publications configuration block in our build script to configure the artifacts we want to publish and the repositories we want to deploy to. The publications extension has the PublishingExtension type in the org.gradle.api.publish package. The plugin also adds the general life cycle publish task to the project. Other tasks can be added as task dependencies to this task; thus, with a single publish task, all the publications in the...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime