Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Java Modules #289

Open
aalmiray opened this issue Feb 17, 2023 · 1 comment
Open

Support Java Modules #289

aalmiray opened this issue Feb 17, 2023 · 1 comment

Comments

@aalmiray
Copy link

v0.9.10 defines an automatic module name

$ jarviz module descriptor --file compiler-0.9.10.jar 
name: com.github.mustachejava
version: 0.9.10
open: false
automatic: true
requires:
  java.base mandated
contains:
  com.github.mustachejava
  com.github.mustachejava.codes
  com.github.mustachejava.functions
  com.github.mustachejava.reflect
  com.github.mustachejava.reflect.guards
  com.github.mustachejava.resolver
  com.github.mustachejava.util

I'd be great if the library supplied a full Java module descriptor. It's possible to keep bytecode baseline compatible with Java 8 while providing a full module descriptor thanks to ModiTect. This will help modular projects that consume mustache-java, specifically those that create custom Java Runtimes with jlink, as the latter does not support automatic modules but explicit modules. If interested I can send a PR to make it happen.

@bademux
Copy link

bademux commented May 6, 2023

extra-java-module-info can be used, but native modularization would be preferable.

plugins {
	id 'org.gradlex.extra-java-module-info' version '1.4'
}
extraJavaModuleInfo {
	failOnMissingModuleInfo = true
	module('com.github.spullara.mustache.java:compiler', 'com.github.mustachejava') {
		requiresStatic 'java.logging'

		exports 'com.github.mustachejava'
		exports 'com.github.mustachejava.reflect'
		exports 'com.github.mustachejava.util'
	}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants