Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
natanfudge committed Jan 21, 2025
1 parent 6091917 commit 0930254
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 11 deletions.
9 changes: 8 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ subprojects {
apply plugin: "com.modrinth.minotaur"
apply plugin: 'com.matthewprenger.cursegradle'


def modVersion = libs.versions.mod.version.get()
def minecraftVersion = libs.versions.minecraft.get()
ext.total_version = "$modVersion+$minecraftVersion"
def total_version = "$modVersion+$minecraftVersion"
ext.total_version = total_version

def cf = libs.versions.overrides.curseforge.get()
def mr = libs.versions.overrides.modrinth.get()
Expand All @@ -34,6 +36,11 @@ subprojects {
version = ext.total_version
group = rootProject.maven_group

base {
// Set up a suffixed format for the mod jar names, e.g. `example-fabric`.
archivesName = "$rootProject.archives_base_name-$project.name"
}

dependencies {
minecraft libs.minecraft
mappings loom.layered {
Expand Down
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Minecraft 1.20.6
- Starting from Minecraft 1.20.6, NEC supports **only** NeoForge, and not Forge.
### 4.4.7
- Fixed crash in certain cases
### 4.4.6
Expand Down
5 changes: 3 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@

org.gradle.parallel=true
org.gradle.jvmargs=-Xmx4048M
org.gradle.configuration-cache=true
org.gradle.configuration-cache.parallel=true
# Not supported by architectury, see https://github.com/architectury/architectury-loom/issues/266
#org.gradle.configuration-cache=true
#org.gradle.configuration-cache.parallel=true


archives_base_name=notenoughcrashes
Expand Down
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
# Upgrading to gradle 8.12 causes the fabric/forge jars to not contain common content for some reason...
# See https://github.com/architectury/architectury-loom/issues/265
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
16 changes: 9 additions & 7 deletions neoforge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,20 @@ remapJar {
inputFile.set shadowJar.archiveFile
}

def forge_release = "alpha"

curseforge {
apiKey = project.hasProperty("curseforge_api_key") ? project.curseforge_api_key : ""
project {
id = "442354"
releaseType = release_type
addGameVersion "Forge"
releaseType = forge_release
addGameVersion "NeoForge"
addGameVersion curseforge_mc_version
changelogType = "markdown"
changelog = rootProject.file("changelog.md")

mainArtifact(remapJar) {
displayName = "$mod_name $total_version Forge"
displayName = "$mod_name $total_version NeoForge"
}
}

Expand All @@ -81,13 +83,13 @@ modrinth {
group = "upload"
token = project.hasProperty("modrinth_api_key") ? project.modrinth_api_key : ""
projectId = 'yM94ont6'
versionNumber = total_version + "-forge" // Will fail if Modrinth has this version already
versionName = "$mod_name $total_version Forge"
versionNumber = total_version + "-neoforge" // Will fail if Modrinth has this version already
versionName = "$mod_name $total_version NeoForge"
uploadFile = remapJar
gameVersions = [modrinth_mc_version]
loaders = ["forge"]
loaders = ["neoforge"]
changelog = rootProject.file("changelog.md").text
versionType = release_type
versionType = forge_release
}


Expand Down

0 comments on commit 0930254

Please sign in to comment.