Skip to content

Commit

Permalink
Updated to 1.20
Browse files Browse the repository at this point in the history
  • Loading branch information
Stereowalker committed Jul 20, 2024
1 parent 5acbe8a commit f8f6d20
Show file tree
Hide file tree
Showing 20 changed files with 669 additions and 672 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: publish

on:
workflow_dispatch

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'adopt-hotspot'
java-version: 17
cache: 'gradle'

- name: make gradle wrapper executable
run: chmod +x ./gradlew
- name: build files
run: ./gradlew build

- name: read mod name, mod version and minecraft version
id: properties
uses: christian-draeger/[email protected]
with:
path: './gradle.properties'
properties: 'modFilename mod_version modMinecraftVersion'

- uses: Kir-Antipov/[email protected]
with:
modrinth-featured: true
modrinth-unfeature-mode: subset

modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}

name: '${{ steps.properties.outputs.modFilename }}-${{ steps.properties.outputs.mod_version }}+${{ steps.properties.outputs.modMinecraftVersion }}'
version: '${{ steps.properties.outputs.mod_version }}+${{ steps.properties.outputs.modMinecraftVersion }}'
game-versions: |
${{ steps.properties.outputs.modMinecraftVersion }}
version-type: release
version-resolver: exact

dependencies: |
cloth-config | depends | *
changelog-file: changelog.md

retry-attempts: 2
retry-delay: 10000
fail-mode: fail

- name: read changelog
id: changelog
uses: juliangruber/read-file-action@v1
with:
path: 'changelog.md'

- name: discord webhook
uses: tsickert/[email protected]
with:
webhook-url: ${{ secrets.WEBHOOK_URL }}
embed-title: "${{ steps.properties.outputs.modFilename }} ${{ steps.properties.outputs.mod_version }} for Minecraft ${{ steps.properties.outputs.modMinecraftVersion }} has been released!"
embed-description: "**Changelog**```md\n${{ steps.changelog.outputs.content }}```\n**Downloads**\n<:modrinth:1110118061106798644> https://modrinth.com/mod/${{ steps.properties.outputs.modFilename }}\n<:curseforge:1110124796362109028> https://www.curseforge.com/minecraft/mc-mods/${{ steps.properties.outputs.modFilename }}"
embed-footer-text: "Have fun and be blessed!"
embed-color: 0xFF8000
67 changes: 29 additions & 38 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,33 +1,19 @@
buildscript {
repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
maven { url = 'https://repo.spongepowered.org/maven' }
jcenter()
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
classpath 'org.parchmentmc:librarian:1.+'
classpath group: 'org.spongepowered', name: 'mixingradle', version: '0.7-SNAPSHOT'
}
}

plugins {
id "com.matthewprenger.cursegradle" version "1.4.0"
id 'eclipse'
id 'idea'
id 'maven-publish'
id 'net.minecraftforge.gradle' version '[6.0.24,6.2)'
id 'org.parchmentmc.librarian.forgegradle' version '1.+'
id 'org.spongepowered.mixin' version '0.7.+'
id "com.matthewprenger.cursegradle" version "1.4.0"
id "com.modrinth.minotaur" version "2.+"
}

apply plugin: 'net.minecraftforge.gradle'
// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
apply plugin: 'org.parchmentmc.librarian.forgegradle'
apply plugin: 'org.spongepowered.mixin'

mixin {
add sourceSets.main, modId+".refmap.json"
}

archivesBaseName = project.archives_base_name
archivesBaseName = project.modFilename
version = project.mod_version
group = project.maven_group

Expand Down Expand Up @@ -74,6 +60,8 @@ minecraft {
}
}

sourceSets.main.resources { srcDir 'src/generated/resources' }

repositories {
maven { url = "https://repo.spongepowered.org/maven" } // mixin
maven {url "https://www.cursemaven.com"}
Expand All @@ -93,10 +81,10 @@ tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}

task sourcesJar(type: Jar, dependsOn: classes) {
classifier = "sources"
from sourceSets.main.allSource
}
//task sourcesJar(type: Jar, dependsOn: classes) {
// classifier = "sources"
// from sourceSets.main.allSource
//}

jar {
from "LICENSE"
Expand Down Expand Up @@ -125,23 +113,26 @@ curseforge {
}
}

tasks.named('processResources', ProcessResources).configure {
var replaceProperties = [
minecraft_version: project.modMinecraftVersion,
modForgeVersion: project.modForgeVersion, mod_version: project.mod_version,
clothConfigVersion: project.clothConfigVersion,
]
inputs.properties replaceProperties

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

// configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
// add all the jars that should be included when publishing to maven
//artifact(remapJar) {
// builtBy remapJar
//}
//artifact(sourcesJar) {
// builtBy remapSourcesJar
//}
from components.java
}
}

// select the repositories you want to publish to
repositories {
// uncomment to publish to the local maven
// mavenLocal()
}
}
7 changes: 6 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
- Ported to 1.19.3
### Added:
-
### Fixed:
-
### Changed:
- Updated to mc 1.20.1
9 changes: 4 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

modMinecraftVersion = 1.19.3
modForgeVersion = 44.1.20
modMinecraftVersion = 1.20.1
modForgeVersion = 47.3.0
modMixinVersion = 0.8.5
mappingsChannel = parchment
mappingsVersion = 2023.02.26-1.19.3
mappingsVersion = 2023.08.20-1.20.1

modId = rpgz
modGroup = net.rpgz
Expand All @@ -17,7 +17,6 @@ modCurseId = 404828
# Mod Properties
mod_version = 0.5.4-forge
maven_group = net.rpgz
archives_base_name = rpgz

# Dependencies
clothConfigVersion = 9.0.94
clothConfigVersion = 11.1.118
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
11 changes: 6 additions & 5 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit f8f6d20

Please sign in to comment.