类 CloudLangExtension

java.lang.Object
dev.vfyjxf.cloudlib.gradle.lang.CloudLangExtension

public abstract class CloudLangExtension extends Object
Configuration for the distributed language system.

 cloudLang {
     modId = 'mymod'
     packageName = 'com.example.mymod.lang'
     className = 'ModLang'
     constantNameStyle = 'camel'
 }
 
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    abstract org.gradle.api.provider.Property<String>
    Simple name of the generated key class (the "R-like" class).
    abstract org.gradle.api.provider.Property<String>
    Naming style of the generated constants: camel, pascal or upper_snake.
    abstract org.gradle.api.provider.Property<String>
    Locale whose entries drive the generated key class.
    abstract org.gradle.api.provider.Property<String>
    Fully qualified name of the entry type referenced by the generated key class.
    abstract org.gradle.api.provider.Property<String>
    Fully qualified annotation put on the generated class to mark it as generated.
    abstract org.gradle.api.file.DirectoryProperty
    Root of the datagen-produced distributed yaml files, merged over the hand-written ones.
    abstract org.gradle.api.provider.Property<String>
    The mod id, used as the translation key prefix and the asset namespace of the packed json files (assets/<modId>/lang/<locale>.json).
    abstract org.gradle.api.provider.Property<String>
    Package of the generated key class.
    abstract org.gradle.api.file.DirectoryProperty
    Root of the hand-written distributed yaml files (<dir>/<locale>/**.yaml).

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 构造器详细资料

    • CloudLangExtension

      public CloudLangExtension()
  • 方法详细资料

    • getModId

      public abstract org.gradle.api.provider.Property<String> getModId()
      The mod id, used as the translation key prefix and the asset namespace of the packed json files (assets/<modId>/lang/<locale>.json).
    • getPackageName

      public abstract org.gradle.api.provider.Property<String> getPackageName()
      Package of the generated key class.
    • getClassName

      public abstract org.gradle.api.provider.Property<String> getClassName()
      Simple name of the generated key class (the "R-like" class). Defaults to LangKeys.
    • getConstantNameStyle

      public abstract org.gradle.api.provider.Property<String> getConstantNameStyle()
      Naming style of the generated constants: camel, pascal or upper_snake. Defaults to upper_snake (the classic "R class" look). Individual entries can override this with an explicit $field: name in the yaml files.
    • getGeneratedAnnotation

      public abstract org.gradle.api.provider.Property<String> getGeneratedAnnotation()
      Fully qualified annotation put on the generated class to mark it as generated. Defaults to javax.annotation.processing.Generated; set to an empty string to disable.
    • getEntryClass

      public abstract org.gradle.api.provider.Property<String> getEntryClass()
      Fully qualified name of the entry type referenced by the generated key class. Defaults to dev.vfyjxf.cloudlib.data.lang.LangEntry.
    • getDefaultLocale

      public abstract org.gradle.api.provider.Property<String> getDefaultLocale()
      Locale whose entries drive the generated key class. Defaults to en_us.
    • getSourceDirectory

      public abstract org.gradle.api.file.DirectoryProperty getSourceDirectory()
      Root of the hand-written distributed yaml files (<dir>/<locale>/**.yaml). Defaults to src/main/lang.
    • getGeneratedSourceDirectory

      public abstract org.gradle.api.file.DirectoryProperty getGeneratedSourceDirectory()
      Root of the datagen-produced distributed yaml files, merged over the hand-written ones. Defaults to build/generated/datagen/lang, the sibling of the standard ModDev data run output folder (build/generated/datagen/resources).