Fix javadoc jar generation and javadoc building ()

* Update build.gradle for testing

Signed-off-by: liach <liach@users.noreply.github.com>

* Fix javadocs

Signed-off-by: liach <liach@users.noreply.github.com>

Co-authored-by: liach <liach@users.noreply.github.com>
This commit is contained in:
liach 2020-04-05 09:07:27 -05:00 committed by GitHub
parent 88afe607db
commit 655c8d6a5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 60 additions and 52 deletions
build.gradle
fabric-api-base/src/main/java/net/fabricmc/fabric/api/util
fabric-dimensions-v1/src/main/java/net/fabricmc/fabric/api/dimension/v1
fabric-particles-v1/src/main/java/net/fabricmc/fabric/api
fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1
fabric-rendering-fluids-v1/src/main/java/net/fabricmc/fabric/api/client/render/fluid/v1

View file

@ -31,8 +31,8 @@ def getSubprojectVersion(project, version) {
}
}
def getBranch(){
if(System.getenv().GIT_BRANCH){
def getBranch() {
if (System.getenv().GIT_BRANCH) {
def branch = System.getenv().GIT_BRANCH
return branch.substring(branch.lastIndexOf("/") + 1)
}
@ -113,17 +113,33 @@ allprojects {
}
javadoc {
options.memberLevel = "PACKAGE"
allprojects.each{
source( it.sourceSets.main.allJava.srcDirs)
}
options {
source = "8"
encoding = 'UTF-8'
charSet = 'UTF-8'
memberLevel = JavadocMemberLevel.PACKAGE
links(
'https://guava.dev/releases/21.0/api/docs/',
'https://asm.ow2.io/javadoc/',
'https://docs.oracle.com/javase/8/docs/api/',
'http://jenkins.liteloader.com/job/Mixin/javadoc/',
'https://logging.apache.org/log4j/2.x/log4j-api/apidocs/'
// Need to add minecraft jd publication etc once there is one available
)
// Disable the crazy super-strict doclint tool in Java 8
addStringOption('Xdoclint:none', '-quiet')
}
allprojects.each {
source(it.sourceSets.main.allJava.srcDirs)
}
classpath = sourceSets.main.compileClasspath
include ("**/api/**")
include("**/api/**")
failOnError false
}
task javadocJar(type: Jar) {
from javadoc
dependsOn javadoc
from javadoc.destinationDir
//Set as `fatjavadoc` to prevent an ide form trying to use this javadoc, over using the modules javadoc
classifier = 'fatjavadoc'
}
@ -150,17 +166,7 @@ subprojects {
}
}
repositories {
maven {
url "http://mavenupload.modmuss50.me/"
if (project.hasProperty('mavenPass')) {
credentials {
username 'buildslave'
password project.getProperty('mavenPass')
}
}
}
}
setupRepositories(repositories)
}
javadoc.enabled = false
@ -183,9 +189,7 @@ publishing {
artifact(sourcesJar) {
builtBy remapSourcesJar
}
artifact (javadocJar) {
builtBy javadocJar
}
artifact javadocJar
pom.withXml {
def depsNode = asNode().appendNode("dependencies")
subprojects.each {
@ -199,14 +203,17 @@ publishing {
}
}
repositories {
maven {
setupRepositories(repositories)
}
void setupRepositories(RepositoryHandler repositories) {
//repositories.mavenLocal() // uncomment for testing
if (project.hasProperty('mavenPass')) {
repositories.maven {
url "http://mavenupload.modmuss50.me/"
if (project.hasProperty('mavenPass')) {
credentials {
username 'buildslave'
password project.getProperty('mavenPass')
}
credentials {
username 'buildslave'
password project.getProperty('mavenPass')
}
}
}
@ -230,7 +237,7 @@ version = Globals.baseVersion + "+" + (ENV.BUILD_NUMBER ? ("build." + ENV.BUILD_
logger.lifecycle("Building Fabric: " + version)
curseforge {
if (project.hasProperty('curse_api_key')){
if (project.hasProperty('curse_api_key')) {
apiKey = project.getProperty('curse_api_key')
}
project {
@ -245,7 +252,7 @@ curseforge {
uploadTask.dependsOn("remapJar")
}
}
options{
options {
forgeGradleIntegration = false
}
}

View file

@ -24,8 +24,8 @@ import net.minecraft.nbt.Tag;
*
* <p>For the current list of types, check with {@link Tag#TYPES}.
*
* @see CompoundTag#containsKey(String, int)
* @see Tag#idToString(int)
* @see CompoundTag#contains(String, int)
* @see net.minecraft.nbt.TagReaders#of(int)
*/
public final class NbtType {
public static final int END = 0;
@ -45,7 +45,7 @@ public final class NbtType {
/**
* Any numeric value: byte, short, int, long, float, double.
*
* @see CompoundTag#containsKey(String, int)
* @see CompoundTag#contains(String, int)
*/
public static final int NUMBER = 99;

View file

@ -32,7 +32,7 @@ import net.minecraft.util.math.Direction;
public interface EntityPlacer {
/**
* Handles the placement of an entity going to a dimension.
* Utilized by {@link FabricDimensions#teleport(Entity, DimensionType, EntityPlacer)} to specify placement logic when needed.
* Utilized by {@link FabricDimensions#teleport(Entity, net.minecraft.world.dimension.DimensionType, EntityPlacer)} to specify placement logic when needed.
*
* <p>This method may have side effects such as the creation of a portal in the target dimension,
* or the creation of a chunk loading ticket.

View file

@ -18,9 +18,11 @@ package net.fabricmc.fabric.api.client.particle.v1;
import java.util.List;
import net.minecraft.client.particle.ParticleFactory;
import net.minecraft.client.particle.SpriteProvider;
import net.minecraft.client.texture.Sprite;
import net.minecraft.client.texture.SpriteAtlasTexture;
import net.minecraft.particle.ParticleType;
/**
* FabricSpriteProvider. It does the same thing as vanilla's SpriteProvider,
@ -31,7 +33,7 @@ import net.minecraft.client.texture.SpriteAtlasTexture;
* interface containing the sprites set loaded for their particle from the
* active resourcepacks.
*
* @see ParticleFactoryRegistry#register(type, constructor)
* @see ParticleFactoryRegistry#register(ParticleType, ParticleFactory)
* @see ParticleFactoryRegistry.PendingParticleFactory
*/
public interface FabricSpriteProvider extends SpriteProvider {

View file

@ -24,15 +24,18 @@ import net.minecraft.particle.ParticleType;
* Methods for creating particle types, both simple and using an existing attribute factory.
*
* <p>Usage:
* <pre> {@code
* <blockquote>
* <pre>
* public static final DefaultParticleType SIMPLE_TEST_PARTICLE = FabricParticleTypes.simple();
* public static final DefaultParticleType CUSTOM_TEST_PARTICLE = FabricParticleTypes.simple();
*
* @Override
* {@literal @}Override
* public void onInitialize() {
* Registry.register(Registry.PARTICLE_TYPE, new Identifier("testmod", "simple"), SIMPLE_TEST_PARTICLE);
* Registry.register(Registry.PARTICLE_TYPE, new Identifier("testmod", "custom"), CUSTOM_TEST_PARTICLE);
* }}</pre>
* }}
* </pre>
* </blockquote>
*
* @see ParticleModClient in the fabric example mods for a more complete usage.
*/
@ -41,8 +44,6 @@ public final class FabricParticleTypes {
/**
* Creates a new, default particle type for the given id.
*
* @param id The particle id.
*/
public static DefaultParticleType simple() {
return simple(false);
@ -51,7 +52,6 @@ public final class FabricParticleTypes {
/**
* Creates a new, default particle type for the given id.
*
* @param id The particle id.
* @param alwaysSpawn True to always spawn the particle regardless of distance.
*/
public static DefaultParticleType simple(boolean alwaysSpawn) {
@ -61,7 +61,6 @@ public final class FabricParticleTypes {
/**
* Creates a new particle type with a custom factory for packet/data serialization.
*
* @param id The particle id.
* @param factory A factory for serializing packet data and string command parameters into a particle effect.
*/
public static <T extends ParticleEffect> ParticleType<T> complex(ParticleEffect.Factory<T> factory) {
@ -71,7 +70,6 @@ public final class FabricParticleTypes {
/**
* Creates a new particle type with a custom factory for packet/data serialization.
*
* @param id The particle id.
* @param alwaysSpawn True to always spawn the particle regardless of distance.
* @param factory A factory for serializing packet data and string command parameters into a particle effect.
*/

View file

@ -33,13 +33,13 @@ public enum BlendMode {
SOLID(RenderLayer.getSolid()),
/**
* Pixels with alpha > 0.5 are rendered as if {@code SOLID}. Other pixels are not rendered.
* Pixels with alpha &gt; 0.5 are rendered as if {@code SOLID}. Other pixels are not rendered.
* Texture mip-map enabled. Used for leaves.
*/
CUTOUT_MIPPED(RenderLayer.getCutoutMipped()),
/**
* Pixels with alpha > 0.5 are rendered as if {@code SOLID}. Other pixels are not rendered.
* Pixels with alpha &gt; 0.5 are rendered as if {@code SOLID}. Other pixels are not rendered.
* Texture mip-map disabled. Used for iron bars, glass and other cutout sprites with hard edges.
*/
CUTOUT(RenderLayer.getCutout()),

View file

@ -16,7 +16,7 @@
package net.fabricmc.fabric.api.renderer.v1.material;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.util.Identifier;
import net.fabricmc.fabric.api.renderer.v1.Renderer;
@ -67,8 +67,9 @@ public interface RenderMaterial {
* This will be identical to the material that would be obtained by calling {@link MaterialFinder#find()}
* on a new, unaltered, {@link MaterialFinder} instance. It is defined here for clarity and convenience.
*
* <p>Quads using this material use {@link Block#getRenderLayer()} of the associated block to determine texture blending,
* honor block color index, are non-emissive, and apply both diffuse and ambient occlusion shading to vertex colors.
* <p>Quads using this material use {@link net.minecraft.client.render.RenderLayers#getBlockLayer(BlockState)} of
* the associated block to determine texture blending, honor block color index, are non-emissive, and apply both
* diffuse and ambient occlusion shading to vertex colors.
*
* <p>All standard, non-fluid baked models are rendered using this material.
*/

View file

@ -127,7 +127,7 @@ public interface MutableQuadView extends QuadView {
*
* <p>Models may also find this useful as the face for texture UV locking and rotation semantics.
*
* @note This value is not persisted independently when the quad is encoded.
* <p>Note: This value is not persisted independently when the quad is encoded.
* When reading encoded quads, this value will always be the same as {@link #lightFace()}.
*/
MutableQuadView nominalFace(Direction face);

View file

@ -76,7 +76,7 @@ public interface FabricBakedModel {
* neighboring blocks (if appropriate). Models only need to consider "sides" to the
* extent the model is driven by connection with neighbor blocks or other world state.
*
* @note with {@link BakedModel#getQuads(BlockState, net.minecraft.util.math.Direction, Random)}, the random
* <p>Note: with {@link BakedModel#getQuads(BlockState, net.minecraft.util.math.Direction, Random)}, the random
* parameter is normally initialized with the same seed prior to each face layer.
* Model authors should note this method is called only once per block, and call the provided
* Random supplier multiple times if re-seeding is necessary. For wrapped vanilla baked models,

View file

@ -43,7 +43,7 @@ public interface FluidRenderHandler {
/**
* Get the tint color for a fluid being rendered at a given position.
*
* @note As of right now, our hook cannot handle setting a custom alpha
* <p>Note: As of right now, our hook cannot handle setting a custom alpha
* tint here - as such, it must be contained in the texture itself!
*
* @param view The world view pertaining to the fluid. May be null!