Skip to content

Commit

Permalink
bump version to 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMCCrazyMan committed Aug 30, 2024
1 parent c799154 commit 5f668f6
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 46 deletions.
78 changes: 50 additions & 28 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
id 'eclipse'
id 'idea'
id 'maven-publish'
id 'net.neoforged.gradle.userdev' version '7.0.142'
id 'net.neoforged.moddev' version '1.0.0'
id 'me.shedaniel.unified-publishing' version '0.1.+'
}

Expand All @@ -22,42 +22,55 @@ base {
// Mojang ships Java 21 to end users in 1.20.5+, so your mod should target Java 21.
java.toolchain.languageVersion = JavaLanguageVersion.of(21)

minecraft.accessTransformers.file rootProject.file('src/main/resources/META-INF/accesstransformer.cfg')
neoForge {
runs {
version = neo_version

runs {
// applies to all the run configs below
configureEach {
systemProperty 'neoforge.logging.markers', 'REGISTRIES'
systemProperty 'neoforge.logging.console.level', 'debug'
// applies to all the run configs below
configureEach {
systemProperty 'neoforge.logging.markers', 'REGISTRIES'
systemProperty 'neoforge.logging.console.level', 'debug'

modSource project.sourceSets.main
}
gameDirectory = project.file("runs/${name}")
}

client {
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
}
client {
type = 'client'

server {
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
programArgument '--nogui'
}
systemProperty 'forge.enabledGameTestNamespaces', project.mod_id
}

gameTestServer {
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
server {
type = 'server'

systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
programArgument '--nogui'
}

gameTestServer {
type = 'gameTestServer'

systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
}

data {
type = 'data'

programArguments.addAll '--mod', project.mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath(), '--existing-mod', 'usefulfoundation'
}
}

data {
programArguments.addAll '--mod', project.mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath(), '--existing-mod', 'usefulfoundation'
mods {
"$mod_id" {
sourceSet sourceSets.main
}
}
}

// Include resources generated by data generators.
sourceSets.main.resources { srcDir 'src/generated/resources' }

dependencies {
implementation "net.neoforged:neoforge:$neo_version"

// TheMCBrosLib
implementation "net.themcbrothers:themcbroslib:$lib_version"

Expand Down Expand Up @@ -98,14 +111,12 @@ tasks.withType(ProcessResources).configureEach {
inputs.properties replaceProperties

filesMatching(['META-INF/neoforge.mods.toml']) {
expand replaceProperties + [project: project]
expand replaceProperties
}
}

jar {
from(rootProject.file('LICENSE')) {
rename { "${it}_${rootProject.name}" }
}
from(rootProject.file('LICENSE'))

manifest {
attributes([
Expand Down Expand Up @@ -139,7 +150,11 @@ publishing {
password = System.getenv('NEXUS_PWD')
}

url 'https://nexus.themcbrothers.net/repository/maven-releases/'
if (version.endsWith('-SNAPSHOT')) {
url 'https://nexus.themcbrothers.net/repository/maven-snapshots/'
} else {
url 'https://nexus.themcbrothers.net/repository/maven-releases/'
}
}
}
}
Expand Down Expand Up @@ -195,3 +210,10 @@ unifiedPublishing {
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}

idea {
module {
downloadSources = true
downloadJavadoc = true
}
}
2 changes: 1 addition & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## 1.0.0
- Updated to 1.20.6
- Updated to 1.21

35 changes: 18 additions & 17 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,30 @@ mod_authors=TheMCBrothers
mod_description=It adds simple machines for processing stuff

# Minecraft
minecraft_version=1.20.6
minecraft_version_range=[1.20.6,1.21)
minecraft_version=1.21
minecraft_version_range=[1.21,1.22)
minecraft_supported_versions=1.21,1.21.1

# NeoForge
neo_version=20.6.117
neo_version_range=[20.6.116,)
loader_version_range=[2,)
neo_version=21.0.167
neo_version_range=[21,)
loader_version_range=[3,)

# Mappings
neogradle.subsystems.parchment.minecraftVersion=1.20.6
neogradle.subsystems.parchment.mappingsVersion=2024.05.01
neoForge.parchment.minecraftVersion=1.21
neoForge.parchment.mappingsVersion=2024.07.07

# Dependencies
lib_version=1.20.6-7.0.0
lib_version_range=[1.20.6-7.0.0,)
foundation_version=1.20.6-1.0.0
foundation_version_range=[1.20.6-1.0.0,)
jei_version=18.0.0.59
jei_version_range=[18.0.0.59,)
top_version=1.20.5_neo-11.1.1-2
top_version_range=[1.20.5_neo-11.1.1-2,)
jade_id=5366595
jade_version_range=[14.2.3,)
lib_version=1.21-8.0.0
lib_version_range=[1.21-8.0.0,)
foundation_version=1.21-1.0.0
foundation_version_range=[1.21-1.0.0,)
jei_version=19.8.2.99
jei_version_range=[19.8.2.99,)
top_version=1.21_neo-12.0.3-5
top_version_range=[1.21_neo-12.0.3-5,)
jade_id=5591256
jade_version_range=[15.1.6,)

# Publishing
archive_base=useful-machinery
Expand Down

0 comments on commit 5f668f6

Please sign in to comment.