Gradle User Manual
Version 4.7
Table of Contents
About Gradle
Introduction
Overview
Working with existing builds
Installing Gradle
Command-Line Interface
The Gradle Wrapper
The Gradle Daemon
Dependency Management for Java Projects
Executing Multi-Project Builds
Composite builds
Build Environment
Troubleshooting
Embedding Gradle using the Tooling API
Build Cache
Writing Gradle build scripts
Build Script Basics
Build Init Plugin
Writing Build Scripts
Authoring Tasks
Working With Files
Using Ant from Gradle
Build Lifecycle
Logging
Authoring Multi-Project Builds
Using Gradle Plugins
Standard Gradle plugins
The Project Report Plugin
The Build Dashboard Plugin
Comparing Builds
Publishing artifacts
The Maven Plugin
The Signing Plugin
Ivy Publishing (new)
Maven Publishing (new)
The Distribution Plugin
The Announce Plugin
The Build Announcements Plugin
Dependency management
Introduction to Dependency Management
Declaring Dependencies
Managing Dependency Configurations
Declaring Repositories
Inspecting Dependencies
Managing Transitive Dependencies
Working with Dependencies
Customizing Dependency Resolution Behavior
Troubleshooting Dependency Resolution
Extending the build
Writing Custom Task Classes
Writing Custom Plugins
Gradle Plugin Development Plugin
Organizing Build Logic
Lazy Configuration
Initialization Scripts
Testing Build Logic with TestKit
Building JVM projects
Java Quickstart
Building Java & JVM projects
Testing in Java & JVM projects
The Base Plugin
The Java Plugin
The Java Library Plugin
Web Application Quickstart
The War Plugin
The Ear Plugin
The Jetty Plugin
The Application Plugin
The Java Library Distribution Plugin
Groovy Quickstart
The Groovy Plugin
The Scala Plugin
The ANTLR Plugin
The Checkstyle Plugin
The CodeNarc Plugin
The FindBugs Plugin
The JDepend Plugin
The PMD Plugin
The JaCoCo Plugin
The OSGi Plugin
The Eclipse Plugins
The IDEA Plugin
Best practices
Authoring Maintainable Build Scripts
Organizing Build Logic
The Software model
Rule based model configuration
Software model concepts
Implementing model rules in a plugin
Building Play applications
Building native software
Extending the software model
Glossary
Dependency Management Terminology
Dependency Types
Repository Types
The Dependency Cache
Appendix
A. Gradle Samples
B. Potential Traps
C. The Feature Lifecycle
D. Documentation licenses
List of Examples
1. Excluding tasks
2. Abbreviated camel case task name
3. Obtaining detailed help for tasks
4. Information about properties
5. Running the Wrapper task
6. The generated distribution URL
7. Providing options to Wrapper task
8. The generated distribution URL
9. Executing the build with the Wrapper batch file
10. Upgrading the Wrapper version
11. Checking the Wrapper version after upgrading
12. Customizing the Wrapper task
13. The generated distribution URL
14. Specifying the HTTP Basic Authentication credentials using system properties
15. Specifying the HTTP Basic Authentication credentials in distributionUrl
16. Configuring SHA-256 checksum verification
17. Dependency declarations for a Java-based project
18. Definition of a module dependency
19. Usage of Maven central repository
20. Usage of a local Ivy directory
21. Publishing to a Maven repository
22. Listing the projects in a build
23. Dependencies of my-app
24. Declaring a command-line composite
25. Declaring a separate composite
26. Depending on task from included build
27. Build that does not declare group attribute
28. Declaring the substitutions for an included build
29. Depending on a single task from an included build
30. Depending on a tasks with path in all included builds
31. Setting properties with a gradle.properties file
32. Specifying system properties in gradle.properties
33. Setting a project property via gradle.properties
34. Setting a project property via environment variable
35. Changing JVM settings for Gradle client JVM
36. Changing JVM settings for forked Gradle JVMs
37. Set Java compile options for tasksJavaCompile
38. Prevent releasing outside of CI
39. Configuring an HTTP proxy using gradle.properties
40. Configuring an HTTPS proxy using gradle.properties
评论0