Gradle Native Release Notes
Changes included in Gradle nightly (next release)
- Incremental compile processor takes preprocessor macros declared on the compile task into account - #882
- Support for declaring different architecture targets (x86, x86-64) #777
Changes included in Gradle 5.0
Since 4.0, the Gradle team have been hard at work improving support for native projects in Gradle.
We announced our focus shift from the software model to the current configuration model to make developing native projects more similar to existing Java, Groovy and Scala plugins. This led to the development of the new C++ plugins that are used throughout our use-case focused samples.
Those new C++ plugins are still experimental but will eventually replace the software model based C++ plugins.
During the 4.x releases, we made changes to Visual Studio solution generation to make it easier to work with multi-project builds in Visual Studio. We also introduce support for developing C++ with the Xcode IDE on macOS. JetBrains integrated support for importing and syncing Gradle projects into Clion.
We expanded our tool chain support to include Visual Studio 2017 together with Windows 10 SDK.
We improved performance by supporting parallel execution for compilation and linking. We also support for cached compilation. With the new C++ plugins, it is possible to unit test a C++ application right out-of-the-box.
We recently introduced source dependencies, which allow any Gradle project (native or not) to build against a git repository.
- C++ compilation uses correct system includes files on Cygwin - #763
- Improve performance for header analysis when external macros are defined - #882
Changes included in Gradle 4.10
- C++ tooling API model that IDEs can use for import or sync - #673
- Source dependencies honor the
--offlineflag - #430
- Source dependencies reduce remote Git operations - #403
Changes included in Gradle 4.9
- Fixed text rendering issues in console that caused output from long running tasks to be broken by tasks that produced no output #669
- XCTest succeeds when it should fail #378
Changes included in Gradle 4.8
cpp-unit-test plugin was fixed so that the dependencies of the main component are visible to the unit test binaries at compile and link time.
Allow C++ application to be tested
cpp-unit-test plugin will automatically relocate the main symbol to avoid duplicate
_main symbol errors.
Note this feature is not yet supported on Windows.
Performance improvements for header analysis
Gradle will reuse header analysis from the previous execution if nothing has changed.
In previous versions of Gradle, the native compile task include path was a single monolithic collection of files that was accessible through the
includes property on the compile task.
In Gradle 4.8, system header include directories can now be accessed separately via the
On GCC-compatible toolchains, the system header include directories specified with
systemIncludes will be specified on the command line using the "-isystem" argument, which marks them for special treatment by the compiler.
Changes included in Gradle 4.7
- Converted all of the Swift-related tasks to use the Provider API consistently #308.
- Added support for declaring the target operating systems for C++/Swift applications and libraries. #509.
- Added support for Visual Studio solution generation using the
visual-studioplugin. #465, #476, #506
- Allow generated Xcode workspace, Visual Studio solution or IDEA project to be opened more easily from the command line. #553
- Various Xcode workspace generation fixes. #474, #470, #552
- Added a sample that shows how to use libraries built by CMake from Gradle builds.
- Added a sample that shows how to configure the C++ plugins to build C source code, as a workaround until we add C plugins.
- Added a sample that shows how to use Gradle to provision a tool chain for the build.
- Fixed Visual Studio version detection to prevent bad Visual Studio installations from failing the build. #570
- Made Visual Studio project generation incremental, so only Visual Studio project files that have changed are regenerated. #506
Changes included in Gradle 4.6
- Simplified Visual Studio project generation in multi-project builds to create a single solution instead of a solution for every project. #410
- Refactored the
visual-studioplugin to make it easier for us to add support for the new C++ plugins. #407
- Added performance tests for Swift-based builds. #209
- Added incremental compilation support for Swift. #112
- Fixed handling of more failure cases for source dependencies. #421 #422
sourceCompatibilityfor a Swift component. Gradle tries to select the best compiler for producing a given Swift language level. #151
- Support version range descriptors for source dependencies. #195
- Support source dependencies on a branch. #417
- Support injecting build configuration into a source dependency. Gradle can consume non-Gradle source dependencies by injecting a Gradle build on top. #89
- Support generation of a Swift Package Manager manifest file from the Gradle model. #40
This list is incomplete.
Changes included in earlier Gradle releases
gradle-native has been adding features since Gradle 4.1. Features are introduced as
@Incubating and may change between Gradle minor releases.