- Qt 6.10
- Qt Jenny: Java Code Generator
- Qt Jenny installation
- Qt 6.10.3 Reference Documentation

# Qt Jenny installation

To install Qt Jenny:

## The quick-start approach

Take the QtJenny Demo as a starting point. It already has a code generation project configured for a set of Android Java classes, and that code generation project is integrated into the main Qt C++ application project.

## The expert approach, and a more detailed explanation

1. You will need to configure a Gradle project that has a dependency to `qtjenny-annotation` and `qtjenny-compiler`. The qtjenny-annotation provides an annotation processor, and qtjenny-compiler provides a KAPT module.

   Qt Jenny can be made to process annotations in Java code, instead of Kotlin, but that's not important, because the annotations are not for the code of the generation project itself; they are there just to trigger wrapper generation for classes that are already defined and available via some package, such as the Android API classes which are provided by the Android SDK.

2. In addition, you need a set of templates for the code generation. The Gradle dependencies do not install any templates, because that would put them in a Gradle cache directory, where editing the templates would be cumbersome. Not all users need to modify the templates, but to allow for that possibility, they are installed separately. The QtJenny Demo has suitable templates installed in its code generation subproject.
3. Once these steps have been done, run the generation build. After that, the code has been generated and is available to be used by the normal Qt C++ project.

   This step happens automatically during the configure step of the Qt C++ project if the CMake project is done as in the QtJenny Demo.