casid / jte

Secure and speedy templates for Java and Kotlin.
https://jte.gg
Apache License 2.0
759 stars 57 forks source link

Can't use the gradle plugin in an Android project #384

Open villevoutilainen opened 1 day ago

villevoutilainen commented 1 day ago

The instructions suggest requiring the java plugin as a dependency. The plugin seems to do that itself, too. A gradle project can't use both the java plugin and the android plugin.

I do not need to run JTE on Android. I need to run it during my Android project's build. I want to precompile my templates, and use them in an annotation processor that also runs during the build, not on the target phone.

Any ideas?

kelunik commented 1 day ago

What are you trying to do with jte then? Generate code within the build process?

villevoutilainen commented 1 day ago

Yeah. The build process runs an annotation processor, which then uses JTE to generate code from those annotations. To be more specific, this is https://github.com/villevoutilainen/Jenny

edward3h commented 22 hours ago

I don't know about Android builds.

I'm imagining your annotation processor depends on JTE plugin at build time. Then the main code depends on the annotation processor at its build time. So the main code build doesn't depend on the JTE plugin.

Does your annotation processor need to be built with the Android toolchain?