Important : the Jeyzer Gradle plugin will be supported officially from Jeyzer 2.4 and be made available in the Gradle Plugin portal.
In the meantime, feel free to take it from the Jeyzer Community project.
The Gradle profile updater plugin permits to update your Jeyzer profile during the Gradle build your application. This must be performed after the java compilation.
The Jeyzer profile updater is responsible for adding/updating/deleting the Jeyzer analysis pattern changes within your master or shared profile.
Pattern changes are the result of the compilation of the Jeyzer annotations referenced in your applicative source code.
The resulting pattern profile file is generated along with its original source file, suffixed by .source
to allow easy file diff.
It has been tested with Gradle 6.3.
The plugin takes as parameters :
sourcePatterns
: the patterns source XML file path. MandatorynewPatternEntries
: the new pattern entries XML file path. Optional
Default value is :${project.build.directory}/generated-sources/jeyzer/new_pattern_entries.xml
targetPatternsDir
: the patterns output directory. Optional
Default value is :${project.build.directory}/generated-sources/jeyzer
targetPatternsName
: the generated patterns file name (without file extension). Optional
Default value is the source patterns file name.
Usage
In your build.gradle import the Jeyzer plugin :
plugins { id 'org.jeyzer.profile-updater' version '2.0' }
And call the profileUpdateJeyzerTask which requires the following settings block :
profileUpdateJeyzerTaskSettings { sourcePatterns "$projectDir/src/main/config/profiles/master/demo-features-mx/analysis/patterns.xml" newPatternEntries "$buildDir/../target/generated-sources/jeyzer/new_pattern_entries.xml" targetPatternsDir "$buildDir/generated-sources/jeyzer" targetPatternsName "gradle-generated-patterns" } build.dependsOn(profileUpdateJeyzerTask)
This example is an extract from the Jeyzer demo build.gradle
This Gradle plugin is a Jeyzer Community project.