Website | Source
Introduction into C++ Builds with Gradle
Shadow plugin: "Shadow is a Gradle plugin for combining a project's dependency classes and resources into a single output Jar. The combined Jar is often referred to a fat-jar or uber-jar. ... Shadowing a project output has 2 major use cases: (1) Creating an executable JAR distribution, and Bundling and relocating common dependencies in libraries to avoid classpath conflicts."
Reading
Notes
Gradle uses a 1:1 relationship of a build script to a Project instance. Most "magic" comes from the use of plugins (listed below). Thus, the world's simplest Gradle build:
// build.gradle.kts
println("Hello Gradle")
... when run with gradle -b build.gradle.kts
:
~/Projects/Exploration.git/Gradle % gradle -b build.gradle.kts
> Configure project :
Hello Gradle
> Task :help
Welcome to Gradle 8.10.
To run a build, run gradle <task> ...
To see a list of available tasks, run gradle tasks
To see more detail about a task, run gradle help --task <task>
To see a list of command-line options, run gradle --help
For more detail on using Gradle, see https://docs.gradle.org/8.10/userguide/command_line_interface.html
For troubleshooting, visit https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.10/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD SUCCESSFUL in 843ms
1 actionable task: 1 executed
Awesome Gradle
Plugins
Notice: in the following descriptions, "Official plugin" means that it's provided as a builtin plugin by Gradle.
Language
- java - Official plugin that adds Java compilation, testing and bundling capabilities.
- groovy - Official plugin that adds support for building Groovy projects.
- scala - Official plugin that adds support for building Scala projects.
- antlr - Official plugin that adds support for generating parsers using Antlr.
- assembler - Official plugin that adds native assembly language capabilities to a project.
- c - Official plugin that adds C source compilation capabilities to a project.
- cpp - Official plugin that adds C++ source compilation capabilities to a project.
- objective-c - Official plugin that adds Objective-C source compilation capabilities to a project.
- objective-cpp - Official plugin that adds Objective-C++ source compilation capabilities to a project.
- gradle-retrolambda - Get Java lambda support in Java 6, 7 and Android.
- clojurephant - Clojure/ClojureScript support for Gradle
Code quality
Code generation
Java application development
Web application development
Android application development
iOS and Mac application development
Editor and IDE integration
Templating
Database
Dependency management
Debugging
Testing
Building
- build-time-tracker-plugin - Continuously track and report your build times.
- gradle-metrics-plugin - Collect Gradle build metrics and persist them to an external datastore.
- nebula-plugin - A collection of Gradle plugins providing repeatable builds, immutable deployments and helping eliminate boilerplate code.
Packaging
Releasing
Notification
- announce - Official plugin that publishes messages to platforms such as Twitter or Growl.
- gradle-slack-plugin - Send messages to Slack after each build.
Cloud services
SCM
CI
- build-info - Artifactory's open integration layer for the CI servers and build tools.
VM and container
Boilerplates
Resources
General Resources
Official Documentation
Tags:
tool
jvm
android
build
Last modified 07 October 2024