-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from Kasualix/forge/1.19.2
Port to forge
- Loading branch information
Showing
16 changed files
with
203 additions
and
311 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,24 @@ | ||
# Automatically build the project and run any configured tests for every push | ||
# and submitted pull request. This can help catch issues that only occur on | ||
# certain platforms or Java versions, and provides a first line of defence | ||
# against bad commits. | ||
name: Java CI with Gradle | ||
|
||
name: build | ||
on: [pull_request, push] | ||
on: [ pull_request, push ] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
# Use these Java versions | ||
java: [ | ||
17, # Current Java LTS & minimum supported by Minecraft | ||
] | ||
# and run on both Linux and Windows | ||
os: [ubuntu-22.04, windows-2022] | ||
runs-on: ${{ matrix.os }} | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: checkout repository | ||
uses: actions/checkout@v3 | ||
- name: validate gradle wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
- name: setup jdk ${{ matrix.java }} | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: ${{ matrix.java }} | ||
distribution: 'microsoft' | ||
- name: make gradle wrapper executable | ||
if: ${{ runner.os != 'Windows' }} | ||
run: chmod +x ./gradlew | ||
- name: build | ||
distribution: 'temurin' | ||
java-version: 17 | ||
- name: Grant execute permission for Gradlew | ||
run: chmod +x gradlew | ||
- name: Build with Gradle | ||
run: ./gradlew build | ||
- name: capture build artifacts | ||
if: ${{ runner.os == 'Linux' && matrix.java == '17' }} # Only upload artifacts built from latest java on one OS | ||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Artifacts | ||
path: build/libs/ | ||
path: build/libs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,9 @@ | ||
# gradle | ||
|
||
.gradle/ | ||
build/ | ||
out/ | ||
classes/ | ||
|
||
# eclipse | ||
|
||
*.launch | ||
|
||
# idea | ||
|
||
.idea/ | ||
*.iml | ||
*.ipr | ||
*.iws | ||
|
||
# vscode | ||
|
||
.settings/ | ||
.vscode/ | ||
bin/ | ||
.classpath | ||
.project | ||
|
||
# macos | ||
|
||
*.DS_Store | ||
|
||
# fabric | ||
|
||
run/ | ||
|
||
# java | ||
|
||
hs_err_*.log | ||
replay_*.log | ||
*.hprof | ||
*.jfr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,60 @@ | ||
plugins { | ||
id 'fabric-loom' version '1.2-SNAPSHOT' | ||
id 'maven-publish' | ||
id "dev.architectury.loom" version "1.1-SNAPSHOT" | ||
id "maven-publish" | ||
} | ||
|
||
archivesBaseName = "${project.archives_base_name}-${project.minecraft_version}" | ||
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_17 | ||
|
||
archivesBaseName = project.archives_base_name | ||
version = project.mod_version | ||
group = project.maven_group | ||
|
||
repositories { | ||
maven { url 'https://api.modrinth.com/maven' } | ||
loom { | ||
silentMojangMappingsLicense() | ||
forge { | ||
mixinConfigs = [ | ||
"bounced.mixins.json" | ||
] | ||
} | ||
} | ||
|
||
repositories {} | ||
|
||
dependencies { | ||
minecraft "com.mojang:minecraft:${project.minecraft_version}" | ||
minecraft "com.mojang:minecraft:${project.minecraft_version}" | ||
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" | ||
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" | ||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" | ||
|
||
compileOnly "maven.modrinth:splasher:${project.minecraft_version}-${project.splasher_version}" | ||
forge "net.minecraftforge:forge:${project.forge_version}" | ||
} | ||
|
||
processResources { | ||
inputs.property "version", project.version | ||
|
||
filesMatching("fabric.mod.json") { | ||
expand "version": project.version | ||
} | ||
inputs.property "version", project.version | ||
filesMatching("META-INF/mods.toml") { | ||
expand "version": project.version | ||
} | ||
} | ||
|
||
tasks.withType(JavaCompile).configureEach { | ||
it.options.release = Integer.parseInt(sourceCompatibility) | ||
} | ||
|
||
java { | ||
withSourcesJar() | ||
|
||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
tasks.withType(JavaCompile) { | ||
options.encoding = "UTF-8" | ||
options.release.set(17) | ||
} | ||
|
||
jar { | ||
from("LICENSE") { | ||
rename { "${it}_${project.archivesBaseName}"} | ||
} | ||
manifest { | ||
attributes([ | ||
"Implementation-Title" : project.name, | ||
"Implementation-Version" : version, | ||
"Implementation-Vendor" : project.mod_author, | ||
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") | ||
]) | ||
} | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
from components.java | ||
} | ||
} | ||
|
||
repositories { | ||
} | ||
publications { | ||
mavenJava(MavenPublication) { | ||
from components.java | ||
} | ||
} | ||
|
||
repositories {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
org.gradle.jvmargs = -Xmx1G | ||
org.gradle.parallel = true | ||
# Gradle | ||
org.gradle.jvmargs=-Xmx2G | ||
org.gradle.daemon=false | ||
org.gradle.parallel=true | ||
|
||
# Base properties | ||
loom.platform=forge | ||
minecraft_version=1.19.2 | ||
yarn_mappings=1.19.2+build.28 | ||
forge_version=1.19.2-43.2.8 | ||
|
||
# https://fabricmc.net/develop | ||
minecraft_version = 1.19 | ||
yarn_mappings = 1.19+build.4 | ||
loader_version = 0.14.19 | ||
|
||
mod_version = 2.1.2 | ||
maven_group = net.krlite | ||
archives_base_name = bounced | ||
|
||
# Dependencies | ||
fabric_version = 0.58.0+1.19 | ||
splasher_version = v4.0.4-beta | ||
# Mod Properties | ||
mod_version=1.19.2-1.0.0 | ||
maven_group=net.krlite.bounced | ||
archives_base_name=bounced-forge | ||
mod_id=bounced | ||
mod_author=KrLite, Kasualix |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip | ||
networkTimeout=10000 | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
pluginManagement { | ||
// when using additional gradle plugins like shadow, | ||
// add their repositories to this list! | ||
repositories { | ||
maven { | ||
name = 'Fabric' | ||
url = 'https://maven.fabricmc.net/' | ||
} | ||
mavenCentral() | ||
maven { url "https://maven.fabricmc.net/" } | ||
maven { url "https://maven.architectury.dev/" } | ||
maven { url "https://files.minecraftforge.net/maven/" } | ||
gradlePluginPortal() | ||
} | ||
} |
Oops, something went wrong.