generated from LabyMod/addon-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from DoJapHD/dev
Dev
- Loading branch information
Showing
7 changed files
with
42 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,10 @@ | ||
version = "0.1.0" | ||
|
||
plugins { | ||
id("java-library") | ||
} | ||
import net.labymod.labygradle.common.extension.LabyModAnnotationProcessorExtension.ReferenceType | ||
|
||
dependencies { | ||
labyProcessor() | ||
labyApi("api") | ||
} | ||
|
||
labyModProcessor { | ||
referenceType = net.labymod.gradle.core.processor.ReferenceType.INTERFACE | ||
} | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_21 | ||
targetCompatibility = JavaVersion.VERSION_21 | ||
labyModAnnotationProcessor { | ||
referenceType = ReferenceType.INTERFACE | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,92 +1,42 @@ | ||
plugins { | ||
id("java-library") | ||
id("net.labymod.gradle") | ||
id("net.labymod.gradle.addon") | ||
id("net.labymod.labygradle") | ||
id("net.labymod.labygradle.addon") | ||
} | ||
|
||
java.toolchain.languageVersion.set(JavaLanguageVersion.of(17)) | ||
val versions = providers.gradleProperty("net.labymod.minecraft-versions").get().split(";") | ||
|
||
group = "de.dojaphd" | ||
version = providers.environmentVariable("VERSION").getOrElse("1.0.0") | ||
|
||
labyMod { | ||
defaultPackageName = "de.dojaphd.sendserver.core" | ||
|
||
addonInfo { | ||
namespace = "sendserveraddon" | ||
displayName = "Send To Server" | ||
author = "DoJapHD" | ||
description = "Easy to use, command based way, to switch between server. '/ssahelp' for more information." | ||
minecraftVersion = "*" | ||
version = System.getenv().getOrDefault("VERSION", "0.0.1") | ||
version = rootProject.version.toString() | ||
} | ||
|
||
minecraft { | ||
registerVersions( | ||
"1.8.9", | ||
"1.12.2", | ||
"1.16.5", | ||
"1.17.1", | ||
"1.18.2", | ||
"1.19.2", | ||
"1.19.3", | ||
"1.19.4", | ||
"1.20.1", | ||
"1.20.2", | ||
"1.20.4" | ||
) { version, provider -> | ||
configureRun(provider, version) | ||
} | ||
|
||
subprojects.forEach { | ||
if (it.name != "game-runner") { | ||
filter(it.name) | ||
registerVersion(versions.toTypedArray()) { | ||
runs { | ||
getByName("client") { | ||
// When the property is set to true, you can log in with a Minecraft account | ||
devLogin = true | ||
} | ||
} | ||
} | ||
} | ||
|
||
addonDev { | ||
productionRelease() | ||
} | ||
} | ||
|
||
subprojects { | ||
plugins.apply("java-library") | ||
plugins.apply("net.labymod.gradle") | ||
plugins.apply("net.labymod.gradle.addon") | ||
plugins.apply("net.labymod.labygradle") | ||
plugins.apply("net.labymod.labygradle.addon") | ||
|
||
repositories { | ||
maven("https://libraries.minecraft.net/") | ||
maven("https://repo.spongepowered.org/repository/maven-public/") | ||
} | ||
group = rootProject.group | ||
version = rootProject.version | ||
} | ||
|
||
fun configureRun(provider: net.labymod.gradle.core.minecraft.provider.VersionProvider, gameVersion: String) { | ||
provider.runConfiguration { | ||
mainClass = "net.minecraft.launchwrapper.Launch" | ||
jvmArgs("-Dnet.labymod.running-version=${gameVersion}") | ||
jvmArgs("-Dmixin.debug=true") | ||
jvmArgs("-Dnet.labymod.debugging.all=true") | ||
jvmArgs("-Dmixin.env.disableRefMap=true") | ||
|
||
args("--tweakClass", "net.labymod.core.loader.vanilla.launchwrapper.LabyModLaunchWrapperTweaker") | ||
args("--labymod-dev-environment", "true") | ||
args("--addon-dev-environment", "true") | ||
} | ||
|
||
provider.javaVersion = when (gameVersion) { | ||
else -> { | ||
JavaVersion.VERSION_21 | ||
} | ||
} | ||
|
||
provider.mixin { | ||
val mixinMinVersion = when (gameVersion) { | ||
"1.8.9", "1.12.2", "1.16.5" -> { | ||
"0.6.6" | ||
} | ||
|
||
else -> { | ||
"0.8.2" | ||
} | ||
} | ||
|
||
minVersion = mixinMinVersion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
version = "0.1.0" | ||
plugins { | ||
id("java-library") | ||
} | ||
import net.labymod.labygradle.common.extension.LabyModAnnotationProcessorExtension.ReferenceType | ||
|
||
dependencies { | ||
labyProcessor() | ||
api(project(":api")) | ||
} | ||
labyModProcessor { | ||
referenceType = net.labymod.gradle.core.processor.ReferenceType.DEFAULT | ||
|
||
// An example of how to add an external dependency that is used by the addon. | ||
// addonMavenDependency("org.jeasy:easy-random:5.0.0") | ||
} | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_21 | ||
targetCompatibility = JavaVersion.VERSION_21 | ||
labyModAnnotationProcessor { | ||
referenceType = ReferenceType.DEFAULT | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
lg_versioned_module=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
org.gradle.jvmargs=-Xmx4096m | ||
org.gradle.jvmargs=-Xmx4096m | ||
net.labymod.minecraft-versions=1.8.9;1.12.2;1.16.5;1.17.1;1.18.2;1.19.2;1.19.3;1.19.4;1.20.1;1.20.2;1.20.4;1.20.5;1.20.6;1.21;1.21.1 | ||
net.labymod.labydevlogin.profile=DoJapHD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,23 @@ | ||
rootProject.name = "sendserveraddon" | ||
|
||
pluginManagement { | ||
val labyGradlePluginVersion = "0.3.48" | ||
plugins { | ||
id("net.labymod.gradle") version (labyGradlePluginVersion) | ||
} | ||
|
||
val labyGradlePluginVersion = "0.5.3" | ||
buildscript { | ||
repositories { | ||
maven("https://dist.labymod.net/api/v1/maven/release/") | ||
maven("https://repo.spongepowered.org/repository/maven-public") | ||
maven("https://maven.neoforged.net/releases/") | ||
maven("https://maven.fabricmc.net/") | ||
gradlePluginPortal() | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
classpath("net.labymod.gradle", "addon", labyGradlePluginVersion) | ||
classpath("net.labymod.gradle", "common", labyGradlePluginVersion) | ||
} | ||
} | ||
} | ||
|
||
plugins.apply("net.labymod.gradle") | ||
plugins.apply("net.labymod.labygradle.settings") | ||
|
||
include(":api") | ||
include(":core") |