Class TypedMaterialsExtension
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidassetsConstant(String fullyQualifiedAssetsClass) Registers a task to search for assets in the resources directory(s) of the project and create constants for each one.voidRegisters a task to search for assets in the resources directory(s) of the project and create a flat file for each one.org.gradle.api.file.DirectoryPropertyThe directory under which generated resources are placed.org.gradle.api.file.DirectoryPropertyThe directory under which generated sources are placed.org.gradle.api.provider.Property<String>voidjarAssetsFile(String jarFilterRegex) Registers a task to search for assets in the resources directory(s) of a jar and create a flat file containing the asset locations.voidjarAssetsFile(String jarFilterRegex, String fileRegex) Registers a task to search for assets in the resources directory(s) of a jar and create a flat file containing the asset locations.voidvoidlibrarySearch(String taskName, String jarFilterRegex, String outputPackage) Registers a task to search for materials in the jars of the project's runtime classpathvoidlocalMaterialsSearch(String outputPackage) Registers a task to search for materials in the standard location of your local project.voidlocalMaterialsSearch(String outputPackage, String materialsDirectory, String resourcesDirName) Registers a task to search for materials in the given directory of your local project.
-
Constructor Details
-
TypedMaterialsExtension
public TypedMaterialsExtension(org.gradle.api.Project project)
-
-
Method Details
-
jmeMaterials
public void jmeMaterials() -
assetsConstant
Registers a task to search for assets in the resources directory(s) of the project and create constants for each one.Note that if you have resources generated by another task you may need to make the task assetConstants dependant upon your task that generates the resources.
- Parameters:
fullyQualifiedAssetsClass- the fully qualified name of the class will be generated to contains the asset paths. E.g. "com.mygame.assets.Assets"
-
assetsFile
public void assetsFile()Registers a task to search for assets in the resources directory(s) of the project and create a flat file for each one.This file is created in the resources root and is named com.onemillionworlds.typedmaterials.assets.txt. This enforced naming is to allow the jarAssetConstant task to find the file later.
Note that if you have resources generated by another task you may need to make the task assetConstants dependant upon your task that generates the resources.
-
jarAssetsFile
Registers a task to search for assets in the resources directory(s) of a jar and create a flat file containing the asset locations.It will also include any local assets
This file is created in the resources root and is named com.onemillionworlds.typedmaterials.assets.txt. This enforced naming is to allow the jarAssetConstant task to find the file later.
-
jarAssetsFile
Registers a task to search for assets in the resources directory(s) of a jar and create a flat file containing the asset locations.It will also include any local assets
This file is created in the resources root and is named com.onemillionworlds.typedmaterials.assets.txt. This enforced naming is to allow the jarAssetConstant task to find the file later.
-
librarySearch
Registers a task to search for materials in the jars of the project's runtime classpath- Parameters:
taskName- just a name for the task, needs to be uniquejarFilterRegex- a regex to filter the jars to search for materials. E.g. ".*jme3-core.*" will search the core jme libraryoutputPackage- the package where the generated materials will be placed. E.g. "org.jme3.core.materials"
-
localMaterialsSearch
Registers a task to search for materials in the standard location of your local project. This function assumes a typical gradle structure, where the materials are in the "src/main/resources/MatDefs" directory.- Parameters:
outputPackage- the package where the generated materials will be placed. E.g. "com.mygame.materials"
-
localMaterialsSearch
public void localMaterialsSearch(String outputPackage, String materialsDirectory, String resourcesDirName) Registers a task to search for materials in the given directory of your local project.- Parameters:
outputPackage- the package where the generated materials will be placed. E.g. "com.mygame.materials"materialsDirectory- the path relative to the module root. E.g. "src/main/resources/MatDefs" or "assets"resourcesDirName- the name of the resources directory. E.g. "resources" or "assets"
-
getGeneratedSourcesDirectory
public org.gradle.api.file.DirectoryProperty getGeneratedSourcesDirectory()The directory under which generated sources are placed. Each task generates into its own subdirectory (named after the task). Default is "build/generated/sources/typedMaterials" -
getGeneratedResourcesDirectory
public org.gradle.api.file.DirectoryProperty getGeneratedResourcesDirectory()The directory under which generated resources are placed. Each task generates into its own subdirectory (named after the task). Default is "build/generated/resources/typedMaterials" -
getMaterialFactoryClass
-