From c8e1a34135890b2906b71bfd793875732231c682 Mon Sep 17 00:00:00 2001 From: Nicolas Adamoglou Date: Fri, 13 Sep 2019 19:25:46 +0200 Subject: [PATCH] Finished seperation of Implementation and API. --- README.md | 2 +- build.gradle | 39 ++++++++++++++----- .../vatuu/tesseract/api/DimensionState.java | 3 ++ 3 files changed, 33 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 09610ca..4a06445 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ A lightweight dimensional API for disposable, low-overhead pocket dimensions. - Make unregistering dimensions not be garbagio. - Saved Dimension Metadata for auto-registration on load. - Fix TabComplete -- Separation +- ~~Separation~~ - WorldGeneration Templates (Flat, SpawnPlatform, whatever) - WorldGeneration Utilities/Builder - Portal Primitives diff --git a/build.gradle b/build.gradle index 842f710..763597a 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,7 @@ +import net.fabricmc.loom.task.RemapJarTask + plugins { - id 'fabric-loom' version '0.2.4-SNAPSHOT' + id 'fabric-loom' version '0.2.5-SNAPSHOT' id 'maven-publish' } @@ -18,13 +20,11 @@ repositories { minecraft {} dependencies { - minecraft "com.mojang:minecraft:${project.minecraft_version}" - mappings "net.fabricmc:yarn:${project.yarn_mappings}" - modApi "net.fabricmc:fabric-loader:${project.loader_version}" - modApi "net.fabricmc.fabric-api:fabric-events-lifecycle-v0:${project.cmd_version}" - modApi "net.fabricmc.fabric-api:fabric-api-base:${project.base_version}" - include "net.fabricmc.fabric-api:fabric-events-lifecycle-v0:${project.cmd_version}" - include "net.fabricmc.fabric-api:fabric-api-base:${project.base_version}" + minecraft "com.mojang:minecraft:${project.minecraft_version}" + mappings "net.fabricmc:yarn:${project.yarn_mappings}" + modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" + modImplementation "net.fabricmc.fabric-api:fabric-events-lifecycle-v0:${project.cmd_version}" + modImplementation "net.fabricmc.fabric-api:fabric-api-base:${project.base_version}" } processResources { @@ -45,7 +45,20 @@ task sourcesJar(type: Jar, dependsOn: classes) { classifier = "sources" from sourceSets.main.allSource } -jar { from "LICENSE" } +task apiJar(type: Jar, dependsOn: classes){ + classifier = "api-dev" + from(sourceSets.main.output){ + include "dev/vatuu/tesseract/api/**" + } +} +task remapApiJar(type: RemapJarTask, dependsOn: apiJar){ + input = apiJar.archivePath + output = file("build/libs/tesseract-" + version + "-api.jar") +} +jar { + from "LICENSE" + dependsOn apiJar +} publishing { publications { @@ -56,8 +69,14 @@ publishing { artifact(sourcesJar) { builtBy remapSourcesJar } + artifact(remapApiJar.output){ + classifier = "api" + builtBy remapApiJar + } } } - repositories {} + repositories { + mavenLocal() + } } \ No newline at end of file diff --git a/src/main/java/dev/vatuu/tesseract/api/DimensionState.java b/src/main/java/dev/vatuu/tesseract/api/DimensionState.java index 1235baa..60cd972 100644 --- a/src/main/java/dev/vatuu/tesseract/api/DimensionState.java +++ b/src/main/java/dev/vatuu/tesseract/api/DimensionState.java @@ -1,5 +1,8 @@ package dev.vatuu.tesseract.api; +/** + * Test Javadoc + */ public enum DimensionState { SAVE(false, false, false), SAVE_UNLOAD(true, false, false),