Skip to content

Commit

Permalink
initial multiloader commit
Browse files Browse the repository at this point in the history
  • Loading branch information
PinkGoosik committed Jan 22, 2024
1 parent 145e815 commit b042bc4
Show file tree
Hide file tree
Showing 430 changed files with 3,518 additions and 2,498 deletions.
38 changes: 24 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,41 @@
name: build
on: [ pull_request, push ]
# 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 defense against bad commits.

name: Build Winterly
on: [pull_request, push]

jobs:
build:
strategy:
matrix:
java: [ 17 ]
os: [ ubuntu-22.04 ]
# Use these Java versions
java: [
17, # Current Java LTS & minimum supported by Minecraft
]
# Run on these operating systems
os: [windows-latest, macos-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Validate gradle wrapper
- name: Checkout Repository
uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Setup JDK ${{ matrix.java }}
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'microsoft'
- name: Make gradle wrapper executable
distribution: 'zulu'
cache: gradle
- name: Make Gradle Wrapper Executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: build
- name: Build
run: ./gradlew build
- name: Capture build artifacts
if: ${{ runner.os == 'Linux' && matrix.java == '17' }}
uses: actions/upload-artifact@v3
if: ${{ runner.os == 'Linux' && matrix.java == '17' }} # Only upload artifacts built from latest java on one OS
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: build/libs/
path: |
fabric/build/libs/
neoforge/build/libs/
49 changes: 0 additions & 49 deletions .github/workflows/publish-curseforge.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/publish-github.yml

This file was deleted.

49 changes: 0 additions & 49 deletions .github/workflows/publish-modrinth.yml

This file was deleted.

40 changes: 19 additions & 21 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,42 +1,40 @@
# gradle

# Gradle
.gradle/
build/
out/
output/
classes/
libs/

# brachyura

.brachyura/
buildscript/build/

# eclipse

# Eclipse
*.launch
.classpath
.project

# idea

# IntelliJ IDEA
.idea/
*.iml
*.ipr
*.iws

# vscode

# Visual Studio Code
.settings/
.vscode/
bin/
.classpath
.project

# macos

# macOS
*.DS_Store

# fabric

# Minecraft/Fabric
run/

# netbeans
# Java
hs_err_*.log
replay_*.log
*.hprof
*.jfr

netbeans/
# Misc
.metadata
.settings
.architectury-transformer
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Winterly

<img align="right" width="160" src="src/main/resources/assets/winterly/icon.png">
<img align="right" width="160" src="common/src/main/resources/icon.png">

[![CurseForge Downloads](https://cf.way2muchnoise.eu/full_winterly_downloads.svg)](https://curseforge.com/minecraft/mc-mods/winterly)
[![MC Versions](https://cf.way2muchnoise.eu/versions/winterly.svg)](https://curseforge.com/minecraft/mc-mods/winterly)
Expand Down
114 changes: 60 additions & 54 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,73 +1,79 @@
plugins {
id "fabric-loom" version "1.4-SNAPSHOT"
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "1.4-SNAPSHOT" apply false
}

version = project.mod_version
group = project.maven_group

repositories {
maven {
url "https://api.modrinth.com/maven"
content { includeGroup "maven.modrinth" }
}
maven { url "https://maven.ladysnake.org/releases" } //CCA
maven { url "https://maven.terraformersmc.com" } //trinkets
maven { url "https://maven.wispforest.io" } //owo-lib
maven { url "https://maven.shedaniel.me/" } //cloth-config
architectury {
minecraft = rootProject.minecraft_version
}

dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
subprojects {
apply plugin: "dev.architectury.loom"

modImplementation "net.fabricmc:fabric-loader:${project.fabric_loader}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api}"
modImplementation "dev.emi:trinkets:${project.trinkets_version}"
loom {
silentMojangMappingsLicense()
}

// we don't include these because trinkets already does it
modImplementation "dev.onyxstudios.cardinal-components-api:cardinal-components-base:${project.cca_version}"
modImplementation "dev.onyxstudios.cardinal-components-api:cardinal-components-entity:${project.cca_version}"
dependencies {
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}"
mappings loom.officialMojangMappings()
}

modImplementation include("dev.onyxstudios.cardinal-components-api:cardinal-components-world:${project.cca_version}")
repositories {
maven {
name "NeoForged"
url "https://maven.neoforged.net/releases/"
}
}

// use modApi when owo lib is compatible with mc version
modApi "io.wispforest:owo-lib:${project.owo_lib}"
processResources {
def expandProps = [
"name": rootProject.mod_name,
"version": rootProject.mod_version,
"description": rootProject.mod_description,
"id": rootProject.mod_id,
"homepage_url": rootProject.homepage_url,
"sources_url": rootProject.sources_url,
"issue_tracker_url": rootProject.issue_tracker_url,
"license": rootProject.license,
"minecraft_version": rootProject.minecraft_version,
"minecraft_version_range": rootProject.minecraft_version_range,
"minecraft_version_range_fabric": rootProject.minecraft_version_range_fabric,
"fabric_loader_version": rootProject.fabric_loader_version,
"fabric_version": rootProject.fabric_api_version,
"neoforge_version": rootProject.neoforge_version,
"neoforge_version_range": rootProject.neoforge_version_range
]

modApi("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_config}") { exclude(group: "net.fabricmc.fabric-api") }
modApi "com.terraformersmc:modmenu:${project.modmenu_version}"
filesMatching(['pack.mcmeta', 'fabric.mod.json', 'META-INF/mods.toml', '*.mixins.json']) {
expand expandProps
}

modLocalRuntime "maven.modrinth:here-be-no-dragons:1.0.0"
modLocalRuntime "dev.emi:emi-fabric:1.0.29+1.20.4"
inputs.properties(expandProps)
}
}

loom {
accessWidenerPath = file("src/main/resources/winterly.accesswidener")
}
allprojects {
apply plugin: "java"
apply plugin: "architectury-plugin"
apply plugin: "maven-publish"

base {
archivesName = project.archives_base_name
}
base {
archivesName = rootProject.archives_base_name
}

processResources {
inputs.property "version", project.version
filesMatching("fabric.mod.json") {
expand "version": project.version
}
}
version = rootProject.mod_version
group = rootProject.maven_group

tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
it.options.release = 17
}
repositories {
}

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
withSourcesJar()
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.release = 17
}

jar {
from("LICENSE") {
rename { "${it}_${project.base.archivesName.get()}"}
}
java {
withSourcesJar()
}
}
Loading

0 comments on commit b042bc4

Please sign in to comment.