Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Gradle Dependency Management

You're reading from  Gradle Dependency Management

Product type Book
Published in Jun 2015
Publisher
ISBN-13 9781784392789
Pages 188 pages
Edition 1st Edition
Languages
Author (1):
Hubert Klein Ikkink Hubert Klein Ikkink
Profile icon Hubert Klein Ikkink

Generating Ivy descriptor files


An important part of an Ivy publication is the descriptor file. We already saw that Gradle added a generateDescriptorFile<publicationName> task to our project. Furthermore, we can define some properties of the descriptor file inside a publication configuration. Gradle also offers a hook to customize the generated descriptor file even further.

Gradle uses the project's version, group, name, and status properties for the info element in the Ivy descriptor file generated. We will create a new example build file where we define the project properties, so they will be included in the file:

apply plugin: 'ivy-publish'
apply plugin: 'java'

// Defined project properties, that are
// used in the generated descriptor file.
// The name of the project is by default
// the directory name, but we can
// change it via a settings.gradle file
// and the rootProject.name property.
version = '2.1.RELEASE'
group = 'book.gradle'

repositories {
  jcenter()
}

dependencies...
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 $15.99/month. Cancel anytime}