mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 14:38:48 +00:00
Update indra to v4
This commit is contained in:
6 files changed
+10
-7
No files matched your search
@@ -30,8 +30,10 @@ import org.checkerframework.framework.qual.DefaultQualifier;
|
|||||||
* The {@link CarbonChat} interface is the gateway to interacting with the majority of the CarbonChat API.
|
* The {@link CarbonChat} interface is the gateway to interacting with the majority of the CarbonChat API.
|
||||||
*
|
*
|
||||||
* <p>Instances may be obtained through {@link CarbonChatProvider#carbonChat()} once Carbon is loaded.</p>
|
* <p>Instances may be obtained through {@link CarbonChatProvider#carbonChat()} once Carbon is loaded.</p>
|
||||||
|
*
|
||||||
* <p>On most platforms, you should use the provided load order mechanism to ensure your addon loads after
|
* <p>On most platforms, you should use the provided load order mechanism to ensure your addon loads after
|
||||||
* Carbon.</p>
|
* Carbon.</p>
|
||||||
|
*
|
||||||
* <p>On Fabric, use the {@code carbonchat} entrypoint (type: {@code Consumer<CarbonChat>}) to have a callback
|
* <p>On Fabric, use the {@code carbonchat} entrypoint (type: {@code Consumer<CarbonChat>}) to have a callback
|
||||||
* when Carbon is loaded.</p>
|
* when Carbon is loaded.</p>
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -110,6 +110,7 @@ public interface CarbonPlayer extends Audience, Identified {
|
|||||||
* Sets the player's nickname.
|
* Sets the player's nickname.
|
||||||
*
|
*
|
||||||
* <p>Setting {@code null} will remove any current nickname.</p>
|
* <p>Setting {@code null} will remove any current nickname.</p>
|
||||||
|
*
|
||||||
* <p>Won't have any visible effect when Carbon's nickname management is disabled.</p>
|
* <p>Won't have any visible effect when Carbon's nickname management is disabled.</p>
|
||||||
*
|
*
|
||||||
* @param nickname the new nickname
|
* @param nickname the new nickname
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ public interface UserManager<C extends CarbonPlayer> {
|
|||||||
* Create a new {@link Party} with the specified name.
|
* Create a new {@link Party} with the specified name.
|
||||||
*
|
*
|
||||||
* <p>Parties with no users will not be saved. Use {@link Party#disband()} to discard.</p>
|
* <p>Parties with no users will not be saved. Use {@link Party#disband()} to discard.</p>
|
||||||
|
*
|
||||||
* <p>The returned reference will expire after one minute, store {@link Party#id()} rather than the instance and use {@link #party(UUID)} to retrieve.</p>
|
* <p>The returned reference will expire after one minute, store {@link Party#id()} rather than the instance and use {@link #party(UUID)} to retrieve.</p>
|
||||||
*
|
*
|
||||||
* @param name party name
|
* @param name party name
|
||||||
@@ -63,6 +64,7 @@ public interface UserManager<C extends CarbonPlayer> {
|
|||||||
* Look up an existing party by its id.
|
* Look up an existing party by its id.
|
||||||
*
|
*
|
||||||
* <p>As parties that have never had a user are not saved, they are not retrievable here.</p>
|
* <p>As parties that have never had a user are not saved, they are not retrievable here.</p>
|
||||||
|
*
|
||||||
* <p>The returned reference will expire after one minute, do not cache it. The implementation handles caching as is appropriate.</p>
|
* <p>The returned reference will expire after one minute, do not cache it. The implementation handles caching as is appropriate.</p>
|
||||||
*
|
*
|
||||||
* @param id party id
|
* @param id party id
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||||
import net.kyori.indra.git.IndraGitExtension
|
import net.kyori.indra.git.IndraGitExtension
|
||||||
import org.apache.tools.ant.filters.ReplaceTokens
|
import org.apache.tools.ant.filters.ReplaceTokens
|
||||||
import org.eclipse.jgit.lib.Repository
|
|
||||||
import org.gradle.accessors.dm.LibrariesForLibs
|
import org.gradle.accessors.dm.LibrariesForLibs
|
||||||
import org.gradle.api.Project
|
import org.gradle.api.Project
|
||||||
import org.gradle.api.Task
|
import org.gradle.api.Task
|
||||||
@@ -100,7 +99,7 @@ fun ShadowJar.configureShadowJar() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun Project.lastCommitHash(): String =
|
fun Project.lastCommitHash(): String =
|
||||||
the<IndraGitExtension>().commit()?.name?.substring(0, 7)
|
the<IndraGitExtension>().commit().orNull?.name?.substring(0, 7)
|
||||||
?: error("Could not determine commit hash")
|
?: error("Could not determine commit hash")
|
||||||
|
|
||||||
fun Project.decorateVersion() {
|
fun Project.decorateVersion() {
|
||||||
@@ -120,10 +119,7 @@ fun Project.currentBranch(): String {
|
|||||||
|
|
||||||
val indraGit = the<IndraGitExtension>().takeIf { it.isPresent }
|
val indraGit = the<IndraGitExtension>().takeIf { it.isPresent }
|
||||||
|
|
||||||
val ref = indraGit?.git()?.repository?.exactRef("HEAD")?.target
|
return indraGit?.branchName()?.orNull ?: "detached-head"
|
||||||
?: return "detached-head"
|
|
||||||
|
|
||||||
return Repository.shortenRefName(ref.name)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val Project.libs: LibrariesForLibs
|
val Project.libs: LibrariesForLibs
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ public final class FileUtil {
|
|||||||
* Lists directory entries in {@code path}.
|
* Lists directory entries in {@code path}.
|
||||||
*
|
*
|
||||||
* <p>If {@code path} does not exist, returns an empty list.</p>
|
* <p>If {@code path} does not exist, returns an empty list.</p>
|
||||||
|
*
|
||||||
* <p>If {@code path} exists, but is not a directory, throws {@link IllegalArgumentException}</p>
|
* <p>If {@code path} exists, but is not a directory, throws {@link IllegalArgumentException}</p>
|
||||||
*
|
*
|
||||||
* @param path directory
|
* @param path directory
|
||||||
@@ -69,6 +70,7 @@ public final class FileUtil {
|
|||||||
* Lists directory entries in {@code path} matching {@code glob}.
|
* Lists directory entries in {@code path} matching {@code glob}.
|
||||||
*
|
*
|
||||||
* <p>If {@code path} does not exist, returns an empty list.</p>
|
* <p>If {@code path} does not exist, returns an empty list.</p>
|
||||||
|
*
|
||||||
* <p>If {@code path} exists, but is not a directory, throws {@link IllegalArgumentException}</p>
|
* <p>If {@code path} exists, but is not a directory, throws {@link IllegalArgumentException}</p>
|
||||||
*
|
*
|
||||||
* @param path directory
|
* @param path directory
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ resource-factory-velocity-convention = { id = "xyz.jpenilla.resource-factory-vel
|
|||||||
resource-factory-fabric-convention = { id = "xyz.jpenilla.resource-factory-fabric-convention", version.ref = "resource-factory" }
|
resource-factory-fabric-convention = { id = "xyz.jpenilla.resource-factory-fabric-convention", version.ref = "resource-factory" }
|
||||||
|
|
||||||
[versions]
|
[versions]
|
||||||
indra = "3.2.0"
|
indra = "4.0.0"
|
||||||
cloud-build-logic = "0.0.17"
|
cloud-build-logic = "0.0.17"
|
||||||
shadow = "9.2.2"
|
shadow = "9.2.2"
|
||||||
mod-publish-plugin = "1.0.0"
|
mod-publish-plugin = "1.0.0"
|
||||||
|
|||||||
Reference in new issue
Block a user