.properties
The properties file synapticloop.testSample.properties file is output to the ./src/main/resources/META-INF/gradle-plugins/ directory. This indicates to gradle that it is a plugin, and the points to the implementation class.
Looking at the file, you will see the contents:
implementation-class=synapticloop.plugin.sample.TestSamplePluginVariables used in the generation
synapticloop.plugin.sample.TestSamplePlugin is generated from the following:
{package}- the command line argument-por--package.- plain text{name}- the command line argument-nor--namePlugin- plain text{lowerName}- this is generated from the-nor--namecommand line argument. NOTE: this is generated from the{name}variable with its first letter lowercased. (e.g.TestSample->testSample)- This is used to create the name of the
.propertiesfile
- This is used to create the name of the
Things of note
You probably won't need to change anything in this file, however, a few things to note:
- The location of the file is important - it must reside in the
/META-INF/gradle-plugins/of the produced artefact (i.e..jarfile) - The name of the file is important - it must be the same as the name of the plugin appended with '.properties' (in this case
synapticloop.plugin.sample.TestSample.properties) - The properties file must contain a key of
implementation-classwith the value being thePluginclass.