This commit fixes how templates were reloaded. There was a bug in
the plugin which used the output of the precompiled templates for
development only dependencies, instead of the templates directory.
This caused the templates to be always compiled and added as a
resource on runtime classpath, when we only wanted the raw templates.
This commit also adds functional tests to the build logic, which
can be executed by running `./gradlew build-logic:test`.
This commit adds compatibility with the Maven publish plugin, by
making sure that if the application is published, then the uber
jar is published as a classified artifact (`-uber`) in addition
to the regular jar.
A sample publishing configuration was added to the `app`, with
a "local" publishing repository in <rootproject>/build/repo.
For example, calling `./gradlew pAPTBR` will create the
`build/repo` directory with the corresponding Maven repository
structure after publishing.
This commit introduces a _convention plugin_ for RIFE2 support.
It provides a number of advantages:
- the build logic is clearly separated from the build script,
which now only contains user-specific configuration, like the
framework version or how to configure test logging
- it fixes a number of issues like hardcoded dependencies
(`dependsOn` is in general a mistake)
- it removes the need to resolve the agent path eagerly
- it makes the agent configurable
- it clearly separates the user classpath from the RIFE
classpath (both for precompiling templates and for the agent)
- template compilation is cached
- it avoids the abuse of `src/main/resources` to put
templates and uses a dedicated directory instead, which
removes the need for exclusions
In addition, this should make it relatively straightforward
to convert the convention plugin into a proper RIFE2 plugin,
by extracting the code in `build-logic` into its own
repository then publishing to the Gradle plugin portal.