-
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.
Showing
33 changed files
with
289 additions
and
264 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,120 +1,124 @@ | ||
plugins { | ||
id 'java-library' | ||
id 'eclipse' | ||
id 'idea' | ||
id 'maven-publish' | ||
id 'net.minecraftforge.gradle' version '[6.0,6.2)' | ||
id 'org.parchmentmc.librarian.forgegradle' version '1.+' | ||
id 'org.spongepowered.mixin' version '0.7+' | ||
id 'net.neoforged.moddev' version '1.0.8' | ||
} | ||
|
||
jarJar.enable() | ||
|
||
group = "com.lovetropics" | ||
group = mod_group_id | ||
base { | ||
archivesName = 'LTPermissions' | ||
archivesName = mod_id | ||
} | ||
|
||
|
||
ext.buildnumber = 0 | ||
version = "${mod_version}" | ||
|
||
if (System.getenv('GITHUB_RUN_NUMBER')) { | ||
project.buildnumber = System.getenv('GITHUB_RUN_NUMBER') | ||
project.buildnumber = System.getenv('GITHUB_RUN_NUMBER') as Integer | ||
version = "${mod_version}+${buildnumber}-gha" | ||
} else { | ||
version = "${mod_version}" | ||
} | ||
|
||
java.toolchain.languageVersion = JavaLanguageVersion.of(17) | ||
|
||
minecraft { | ||
mappings channel: 'parchment', version: parchment_version | ||
runs { | ||
configureEach { | ||
copyIdeResources = true | ||
workingDirectory project.file('run') | ||
property 'forge.logging.console.level', 'info' | ||
arg "-mixin.config=ltpermissions.mixins.json" | ||
jvmArg '-Dmixin.env.disableRefMap=true' | ||
mods { | ||
ltperms { | ||
sources sourceSets.main | ||
} | ||
} | ||
} | ||
client { | ||
} | ||
server { | ||
} | ||
} | ||
} | ||
|
||
repositories { | ||
maven { url "https://maven.tterrag.com/" } | ||
maven { url "https://maven.enginehub.org/repo/" } | ||
maven { url "https://maven.tterrag.com/" } | ||
mavenLocal() | ||
} | ||
|
||
|
||
java.toolchain.languageVersion = JavaLanguageVersion.of(21) | ||
|
||
|
||
dependencies { | ||
minecraft "net.minecraftforge:forge:$minecraft_version-$forge_version" | ||
|
||
jarJar(implementation(fg.deobf("com.lovetropics.lib:LTLib:$ltlib_version"))) | ||
jarJar(implementation("com.lovetropics.lib:LTLib:$ltlib_version")) | ||
|
||
minecraftLibrary("com.sk89q.worldedit:worldedit-core:7.2.16-SNAPSHOT") { | ||
additionalRuntimeClasspath(implementation("com.sk89q.worldedit:worldedit-core:$worldedit_version")) { | ||
exclude group: "com.google.guava" | ||
exclude group: "com.google.code.gson" | ||
exclude group: "it.unimi.dsi" | ||
exclude group: "org.apache.logging.log4j" | ||
exclude group: "org.antlr" | ||
} | ||
implementation fg.deobf("com.sk89q.worldedit:worldedit-forge-mc1.20:7.2.16-SNAPSHOT") | ||
|
||
// implementation fg.deobf('com.github.hexomod:WorldEdit-CUI-FE3:1.16.5-3.0.9') | ||
|
||
if (System.getProperty("idea.sync.active") != "true") { | ||
annotationProcessor 'org.spongepowered:mixin:0.8.5:processor' | ||
|
||
implementation("com.sk89q.worldedit:worldedit-neoforge-mc$minecraft_version:$worldedit_version") { | ||
exclude group: "com.google.guava" | ||
} | ||
} | ||
|
||
mixin { | ||
add sourceSets.main, "ltpermissions.refmap.json" | ||
} | ||
|
||
tasks.named('jar', Jar).configure { | ||
archiveClassifier = 'slim' | ||
finalizedBy 'reobfJar' | ||
|
||
manifest { | ||
attributes([ | ||
"Specification-Title": "ltpermissions", | ||
"Specification-Vendor": "lovetropics", | ||
"Specification-Version": "1", | ||
"Implementation-Title": project.name, | ||
"Implementation-Version": archiveVersion, | ||
"Implementation-Vendor" :"lovetropics", | ||
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"), | ||
"MixinConfigs": "ltpermissions.mixins.json" | ||
]) | ||
|
||
neoForge { | ||
version = project.neo_version | ||
|
||
parchment { | ||
minecraftVersion = project.minecraft_version | ||
mappingsVersion = project.parchment_version | ||
} | ||
} | ||
|
||
tasks.named('jarJar').configure { | ||
archiveClassifier = '' | ||
finalizedBy 'reobfJarJar' | ||
} | ||
runs { | ||
configureEach { | ||
logLevel = org.slf4j.event.Level.INFO | ||
gameDirectory = project.file('run') | ||
} | ||
client { | ||
client() | ||
} | ||
server { | ||
server() | ||
} | ||
data { | ||
data() | ||
programArguments.addAll '--mod', project.mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath() | ||
} | ||
} | ||
|
||
mods { | ||
"${mod_id}" { | ||
sourceSet sourceSets.main | ||
} | ||
} | ||
|
||
reobf { | ||
jarJar { } | ||
} | ||
|
||
tasks.named('processResources', ProcessResources).configure { | ||
var replaceProperties = [ | ||
mod_version: mod_version, | ||
] | ||
inputs.properties replaceProperties | ||
|
||
filesMatching(['META-INF/mods.toml', 'pack.mcmeta']) { | ||
expand replaceProperties + [project: project] | ||
} | ||
sourceSets.main.resources { srcDir 'src/generated/resources' } | ||
|
||
|
||
tasks.withType(ProcessResources).configureEach { | ||
var replaceProperties = [ | ||
minecraft_version : minecraft_version, | ||
minecraft_version_range: minecraft_version_range, | ||
neo_version : neo_version, | ||
neo_version_range : neo_version_range, | ||
fml_version_range : fml_version_range, | ||
worldedit_version_range: worldedit_version_range, | ||
mod_id : mod_id, | ||
mod_name : mod_name, | ||
mod_license : mod_license, | ||
mod_version : mod_version, | ||
mod_authors : mod_authors, | ||
mod_description : mod_description | ||
] | ||
inputs.properties replaceProperties | ||
|
||
filesMatching(['META-INF/neoforge.mods.toml']) { | ||
expand replaceProperties | ||
} | ||
} | ||
|
||
|
||
tasks.withType(JavaCompile).configureEach { | ||
options.encoding = 'UTF-8' | ||
} | ||
|
||
|
||
idea { | ||
module { | ||
downloadSources = true | ||
downloadJavadoc = 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,9 +1,26 @@ | ||
mod_version=0.2.0 | ||
minecraft_version=1.20.1 | ||
forge_version=47.1.0 | ||
parchment_version=2023.06.26-1.20.1 | ||
mod_id=ltpermissions | ||
mod_group_id=com.lovetropics.ltpermissions | ||
mod_name=LT Permissions | ||
mod_version=0.3.0 | ||
|
||
ltlib_version=[1.3,1.4) | ||
mod_license=All Rights Reserved | ||
mod_authors=The Love Tropics Modding team | ||
mod_description=Manages permissions for your Minecraft server\nLT Permissions allows you to define multiple role levels that can be assigned to users. These role levels can be given access to server commands etc.\nFor more info, visit the GitHub repository at https://github.com/LoveTropics/LTPermissions | ||
|
||
minecraft_version=1.21 | ||
minecraft_version_range=[1.21,1.21,1) | ||
|
||
ltlib_version=[1.4,1.5) | ||
worldedit_version=7.4.0-SNAPSHOT | ||
worldedit_version_range=[7.4,8.0) | ||
|
||
neo_version=21.0.83-beta | ||
neo_version_range=[21.0.0-beta,) | ||
fml_version_range=[4,) | ||
parchment_version=2024.06.23 | ||
|
||
org.gradle.jvmargs=-Xmx3G | ||
org.gradle.daemon=false | ||
org.gradle.daemon=true | ||
org.gradle.parallel=true | ||
org.gradle.caching=true | ||
org.gradle.configuration-cache=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,6 +1,6 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip | ||
networkTimeout=10000 | ||
zipStoreBase=GRADLE_USER_HOME | ||
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,15 +1,14 @@ | ||
pluginManagement { | ||
repositories { | ||
mavenLocal() | ||
gradlePluginPortal() | ||
maven { url = 'https://maven.minecraftforge.net/' } | ||
maven { url = 'https://repo.spongepowered.org/maven' } | ||
maven { url = 'https://maven.parchmentmc.org' } | ||
mavenCentral() | ||
maven { url = 'https://maven.neoforged.net/releases' } | ||
} | ||
} | ||
|
||
|
||
plugins { | ||
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.5.0' | ||
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.8.0' | ||
} | ||
|
||
rootProject.name = 'LTPermissions' | ||
rootProject.name = 'ltpermissions' |
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
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
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
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
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
Oops, something went wrong.