google / truth

Fluent assertions for Java and Android

Home Page:https://truth.dev/

Repository from Github https://github.comgoogle/truthRepository from Github https://github.comgoogle/truth

Provide Java Module name

sormuras opened this issue · comments

Truth doesn't provide an AUTOMATIC-MODULE-NAME, like com.google.truth, via its manifest. PresentModule.java yields:

java PresentModule.java com.google.truth:truth:1.0
path = truth-1.0.jar
name = truth
mode = automatic
automatic name source = FILENAME
api = 1 package(s)

At least, provide a more stable module name via Truth's manifest.

Better, provide a compiled module descriptor.

See also google/error-prone#1116 and linked friends.

Adding the felix plugin to pom.xml should take care of this.

Friendly ping on this.

I think I have been assuming that this doesn't help a ton until we fix the split package (#746). Do you think it would help even before that? The split-package thing might take a little effort, but this smaller change sounds easy enough.

The split-package thing might take a little effort, but this smaller change sounds easy enough.

@cpovirk I haven't seen much info on the long term consequences of adding this, but several other libraries (like Junit) have done something to ease module support. If there would be long term pain to doing this, (i.e. can't add module-info in the future, mixed ABI classes can't work together), then don't feel pressured to add it.