Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修改构建脚本 #1228

Merged
merged 3 commits into from
Dec 3, 2024
Merged
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
29 changes: 0 additions & 29 deletions .github/workflows/style_check.yml

This file was deleted.

35 changes: 17 additions & 18 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,32 +1,31 @@
dependencies {
// Registrate
api("com.tterrag.registrate:Registrate:${forge.versions.registrate.get()}")
jarJar("com.tterrag.registrate:Registrate:${forge.versions.registrate.get()}")
api("com.tterrag.registrate:Registrate:${libs.versions.registrate.get()}")
jarJar("com.tterrag.registrate:Registrate:${libs.versions.registrate.get()}")

implementation(forge.clothConfig)
implementation(libs.clothConfig)

// JEI
compileOnlyApi(forge.jei.common.api) { transitive = false }
compileOnlyApi(forge.jei.forge.api) { transitive = false }
implementation(forge.jei.forge.impl) { transitive = false }
compileOnlyApi(libs.jeiCommonApi) { transitive = false }
compileOnlyApi(libs.jeiForgeApi) { transitive = false }
implementation(libs.jeiForgeImpl) { transitive = false }

// REI
compileOnlyApi(forge.rei.plugin)
compileOnlyApi(forge.rei.api)
compileOnly(forge.rei.forge)
compileOnlyApi(libs.reiPlugin)
compileOnlyApi(libs.reiApi)
compileOnly(libs.reiForge)

// EMI
compileOnlyApi("dev.emi:emi-neoforge:${forge.versions.emi.get()}:api")
implementation(forge.emi)
compileOnlyApi("dev.emi:emi-neoforge:${libs.versions.emi.get()}:api")
compileOnly(libs.emi)

// Patchouli
compileOnlyApi("vazkii.patchouli:Patchouli:${forge.versions.patchouli.get()}:api")
runtimeOnly(forge.patchouli)
compileOnlyApi("vazkii.patchouli:Patchouli:${libs.versions.patchouli.get()}:api")
runtimeOnly(libs.patchouli)

implementation(forge.jade)
implementation(forge.theoneprobe)

implementation(forge.kubejs)
implementation(libs.jade)
implementation(libs.theoneprobe)
implementation(libs.kubejs)
}

// compileOnly("maven.modrinth:sodium:mc1.21.1-0.6.0-beta.4-neoforge")
// compileOnly("maven.modrinth:iris:1.8.0-beta.5+1.21-neoforge")
Expand Down
45 changes: 45 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
[versions]
minecraft = "1.21.1"
neoForge = "21.1.79"
registrate = "MC1.21-1.3.0+55"
clothConfig = "15.0.130"
jei = "19.17.0.193"
rei = "16.0.762"
emi = "1.1.13+1.21.1"
jade = "15.3.4+neoforge"
theoneprobe = "1.21_neo-12.0.3-5"
kubejs = "2101.7.0-build.126"
patchouli = "1.21-87-NEOFORGE"
parchment = "2024.07.28"
modDevGradle = "2.0.34-beta"
spotless = "7.0.0.BETA2"
lombok = "8.7.1"
machete = "1.+"

[libraries]
neoForge = { group = "net.neoforged", name = "neoforge", version.ref = "neoForge" }
registrate = { group = "com.tterrag.registrate", name = "Registrate", version.ref = "registrate" }
clothConfig = { group = "me.shedaniel.cloth", name = "cloth-config-neoforge", version.ref = "clothConfig" }

jeiCommonApi = { group = "mezz.jei", name = "jei-1.21.1-common-api", version.ref = "jei" }
jeiForgeApi = { group = "mezz.jei", name = "jei-1.21.1-neoforge-api", version.ref = "jei" }
jeiForgeImpl = { group = "mezz.jei", name = "jei-1.21.1-neoforge", version.ref = "jei" }

reiPlugin = { group = "me.shedaniel", name = "RoughlyEnoughItems-default-plugin-neoforge", version.ref = "rei" }
reiApi = { group = "me.shedaniel", name = "RoughlyEnoughItems-api-neoforge", version.ref = "rei" }
reiForge = { group = "me.shedaniel", name = "RoughlyEnoughItems-neoforge", version.ref = "rei" }

emi = { group = "dev.emi", name = "emi-neoforge", version.ref = "emi" }

jade = { group = "maven.modrinth", name = "jade", version.ref = "jade" }
theoneprobe = { group = "mcjty.theoneprobe", name = "theoneprobe", version.ref = "theoneprobe" }

kubejs = { group = "dev.latvian.mods", name = "kubejs-neoforge", version.ref = "kubejs" }

patchouli = { group = "vazkii.patchouli", name = "Patchouli", version.ref = "patchouli" }

[plugins]
modDevGradle = { id = "net.neoforged.moddev", version.ref = "modDevGradle" }
spotless = { id = "com.diffplug.spotless", version.ref = "spotless" }
lombok = { id = "io.freefair.lombok", version.ref = "lombok" }
machete = { id = "io.github.p03w.machete", version.ref = "machete" }
2 changes: 1 addition & 1 deletion gradle/scripts/moddevgradle.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
neoForge {
version = forge.versions.neoForge.get()
version = libs.versions.neoForge.get()

parchment {
minecraftVersion = "1.21"
Expand Down
78 changes: 0 additions & 78 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,82 +20,4 @@ dependencyResolutionManagement {
repositories {
mavenCentral()
}

versionCatalogs {
def minecraftVersion = "1.21.1"

// Mod Dependencies Versions
def neoForgeVersion = "21.1.79"
def registrateVersion = "MC1.21-1.3.0+55"
def clothConfigVersion = "15.0.130"

def jeiVersion = "19.17.0.193"
def reiVersion = "16.0.762"
def emiVersion = "1.1.13"

def jadeVersion = "15.3.4+neoforge"
def topVersion = "1.21_neo-12.0.3-5"
def kjsVersion = "2101.7.0-build.126"
def patchouliVersion = "1.21-87"

def parchmentVersion = "2024.07.28" // https://parchmentmc.org/docs/getting-started

def modDevGradleVersion = "2.0.34-beta"
def spotlessPluginVersion = "7.0.0.BETA2"
def lombokPluginVersion = "8.7.1"
def machetePluginVersion = "1.+"

forge {
def neoForge = version("neoForge", neoForgeVersion)
library("neoForge", "net.neoforged", "neoforge").versionRef(neoForge)

def registrate = version("registrate", registrateVersion)
library("registrate", "com.tterrag.registrate", "Registrate").versionRef(registrate)

def clothConfig = version("clothConfig", clothConfigVersion)
library("clothConfig", "me.shedaniel.cloth", "cloth-config-neoforge").versionRef(clothConfig)

def jei = version("jei", jeiVersion)
library("jei-common-api", "mezz.jei", "jei-${minecraftVersion}-common-api").versionRef(jei)
library("jei-forge-api", "mezz.jei", "jei-${minecraftVersion}-neoforge-api").versionRef(jei)
library("jei-forge-impl", "mezz.jei", "jei-${minecraftVersion}-neoforge").versionRef(jei)

def rei = version("rei", reiVersion)
library("rei-plugin", "me.shedaniel", "RoughlyEnoughItems-default-plugin-neoforge").versionRef(rei)
library("rei-api", "me.shedaniel", "RoughlyEnoughItems-api-neoforge").versionRef(rei)
library("rei-forge", "me.shedaniel", "RoughlyEnoughItems-neoforge").versionRef(rei)

def emi = version("emi", emiVersion + "+" + minecraftVersion)
library("emi", "dev.emi", "emi-neoforge").versionRef(emi)

def jade = version("jade", jadeVersion)
library("jade", "maven.modrinth", "jade").versionRef(jade)

def theoneprobe = version("theoneprobe", topVersion)
library("theoneprobe", "mcjty.theoneprobe", "theoneprobe").versionRef(theoneprobe)

def kubejs = version("kubejs", kjsVersion)
library("kubejs", "dev.latvian.mods", "kubejs-neoforge").versionRef(kubejs)

def patchouli = version("patchouli", "${patchouliVersion}-NEOFORGE")
library("patchouli", "vazkii.patchouli", "Patchouli").versionRef(patchouli)
}

libs {
version("parchment", parchmentVersion)
version("minecraft", minecraftVersion)

def modDevGradle = version("modDevGradle", modDevGradleVersion)
plugin("modDevGradle", "net.neoforged.moddev").versionRef(modDevGradle)

def spotless = version("spotless", spotlessPluginVersion)
plugin("spotless", "com.diffplug.spotless").versionRef(spotless)

def lombok = version("lombok", lombokPluginVersion)
plugin("lombok", "io.freefair.lombok").versionRef(lombok)

def machete = version("machete", machetePluginVersion)
plugin("machete", "io.github.p03w.machete").versionRef(machete)
}
}
}
Loading