Skip to content
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
15 changes: 9 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,23 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
- uses: actions/checkout@v5
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: '17'
java-version: |
8
16
21
distribution: 'adopt'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
uses: gradle/actions/wrapper-validation@v3
- name: Build with Gradle
run: ./gradlew build copyRelease
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: 'Prebuilt Artifacts'
path: build/libs
15 changes: 9 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,20 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
- uses: actions/checkout@v5
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: '17'
java-version: |
8
16
21
distribution: 'adopt'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
uses: gradle/actions/wrapper-validation@v3
- name: Build with Gradle and publish all editions
if: ${{ github.event.inputs.publish-all == 'true' }}
run: ./gradlew build publishCurseForge copyRelease
Expand All @@ -39,7 +42,7 @@ jobs:
run: ./gradlew :${{ github.event.inputs.publish-edition }}:build :${{ github.event.inputs.publish-edition }}:publishCurseForge :${{ github.event.inputs.publish-edition }}:copyRelease
env:
CURSE_API: ${{ secrets.CURSE_API }}
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: 'Prebuilt Artifacts'
path: build/libs
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 4 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ pluginManagement {
maven {
url = 'https://repo.spongepowered.org/repository/maven-public/'
}
maven { url = 'https://maven.neoforged.net/releases' }
}
}

Expand All @@ -24,6 +25,9 @@ project(":Forge-1.16.5").projectDir = file("./sources/Forge-1.16.5")
include("Forge-1.17.1")
project(":Forge-1.17.1").projectDir = file("./sources/Forge-1.17.1")

include("NeoForge-1.21.9")
project(":NeoForge-1.21.9").projectDir = file("./sources/NeoForge-1.21.9")

include("Forge-1.12.2")
project(":Forge-1.12.2").projectDir = file("./sources/Forge-1.12.2")

Expand Down
4 changes: 2 additions & 2 deletions sources/Fabric-1.16.5/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ loom {

task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
archiveClassifier = 'sources'
}

artifacts {
Expand Down Expand Up @@ -100,7 +100,7 @@ task("copyRelease") {
def libDir = project.projectDir.toPath().resolve("build/libs")
from(libDir) {
include "*.jar"
exclude "*-dev.jar", "*-sources.jar"
exclude "*-dev.jar"
}
into "../../build/libs/"
duplicatesStrategy DuplicatesStrategy.INCLUDE
Expand Down
6 changes: 3 additions & 3 deletions sources/Forge-1.12.2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '6.0.+', changing: true
}
}

Expand Down Expand Up @@ -88,7 +88,7 @@ tasks.withType(JavaCompile) {

task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
archiveClassifier = 'sources'
}

artifacts {
Expand Down Expand Up @@ -125,7 +125,7 @@ task("copyRelease") {
def libDir = project.projectDir.toPath().resolve("build/libs")
from(libDir) {
include "*.jar"
exclude "*-dev.jar", "*-sources.jar"
exclude "*-dev.jar"
}
into "../../build/libs/"
duplicatesStrategy DuplicatesStrategy.INCLUDE
Expand Down
6 changes: 3 additions & 3 deletions sources/Forge-1.16.5/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '6.0.+', changing: true
classpath 'org.spongepowered:mixingradle:0.7-SNAPSHOT'
}
}
Expand Down Expand Up @@ -107,7 +107,7 @@ tasks.withType(JavaCompile) {

task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
archiveClassifier = 'sources'
}

artifacts {
Expand Down Expand Up @@ -144,7 +144,7 @@ task("copyRelease") {
def libDir = project.projectDir.toPath().resolve("build/libs")
from(libDir) {
include "*.jar"
exclude "*-dev.jar", "*-sources.jar"
exclude "*-dev.jar"
}
into "../../build/libs/"
duplicatesStrategy DuplicatesStrategy.INCLUDE
Expand Down
6 changes: 3 additions & 3 deletions sources/Forge-1.17.1/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '6.0.+', changing: true
}
}

Expand Down Expand Up @@ -79,7 +79,7 @@ tasks.withType(JavaCompile) {

task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
archiveClassifier = 'sources'
}

artifacts {
Expand Down Expand Up @@ -122,7 +122,7 @@ task("copyRelease") {
def libDir = project.projectDir.toPath().resolve("build/libs")
from(libDir) {
include "*.jar"
exclude "*-dev.jar", "*-sources.jar"
exclude "*-dev.jar"
}
into "../../build/libs/"
duplicatesStrategy DuplicatesStrategy.INCLUDE
Expand Down
6 changes: 3 additions & 3 deletions sources/Forge-1.7.10/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '6.0.+', changing: true
}
}

Expand Down Expand Up @@ -90,7 +90,7 @@ tasks.withType(JavaCompile) {
task sourcesJar(type: Jar) {
exclude('cpw/**')
from sourceSets.main.allSource
classifier = 'sources'
archiveClassifier = 'sources'
}

artifacts {
Expand Down Expand Up @@ -127,7 +127,7 @@ task("copyRelease") {
def libDir = project.projectDir.toPath().resolve("build/libs")
from(libDir) {
include "*.jar"
exclude "*-dev.jar", "*-sources.jar"
exclude "*-dev.jar"
}
into "../../build/libs/"
duplicatesStrategy DuplicatesStrategy.INCLUDE
Expand Down
117 changes: 117 additions & 0 deletions sources/NeoForge-1.21.9/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
plugins {
id 'java-library'
id 'net.darkhax.curseforgegradle' version '1.0.11'
id 'net.neoforged.gradle.userdev' version '7.0.192'
}


archivesBaseName = "${rootProject.name}"

//minecraft.accessTransformers.file rootProject.file('src/main/resources/META-INF/accesstransformer.cfg')

ext.replace_version(version)

version = "1.21.9-${version}-NeoForge"

runs {
client {
workingDirectory file('./run')
systemProperty 'forge.logging.markers', 'REGISTRIES'
systemProperty 'forge.logging.console.level', 'debug'

modSource project.sourceSets.main
modSource project(":Core").sourceSets.main
}

server {
workingDirectory file('./run')
systemProperty 'forge.logging.markers', 'REGISTRIES'
systemProperty 'forge.logging.console.level', 'debug'

modSource project.sourceSets.main
modSource project(":Core").sourceSets.main
}
}

dependencies {
implementation "net.neoforged:neoforge:21.9.14-beta"
implementation project(":Core")
}

/*processResources {
duplicatesStrategy = 'include'

from(sourceSets.main.resources.srcDirs) {
include 'META-INF/mods.toml'

// expand 'forge_version': forge_version
}

from(sourceSets.main.resources.srcDirs) {
exclude 'META-INF/mods.toml'
}
}*/

tasks.withType(JavaCompile) {
source(project(":Core").sourceSets.main.allSource)
}

task sourcesJar(type: Jar) {
from sourceSets.main.allSource
archiveClassifier = 'sources'
}

idea {
module {
downloadSources = true
downloadJavadoc = true
}
}

artifacts {
archives jar
archives sourcesJar
}

task publishCurseForge(type: net.darkhax.curseforgegradle.TaskPublishCurseForge) {
if (System.getenv("CURSE_API") != null && !System.getenv("CURSE_API").equals("")) {
disableVersionDetection()
apiToken = System.getenv("CURSE_API")

def mainFile = upload(659192, jar)
mainFile.releaseType = project.ext.relType
mainFile.displayName = "$archivesBaseName-$version"
mainFile.changelogType = 'html'
mainFile.changelog = file('../../changelog.html')
mainFile.addModLoader('Forge')
mainFile.addJavaVersion('Java 16')
mainFile.addJavaVersion('Java 17')
mainFile.addGameVersion('1.20')
mainFile.addGameVersion('1.19.4')
mainFile.addGameVersion('1.19.3')
mainFile.addGameVersion('1.19.2')
mainFile.addGameVersion('1.18.2')
mainFile.addGameVersion('1.17.1')

def sourcesFile = mainFile.withAdditionalFile(sourcesJar)
sourcesFile.changelog = file('../../changelog.html')
sourcesFile.displayName = "$archivesBaseName-$version-sources"
}
}

task("copyRelease") {
dependsOn "build"

doFirst {
println "Gathering builds"
copy {
def libDir = project.projectDir.toPath().resolve("build/libs")
from(libDir) {
include "*.jar"
exclude "*-dev.jar"
}
into "../../build/libs/"
duplicatesStrategy DuplicatesStrategy.INCLUDE
}
}
}
1 change: 1 addition & 0 deletions sources/NeoForge-1.21.9/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
javaVersion = 21
Loading