Mastering Gradle
eBook - ePub

Mastering Gradle

Mainak Mitra

Compartir libro
  1. 284 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

Mastering Gradle

Mainak Mitra

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

If you are a developer with some experience in build tool and want to become an expert in build tool, then this book is for you. Basic knowledge of Gradle or any other build tool is essential.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Mastering Gradle un PDF/ePUB en línea?
Sí, puedes acceder a Mastering Gradle de Mainak Mitra en formato PDF o ePUB, así como a otros libros populares de Informatica y Programmazione open source. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2015
ISBN
9781783981366
Edición
1
Categoría
Informatica

Mastering Gradle


Table of Contents

Mastering Gradle
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Getting Started with Gradle
Understanding Build Automation System
Need for BAS
Gradle overview
Installation and quick start
Pre-requisites
Gradle for Windows
Gradle for Mac/Linux
The Gradle JVM option
Our first script
Gradle command Line arguments
The Gradle GUI
Start up script
Build life cycle
Initialization
Configuration
Execution
Cache management
Cache location
Change Cache location
Cache features
Reduce the traffic
Dependency location
Version integration
Switching off remote checking
Version conflicts
Gradle with IDE
Installing the Gradle plugin in Eclipse
Working with the Gradle project in IDE
Summary
2. Groovy Essentials for Gradle
Overview
Integration with Java
Minimum code
Simpler I/O operations
Integration with Ant
Builder classes
Closure
Groovy script for Hello World
Data types
String
Dynamic typing in Groovy
Classes, beans, and methods
Control structures
The if-else condition
The switch statement
Loops
Collections
Set
List
Map
Range
Closure
Builder
Summary
3. Managing Task
Build script basics
Task configuration
Task execution
Task dependency
Task ordering
Task operations
Conditional execution
Build optimization
Task rules
Gradle's in-built tasks
The Copy Task
The Rename Task
The Zip task
Custom tasks
Using buildSrc
The standalone task
Summary
4. Plugin Management
The script plugin
The binary plugin
Gradle's in-built plugins
Build and Test plugins
Code analysis plugins
IDE plugins
The Java plugin
Conventions
Configuration
The custom plugin
The build file
The buildSrc directory
The Standalone project
Summary
5. Dependency Management
Overview
Dependency configurations
Dependency types
Repositories
Repositories configuration
Dependency resolution
Transitive dependency
Exclude transitiveness
Selective exclude
Version conflicts
Dynamic dependency
Customizing the dependency
Download file other than JAR
Dependency on files with classifiers
Replacing transitive dependencies
Custom configuration for dependency
Dependency reports
Dependency-specific details
Publishing artifacts
Default artifacts
Custom artifacts
Generate additional XML file along with your JAR file
Generate an additional ZIP file along with your JAR file
Custom configuration
The maven-publish plugins
Publishing to the local-hosted repository
Custom POM
Summary
6. Working with Gradle
The War plugin
The Scala plugin
Logging
File management
Reading files
Writing files
Creating files/directories
File operations
Filter files
Delete files and directories
FileTree
Property management
ext closure
gradle.properties
The command line
The Custom properties file
Multi-project build
The Multi-project structure
The Multi-project execution
Task execution
The Flat hierarchy
Interproject dependency
Configuration-level dependency
Task-level dependency
Library dependency
Partial builds
buildDependents
buildNeeded
Testing with Gradle
JUnit
Test configuration
maxParallelForks
The forkEvery option
ignoreFailures
filter
TestNG
Execution based on group
Execution based on the TestNG suite file
Summary
7. Continuous Integration
Jenkins walk-through
Jenkins installation
Jenkins configuration
Create job
Execute job
Checkstyle and PMD plugins
The Sonar Runner plugin
TeamCity walk-through
Summary
8. Migration
Migration from Ant
Importing Ant file
Accessing properties
Update Ant tasks
Using AntBuilder API
Rewriting to Gradle
Configuration
Migration from Maven
Build filename and project properties
Properties
Dependency management
Exclude transitive
Plugin declaration
Repository configuration
Multi-module declaration
Default values
Gradle init Plugin
Summary
9. Deployment
Role of Gradle in deployment
Docker overview
Installing Docker
Docker commands
Help command
Download image
The list of images
Creating a container
The container list
Start/stop container
Connecting to a container
Deleting a container
Removing an image
Copying files to the container
Container details
Updating DNS settings
Creating an image from a container
Running an application in Docker
Build, Deployment, and Test pipeline
Summary
10. Building Android Applications with Gradle
Creating Android project using Android Studio
Building the Android project with Gradle
buildTypes
ProGuard settings
Build flavors
Running the application on a device/emulator
Signing the release version
Summary
Index

Mastering Gradle

Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or ...

Índice