Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

## Fabric versioning

| Minecraft version | Fabric version | command-manager-fabric vebric |
|-------------------|----------------|-------------------------------|
| 1.20.1 | 0.15.10 | [1.0.0 - 1.0.6] |
| 1.21.1 | 0.16.9 | [1.1.0 - ] |
| Minecraft version | Fabric version | command-manager-fabric version |
|-------------------|----------------|--------------------------------|
| 1.20.1 | 0.15.10 | [1.0.0 - 1.0.6] |
| 1.21.1 | 0.16.9 | [1.1.0 - ] |

```kotlin
repositories {
Expand Down
47 changes: 46 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,20 @@ var _group = libs.versions.group.get()
version = _version
group = _group

fun getProperty(name: String): String {
if (project.hasProperty(name)) {
return project.findProperty(name) as String
}

val envName = name.uppercase().replace(".", "_")

if (System.getenv().containsKey(envName)) {
return System.getenv(envName) as String
}

return ""
}

fun DependencyHandlerScope.applyDependencies() {
// Dependencies
if (project.properties["com.raduvoinea.utils.local"] != null) {
Expand All @@ -28,13 +42,34 @@ fun DependencyHandlerScope.applyDependencies() {
annotationProcessor(libs.jetbrains.annotations)
testCompileOnly(libs.jetbrains.annotations)
testAnnotationProcessor(libs.jetbrains.annotations)

testImplementation(platform(libs.junit.bom))
testImplementation(libs.junit.jupiter)
}

fun RepositoryHandler.applyRepositories() {
mavenCentral()
maven("https://maven.parchmentmc.org/")
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://repo.raduvoinea.com/repository/maven-releases/")

if (getProperty("gg.mmorealms.proxy.europe") == "true") {
maven(url = getProperty("gg.mmorealms.proxy.europe.url")) {
name = "Europe-MMORealms-Repository-Proxy"
credentials(PasswordCredentials::class) {
username = getProperty("gg.mmorealms.proxy.europe.username")
password = getProperty("gg.mmorealms.proxy.europe.password")
}
}
} else if(getProperty("gg.mmorealms.url")=="") {
maven(url = getProperty("gg.mmorealms.url")) {
name = "MMORealms-Repository"
credentials(PasswordCredentials::class) {
username = getProperty("gg.mmorealms.username")
password = getProperty("gg.mmorealms.password")
}
}
}
}

repositories {
Expand Down Expand Up @@ -78,13 +113,23 @@ subprojects {
repositories {
if (project.properties["com.raduvoinea.publish"] == "true") {
maven(url = (project.findProperty("com.raduvoinea.url") ?: "") as String) {
name = "raduvoineaRepository"
name = "RaduVoinea"
credentials(PasswordCredentials::class) {
username = (project.findProperty("com.raduvoinea.auth.username") ?: "") as String
password = (project.findProperty("com.raduvoinea.auth.password") ?: "") as String
}
}
}

if (project.properties["generic.publish"] == "true") {
maven(url = (project.findProperty("generic.url") ?: "") as String) {
name = "Generic"
credentials(PasswordCredentials::class) {
username = (project.findProperty("generic.auth.username") ?: "") as String
password = (project.findProperty("generic.auth.password") ?: "") as String
}
}
}
}
}
}
32 changes: 13 additions & 19 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,28 +1,18 @@
[versions]

version = "1.1.9"
version = "1.1.15"
group = "com.raduvoinea"

[plugins]

loom_v20 = { id = "fabric-loom", version = "1.5.5" }
loom_v21 = { id = "fabric-loom", version = "1.8.12" }
fabric_loom = { id = "fabric-loom", version = "1.10-SNAPSHOT" }
jetbrin_gradle_plugin_idea_ext = { id = "org.jetbrains.gradle.plugin.idea-ext", version = "1.1.8" }

[libraries]

# Minecraft

# Fabric 1.20
minecraft_v20 = { module = "com.mojang:minecraft", version = "1.20.1" }
fabric_api_v20 = { module = "net.fabricmc.fabric-api:fabric-api", version = "0.90.7+1.20.3" }
fabric_loader_v20 = { module = "net.fabricmc:fabric-loader", version = "0.15.10" }
parchment_mappings_v20 = { module = "org.parchmentmc.data:parchment-1.20.1", version = "2023.09.03" }

# Fabric 1.21
minecraft_v21 = { module = "com.mojang:minecraft", version = "1.21.1" }
fabric_api_v21 = { module = "net.fabricmc.fabric-api:fabric-api", version = "0.109.0+1.21.1" }
fabric_loader_v21 = { module = "net.fabricmc:fabric-loader", version = "0.16.9" }
parchment_mappings_v21 = { module = "org.parchmentmc.data:parchment-1.21", version = "2024.11.10" }
# Fabric
minecraft = { module = "com.mojang:minecraft", version = "1.21.1" }
fabric_api = { module = "net.fabricmc.fabric-api:fabric-api", version = "0.109.0+1.21.1" }
fabric_loader = { module = "net.fabricmc:fabric-loader", version = "0.16.9" }
parchment = { module = "org.parchmentmc.data:parchment-1.21", version = "2024.11.10" }

# Velocioty
velocity = { module = "com.velocitypowered:velocity-api", version = "3.4.0-SNAPSHOT" }
Expand All @@ -33,4 +23,8 @@ jetbrains_annotations = { module = "org.jetbrains:annotations", version = "26.0.
luckperms = { module = "net.luckperms:api", version = "5.4" }
kyori_minimessage = { module = "net.kyori:adventure-text-minimessage", version = "4.17.0" }
kyori_adventure_fabric = { module = "net.kyori:adventure-platform-fabric", version = "5.9.0" }
raduvoinea_utils = { module = "com.raduvoinea:utils", version = "1.1.28" }
raduvoinea_utils = { module = "com.raduvoinea:utils", version = "1.1.35" }

# Testing
junit_jupiter = { module = "org.junit.jupiter:junit-jupiter ", version = "5.11.4" }
junit_bom = { module = "org.junit:junit-bom", version = "5.11.4" }
8 changes: 4 additions & 4 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base"
]
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@
@Target(ElementType.TYPE)
public @interface Command {

String[] aliases();
String[] aliases();

String[] arguments() default {};
String[] arguments() default {};

OnlyFor onlyFor() default OnlyFor.BOTH;
OnlyFor onlyFor() default OnlyFor.BOTH;

Class<? extends CommonCommand> parent() default CommonCommand.class;
Class<? extends CommonCommand> parent() default CommonCommand.class;

enum OnlyFor {
PLAYERS,
CONSOLE,
BOTH
}
enum OnlyFor {
PLAYERS,
CONSOLE,
BOTH
}
}
Loading
Loading