Platform Specific APIs

Don't like annotation magic? Use plain java.

You are not forced to use Architectury Injectables to access platform-specific APIs. You may just use something simpler, like an interface, or through ServiceLoader.

Architectury Injectables

Architectury Plugin adds Architectury Injectables to your common module.

Disabling Architectury Injectables

Add injectInjectables = false in front of common() in the common module architectury extension block.

ArchitecturyTarget

Architectury Injectables provide ArchitecturyTarget.getCurrentTarget(), which returns the identifier of the current target, it may be (but not limited to): * fabric * forge

Expect Platform