2
0
Fork 0
mirror of https://github.com/ethauvin/rife2-hello.git synced 2025-04-25 23:37:12 -07:00
Commit graph

8 commits

Author SHA1 Message Date
57a604c599 Minor cleanup 2023-02-28 23:46:10 -08:00
c33235a1ac Added description and group for the uberJar task. 2023-02-27 19:14:36 -08:00
269971663b Minor cleanup 2023-02-27 18:48:12 -08:00
d954e75cf5 Added a RunTask which includes the templates directory in the runtime classspath 2023-02-26 17:58:21 -08:00
Cedric Champeau
f6deafda3a
Add support for publishing the fat jar
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.
2023-02-22 13:49:25 +01:00
Cedric Champeau
c8b3cc7890
Fix reload of templates in dev mode
The `run` task is considered a development mode, where the templates
should be reloaded live. This means that the `run` task will not
use the precompiled templates, but the source templates instead.

The `test` task will also use precompiled templates, while the
`jar` and `uberJar` tasks will also make sure to bundle precompiled
templates and not the source ones.
2023-02-22 13:32:30 +01:00
0d3f587bb4 Minor cleanups 2023-02-21 18:20:14 -05:00
Cedric Champeau
2e025cd693 Rework Gradle build
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.
2023-02-21 23:52:36 +01:00