# Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] [unreleased]: https://github.com/infolektuell/gradle-jextract/compare/v1.2.0...HEAD ### Added - Added task to create JMOD archives. These contain compiled classes, but also native headers and binaries. They can be linked into custom JRE runtime images and the native libs can load more efficiently than unpacking them from JAR resources. - Libraries with `use-system-load-library` become testable, so the JMOD scenario is no problem for testing. The required binaries are added to the library path in runtime tasks. The directories that contain binaries or headers are configurable via source directory sets in the DSL extension. - Gradle Native projects can be added as dependency. Their outgoing API headers and runtime libs become available for Jextract and will be part of the created JMOD archive. Jextract only understands C-compatible libs and headers, no C++. The Native project must be a C project. - Per convention, the plugin guesses header and library filenames by the library's name. ### Breaking changes - The API to define headers has changed. A configured library has an include search path of directories to search for header files, and the actual headers are configured as filename strings. This was necessary to integrate search directories coming from resolved configurations. Per convention, `src//public` is configured as includes directory. - Libraries are configured directly per source set, not in the top-level extension anymore. The test source set anyway inherits the main source set, and such inheritance can be defined by extending configurations ### Improvements - The order of applying the plugin and other Java plugins doesn't matter anymore. - Improved lazy configuration. ## [1.2.0] - 2026-01-017 [1.2.0]: https://github.com/infolektuell/gradle-jextract/compare/v1.1.0...v1.2.0 ### Breaking - Upgraded required JRE and Gradle versions for the plugin: - Requires Java 21 or higher, was Java 17 before. - Requires Gradle 8.5 or above that is compatible with Java 21. - This doesn't affect Java toolchains. ### Changed - The code has been migrated to Java to get rid of the Kotlin dependency. This shouldn't be a breaking change. - If the plugin finds a cached version of a file to be downloaded, its validity is checked by comparing its checksum with that of the download resource. - The `JextractStore` build service loads the distribution data once when it is created. ## [1.1.0] - 2025-11-04 [1.1.0]: https://github.com/infolektuell/gradle-jextract/compare/v1.0.0...v1.1.0 ### Added - [Jextract 25 binaries](https://jdk.java.net/jextract/) can be used. ### changed - Migrated example project to pure Java because Kotlin still doesn't support Java 25 compile target. ## [1.0.0] - 2025-10-04 [1.0.0]: https://github.com/infolektuell/gradle-jextract/compare/v1.0.0-beta-2...v1.0.0 ### Added - Added example project with native binaries as resources - Docs: Added latest release to site title - Added API docs generated by Dokka ## [1.0.0-beta-2] - 2025-09-28 [1.0.0-beta-2]: https://github.com/infolektuell/gradle-jextract/compare/v1.0.0-beta-1...v1.0.0-beta-2 ### Fixed - Recognizes Windows OS again. ## [1.0.0-beta-1] - 2025-09-28 [1.0.0-beta-1]: https://github.com/infolektuell/gradle-jextract/compare/v0.5.0...v1.0.0-beta-1 ### Added - Managing Jextract installations has moved to a shared build service. Running `clean` doesn't destroy the downloads and installations anymore, because they are no build artefacts or task outputs. This reduces Jextract-related network requests. - Custom download locations for Jextract distributions can be configured in the DSL extension. Configuring the download task isn't necessary anymore. ### Changed - The DSL to configure the Java version for the plugin has changed. Builds that let the plugin use the toolchain are not affected. - The Jextract tasks have been reimplemented without the worker API. If you configure the tasks directly in your build, this version will be a breaking change for you. Please try to configure the plugin via DSL, or migrate to the new tasks. ### Fixed - Task dependencies are declared properly, so Kotlin and similar tasks run after Jextract. - Configuration cache doesn't fail anymore with “executable not found” error. ### Removed - Tasks that make use of the worker API have been removed and replaced with the new implementations. - Tasks for downloading and extracting Jextract have been removed and replaced with the shared build service. ## [0.5.0] - 2025-05-18 [0.5.0]: https://github.com/infolektuell/gradle-jextract/compare/v0.4.0...v0.5.0 ### Changed - Replace the nested resource property of DownloadTask with a property that receives an instance of the Resource class from a separate business model. The values of these resources strictly belong together, so a data class coming from a business model is more appropriate than a bean with separate properties. - The plugin adds an extension to each source set where Jextract libraries can be added. This breaking API change improves flexibility and stability. ### Added - Add output properties in DSL extension to customize the output path per library or as a parent folder for all libraries without a specified output path. If a library has no explicit output path, its name is used to create a subdirectory under the top-level output path. If no explicit top-level output is given, it defaults to a convention in the build directory. - Add DSL properties to configure Jextract 21 to generate source files instead of class files (per library or top-level). ### Fixed - Check for the Java toolchain version only if and after the Java plugin is applied. - Pass the `--use-system-load-library` command line flag only to Jextract 22 or above, fails with Jextract 21 and below. ### Removed - Remove The sourceSet property in the DSL which is superseded by a source set extension. ## [0.4.0] - 2024-11-08 [0.4.0]: https://github.com/infolektuell/gradle-jextract/compare/v0.3.0...v0.4.0 ### Changed - When Jextract 22 is requested, Build 22-jextract+6-47 will be downloaded from now on. ### Fixed - Improved configuration cache stability by moving provider creation to task action. ## [0.3.0] - 2024-10-12 [0.3.0]: https://github.com/infolektuell/gradle-jextract/compare/v0.2.1...v0.3.0 ### Added - Create a changelog file for release notes - The source set the generated sources are added to is now user-selectable via extension property, `main` is chosen by default. - Tasks became cacheable, so the downloaded Jextract archives and generated sources can be shared and re-used via build cache. ### Changed - Jextract is downloaded and installed to the project build directory to avoid access conflicts for output files and directories in multi-project builds. ## [0.2.1] - 2024-09-28 [0.2.1]: https://github.com/infolektuell/gradle-jextract/compare/v0.2.0...v0.2.1 ### Fixed - Make DownloadTask compatible with the configuration cache. ## [0.2.0] - 2024-09-27 [0.2.0]: https://github.com/infolektuell/gradle-jextract/compare/v0.1.0...v0.2.0 ### Added - Support argFile configuration as an alternative filtering mechanism to setting included symbols directly in the extension, use `whitelist.argFile` property in the library config. - Add `DumpIncludes` task to dump includes encountered in a library's headers to a text file in the build directory per convention: `gradlew dumpIncludes`. This file can be copied and modified for further usage as argFile. ### Changed - Parallelize tasks running Jextract for faster multi-lib builds. ### Fixed - Use Jextract 22 for JVM 23. ### Removed - Remove the custom download location DSL, but the download task can be configured with custom URLs. - Remove the separate download plugin and merge download stuff into this plugin. ## [0.1.0] - 2024-09-16 [0.1.0]: https://github.com/infolektuell/gradle-jextract/releases/tag/v0.1.0 ### Added - Tasks to download and install Jextract from the official EA download page - Task to generate bindings for given headers using Jextract - DSL extension to configure multiple native libraries and desired Jextract version/installation