Creates a library your sync engine can use to generate code from schema.
The main class is Generator.java.
The general usage pattern is:
One time setup:
- Create a config and a generator class. See Pocket's Code Generator for an example.
- Create a gradle task that will produce a jar for your class and copy it into your sync engine module. See the
pocketGenJarPublish
task in build.gradle for an example. - Setup a gradle code generation task in your sync engine module, that will use this jar to run the generator. See [../sync-pocket/build.gradle] for an example.
Any time you modify this libraries generator code:
- Run your gradle task to regenerate your jar and copy it over to your module.
Now anytime you update your schema or rebuild your sync engine, it will regenerate the classes for you.
- Make changes to the generation code as needed.
- Re-run your publishing gradle task (described above in the usage section).
Tip: Use the Republish sync-gen Libraries
runtime configuration that should automatically be included in your IDE to run step 2 easily and quickly.
Debug the Republish sync-gen Libraries
runtime configuration.