类 CloudLangPlugin

java.lang.Object
dev.vfyjxf.cloudlib.gradle.lang.CloudLangPlugin
所有已实现的接口:
org.gradle.api.Plugin<org.gradle.api.Project>

public class CloudLangPlugin extends Object implements org.gradle.api.Plugin<org.gradle.api.Project>
Implements the distributed language system:
  • generateLangKeys - reads the yaml files of the default locale and generates the "R-like" key class (configurable name and package) with LangEntry constants grouped into nested classes mirroring the key structure.
  • generateLangResources - merges the distributed yaml files of every locale and packs them into vanilla assets/<modId>/lang/<locale>.json files, wired into processResources so they end up in the jar (mirroring how the NeoForge MDK generates neoforge.mods.toml at build time).

Sources are src/main/lang/<locale>/**.yaml (hand-written) and build/generated/datagen/lang/<locale>/**.yaml (datagen output). Both are merged, with the datagen files taking precedence on conflicts.

  • 构造器详细资料

    • CloudLangPlugin

      public CloudLangPlugin()
  • 方法详细资料

    • apply

      public void apply(org.gradle.api.Project project)
      指定者:
      apply 在接口中 org.gradle.api.Plugin<org.gradle.api.Project>