售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
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
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜