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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
19 changes: 2 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,10 @@ jobs:
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: 21
java-version: 25
distribution: 'temurin'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
- name: Generate assets
run: ./gradlew runData
- name: Check that data was generated
run: test -d ./src/generated/resources/.cache
- name: Ensure generated data is up-to-date
run: |
git status
if [ -n "$(git status --porcelain)" ]; then exit 1; fi
- name: Build release files
run: ./gradlew build
- name: Publish release files
Expand All @@ -52,15 +44,8 @@ jobs:
modrinth-id: jjuIRIVr
modrinth-token: ${{ secrets.MODRINTH_API_KEY }}

game-versions: 1.21.1
game-versions: 26.1.2
loaders: neoforge
dependencies: |
ae2(required){curseforge:223794}{modrinth:XxWD5pD3}
appmek(optional){curseforge:574300}{modrinth:IiATswDj}
ae2wtlib(optional){curseforge:459929}{modrinth:pNabrMMw}
arseng(optional){curseforge:905641}{modrinth:IJI3QuK8}
appflux(optional){curseforge:965012}
appex(optional){curseforge:1157608}{modrinth:yKwUnZCV}
appbot(optional){curseforge:610632}{modrinth:545hUrw9}
appliede(optional){curseforge:1009940}{modrinth:SyKS54UY}
appliedsoul(optional){curseforge:1337114}
98 changes: 24 additions & 74 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,73 +8,34 @@ plugins {
val modId = "megacells"

base.archivesName = modId
version = if (System.getenv("GITHUB_REF_TYPE") == "tag") System.getenv("GITHUB_REF_NAME") else "0.0.0"
version = if (System.getenv("GITHUB_REF_TYPE") == "tag") System.getenv("GITHUB_REF_NAME") else "4.12.0"
group = "gripe.90"

java {
toolchain.languageVersion = JavaLanguageVersion.of(21)
toolchain.languageVersion = JavaLanguageVersion.of(25)
withSourcesJar()
}

sourceSets {
main {
java {
// These integrations depend on add-ons that do not have Minecraft 26.1 releases yet.
// Applied Flux is 26.1-compatible and remains enabled.
exclude("gripe/_90/megacells/integration/ae2wt/**")
exclude("gripe/_90/megacells/integration/appbot/**")
exclude("gripe/_90/megacells/integration/appex/**")
exclude("gripe/_90/megacells/integration/appliede/**")
exclude("gripe/_90/megacells/integration/appmek/**")
exclude("gripe/_90/megacells/integration/appsoul/**")
exclude("gripe/_90/megacells/integration/arseng/**")
}
resources.srcDir(file("src/generated/resources"))
}

val addons = create("addons") {
val main = main.get()
compileClasspath += main.compileClasspath + main.output
runtimeClasspath += main.runtimeClasspath + main.output
}

create("data") {
compileClasspath += addons.compileClasspath + addons.output
runtimeClasspath += addons.runtimeClasspath + addons.output
}
}

dependencies {
api(core.ae2)

compileOnly(integration.ae2wtlibapi)
"addonsRuntimeOnly"(integration.ae2wtlib)

compileOnly(integration.appmek)
compileOnly(integration.mekanism)
"addonsRuntimeOnly"(integration.appmek)
"dataCompileOnly"(variantOf(integration.mekanism) { classifier("generators") })
"addonsRuntimeOnly"(variantOf(integration.mekanism) { classifier("all") })

compileOnly(integration.arseng)
"addonsRuntimeOnly"(integration.arseng)

"dataCompileOnly"(integration.arsnouveau) { exclude("mezz.jei") }
"addonsRuntimeOnly"(integration.arsnouveau) { exclude("mezz.jei") }

compileOnly(integration.appflux)
"addonsRuntimeOnly"(integration.appflux)
"addonsRuntimeOnly"(integration.glodium)

compileOnly(integration.appex)
"addonsRuntimeOnly"(integration.appex)
"addonsRuntimeOnly"(integration.explib)

compileOnly(integration.appliede)
"addonsRuntimeOnly"(integration.appliede)
"addonsRuntimeOnly"(integration.projecte)

compileOnly(integration.appbot)
"addonsCompileOnly"(integration.botania)

compileOnly(integration.appsoul)
"dataCompileOnly"(integration.titanium)
"dataCompileOnly"(integration.industrialforegoing)
"addonsRuntimeOnly"(integration.appsoul)
"addonsRuntimeOnly"(integration.titanium)
"addonsRuntimeOnly"(integration.industrialforegoing)
"addonsRuntimeOnly"(integration.ifsouls)
"addonsRuntimeOnly"(integration.soulpliedenergistics)

testImplementation(testlibs.junit.jupiter)
testImplementation(testlibs.assertj)
testImplementation(testlibs.neoforge.test)
Expand All @@ -84,15 +45,9 @@ dependencies {
neoForge {
version = core.versions.neoforge.get()

parchment {
minecraftVersion = core.versions.minecraft.get()
mappingsVersion = core.versions.parchment.get()
}

mods {
create(modId) {
sourceSet(sourceSets.main.get())
sourceSet(sourceSets.getByName("data"))
}
}

Expand All @@ -101,7 +56,7 @@ neoForge {

configureEach {
logLevel = org.slf4j.event.Level.DEBUG
sourceSet = sourceSets.getByName("addons")
sourceSet = sourceSets.main.get()
}

create("client") {
Expand All @@ -115,21 +70,6 @@ neoForge {
server()
gameDirectory = file("run/server")
}

create("data") {
data()
gameDirectory = file("run/data")
logLevel = org.slf4j.event.Level.INFO
programArguments.addAll(
"--mod", modId,
"--all",
"--output", file("src/generated/resources/").absolutePath,
"--existing", main,
"--existing", "$main/optional_cell_colours",
"--existing-mod", "ae2"
)
sourceSet = sourceSets.getByName("data")
}
}

unitTest {
Expand All @@ -151,6 +91,16 @@ tasks {

processResources {
exclude("**/.cache")
// Keep recipes for unavailable third-party integrations out of the release JAR.
exclude(
"data/megacells/recipe/**/*chemical*",
"data/megacells/recipe/**/*experience*",
"data/megacells/recipe/**/*mana*",
"data/megacells/recipe/**/*source*",
"data/megacells/recipe/**/*soul*",
"data/megacells/recipe/**/*emc*",
"data/megacells/recipe/**/*sky_osmium*",
)

val props = mapOf("version" to version)
inputs.properties(props)
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
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.9-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
104 changes: 6 additions & 98 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
pluginManagement {
plugins {
id("net.neoforged.moddev") version "2.0.74"
id("net.neoforged.moddev.repositories") version "2.0.74"
id("net.neoforged.moddev") version "2.0.141"
id("net.neoforged.moddev.repositories") version "2.0.141"
id("com.diffplug.spotless") version "7.0.1"
}
}

plugins {
id("net.neoforged.moddev.repositories")
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
}

run {
Expand All @@ -17,108 +17,16 @@ run {
repositoriesMode = RepositoriesMode.PREFER_SETTINGS
rulesMode = RulesMode.PREFER_SETTINGS

repositories {
maven {
name = "ModMaven (K4U-NL)"
url = uri("https://modmaven.dev/")
content {
includeGroup("mekanism")
includeGroup("de.mari_023")
}
}

maven {
name = "BlameJared"
url = uri("https://maven.blamejared.com")
content {
includeGroup("com.hollingsworth.ars_nouveau")
includeGroup("com.hollingsworth.nuggets")
includeGroup("vazkii.botania")
includeGroup("vazkii.patchouli")
}
}

maven {
name = "GeckoLib"
url = uri("https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/")
content {
includeGroup("software.bernie.geckolib")
}
}

maven {
name = "Illusive Soulworks"
url = uri("https://maven.theillusivec4.top/")
content {
includeGroup("com.illusivesoulworks.caelus")
includeGroup("top.theillusivec4.curios")
}
}

maven {
name = "Minecraft Forge"
url = uri("https://maven.minecraftforge.net/")
content {
includeGroup("com.github.glitchfiend")
}
}

maven {
name = "CurseMaven"
url = uri("https://cursemaven.com")
content {
includeGroup("curse.maven")
}
}
}

versionCatalogs {
val mc = "1.21.1"
val maj = mc.substringAfter('.')
val nf = "${maj + (if (!maj.contains('.')) ".0" else "")}.238"
val nf = "26.1.2.80"

create("core") {
version("minecraft", mc)

version("minecraft", "26.1.2")
version("neoforge", nf)
version("parchment", "2024.11.17")

version("ae2", "19.2.15")
version("ae2", "26.1.10-beta")
library("ae2", "org.appliedenergistics", "appliedenergistics2").versionRef("ae2")
}

create("integration") {
version("ae2wtlib", "19.2.2")
library("ae2wtlib", "de.mari_023", "ae2wtlib").versionRef("ae2wtlib")
library("ae2wtlibapi", "de.mari_023", "ae2wtlib_api").versionRef("ae2wtlib")

version("appmek", "1.6.2")
library("appmek", "curse.maven", "applied-mekanistics-574300").version("5978711")
library("mekanism", "mekanism", "Mekanism").version("$mc-10.7.9.72")

library("appbot", "curse.maven", "applied-botanics-addon-610632").version("7234122")
library("botania", "vazkii.botania", "botania-neoforge-1.21.1").version("451-SNAPSHOT")

version("arseng", "2.0.5-beta")
library("arseng", "curse.maven", "ars-energistique-905641").version("6021072")
library("arsnouveau", "com.hollingsworth.ars_nouveau", "ars_nouveau-1.21.1").version("5.10.0.1183")

library("appflux", "curse.maven", "applied-flux-965012").version("5946853")
library("glodium", "curse.maven", "glodium-957920").version("5821676")

library("appex", "curse.maven", "applied-experienced-1157608").version("6112629")
library("explib", "curse.maven", "experiencelib-1156551").version("5992832")

library("appliede", "curse.maven", "appliede-1009940").version("6430033")
library("projecte", "curse.maven", "projecte-226410").version("6301953")

library("appsoul", "curse.maven", "applied-soul-1337114").version("7653184")
library("industrialforegoing", "curse.maven", "industrial-foregoing-266515").version("6626624")
library("ifsouls", "curse.maven", "industrial-foregoing-souls-904394").version("6235883")
library("titanium", "curse.maven", "titanium-287342").version("6875285")
library("soulpliedenergistics", "curse.maven", "soulplied-energistics-1143614").version("6771121")
}

create("testlibs") {
library("neoforge-test", "net.neoforged", "testframework").version(nf)
library("junit-jupiter", "org.junit.jupiter", "junit-jupiter").version("5.7.1")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"model": {
"type": "ae2:composite",
"models": [
{
"type": "ae2:model",
"model": "megacells:part/mega_interface"
},
{
"type": "ae2:status_indicator",
"active": "ae2:part/interface_has_channel",
"powered": "ae2:part/interface_on",
"unpowered": "ae2:part/interface_off"
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"model": {
"type": "ae2:composite",
"models": [
{
"type": "ae2:model",
"model": "megacells:part/mega_pattern_provider"
},
{
"type": "ae2:status_indicator",
"active": "ae2:part/interface_has_channel",
"powered": "ae2:part/interface_on",
"unpowered": "ae2:part/interface_off"
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"model": {
"type": "ae2:model",
"model": "megacells:part/cell_dock"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"model": {
"type": "ae2:model",
"model": "megacells:part/decompression_module"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"model": "megacells:block/crafting/16m_storage"
},
"formed=true": {
"model": "megacells:block/crafting/16m_storage_formed"
"type": "megacells:crafting_cube",
"unit_type": "16m_storage"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"model": "megacells:block/crafting/1m_storage"
},
"formed=true": {
"model": "megacells:block/crafting/1m_storage_formed"
"type": "megacells:crafting_cube",
"unit_type": "1m_storage"
}
}
}
}
Loading