Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Architectury Multi-Loader Setup #236

Merged
merged 62 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
0d43681
Begin architectury setup
Kneelawk Apr 17, 2024
99044bc
Re-add package-info generation
Kneelawk Apr 17, 2024
a6157c5
Re-add sodium/embeddium, iris/oculus, starlight dependencies
Kneelawk Apr 17, 2024
0d8a63f
Add jsr305 compile dependency
Kneelawk Apr 17, 2024
85fc7c8
Begin on platform abstraction interface
Kneelawk Apr 18, 2024
54f2ffd
Move Sodium mixin to platform code
Kneelawk Apr 18, 2024
2163ad9
Move MinecraftMixin to platforms
Kneelawk Apr 18, 2024
c027023
Move events to platforms
Kneelawk Apr 18, 2024
5e7e867
Deduplication and stubs
Jozufozu Apr 19, 2024
d9c178c
Platform dependent wheeling
Jozufozu Apr 19, 2024
6929041
Out for a run
Jozufozu Apr 19, 2024
87b9a92
Everything but models
Jozufozu Apr 19, 2024
5b23398
Compiling models
Jozufozu Apr 20, 2024
f471edc
Gradle grumbles
Jozufozu Apr 21, 2024
b5066e3
One line optimization
Jozufozu Apr 21, 2024
9d227c5
Minor clean up and fixes
PepperCode1 Apr 22, 2024
77c2181
Graidiomatic
Jozufozu Apr 22, 2024
543f759
Most of Fabric
PepperCode1 Apr 22, 2024
6d36f66
Remove old DependencyInjection#load method
PepperCode1 Apr 22, 2024
819863a
Fix javadoc task
Kneelawk Apr 23, 2024
3c7ecdd
Fix artifactIds
Kneelawk Apr 23, 2024
b30b1f7
Fix refmaps
Kneelawk Apr 23, 2024
1b41ba3
Fix forge remapping
Kneelawk Apr 23, 2024
82c7ade
Centrifuge
Jozufozu Apr 24, 2024
52eef2e
Unconventional
Jozufozu Apr 25, 2024
2e7c33b
Pretty groovy man
Jozufozu Apr 27, 2024
77fa092
Best-effort untested Fabric model builders
PepperCode1 Apr 27, 2024
dd77686
Add common publishing
Kneelawk Apr 27, 2024
4145d80
Use central javadoc-options file
Kneelawk Apr 27, 2024
ce5a047
Get Publishing!
Kneelawk Apr 27, 2024
edce752
Fix refmaps, again
Kneelawk Apr 27, 2024
1e6dfa0
Fix RenderStageCallback
Kneelawk Apr 27, 2024
7cb3fb8
Workflowing
Kneelawk Apr 27, 2024
98999fb
Workflower
Kneelawk Apr 27, 2024
95ab918
Workflowest
Kneelawk Apr 27, 2024
9a423f7
Workflowester
Kneelawk Apr 27, 2024
d4ed535
Workflowestest
Kneelawk Apr 27, 2024
b5cbd28
Publicity stunt
Jozufozu Apr 28, 2024
da478cd
Plugin play
Jozufozu Apr 28, 2024
8bf6957
Fabric client commands
PepperCode1 Apr 29, 2024
19d741e
Caught linking
Jozufozu Apr 29, 2024
0a1340f
Unplugging it and plugging it back in
Jozufozu Apr 29, 2024
45a5ca6
Declaration of jar
Jozufozu Apr 30, 2024
71d56ad
Willing and able
Jozufozu Apr 30, 2024
cfa7fcc
Shaders and ladders
Jozufozu May 2, 2024
bc9f515
All your script are belong to us
Jozufozu May 3, 2024
eed40d9
Wait, it's all kotlin?
Jozufozu May 4, 2024
ad19e45
Overextending
Jozufozu May 4, 2024
e07d658
Final warning
Jozufozu May 4, 2024
bba587f
Less is more
Jozufozu May 4, 2024
83d0934
Aven-jars assemble
Jozufozu May 4, 2024
4e83d9e
Extending clarity
Jozufozu May 7, 2024
d5cdabb
JSON Fabrication
Jozufozu May 9, 2024
3b94a46
Vulcan't
Jozufozu May 11, 2024
eec8791
Burning books
Jozufozu May 11, 2024
30cdeaa
Update CI
Kneelawk May 12, 2024
5083ad2
Fix upload-artifacts path
Kneelawk May 12, 2024
1f6972a
Upgrade gradle-wrapper action
Kneelawk May 12, 2024
c5a6fe9
Fix api artifacts getting remapped by consumers
Kneelawk May 12, 2024
f4ace71
Use better method for telling loom to remap api artifacts
Kneelawk May 12, 2024
e5384c2
Fix registry freeze timing
PepperCode1 May 12, 2024
db79488
Fix mesh order of models from model builders
PepperCode1 May 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 1 addition & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ root = true
[*]
indent_style = space
indent_size = 4
ij_continuation_indent_size = 8
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.json]
indent_style = space
indent_size = 2
max_line_length = 500
ij_json_keep_blank_lines_in_code = 0
Expand All @@ -27,12 +25,12 @@ ij_json_wrap_long_lines = false

[*.java]
indent_style = tab
ij_continuation_indent_size = 8
ij_java_blank_lines_before_class_end = 0
ij_java_blank_lines_after_anonymous_class_header = 0
ij_java_blank_lines_after_class_header = 0
ij_java_blank_lines_before_method_body = 0
ij_java_else_on_new_line = false
ij_continuation_indent_size = 8
ij_java_class_count_to_use_import_on_demand = 99
ij_java_names_count_to_use_import_on_demand = 99
ij_java_imports_layout = $*, |, java.**, |, javax.**, |, org.**, |, com.**, |, *
47 changes: 47 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: build

on: [ pull_request, push ]

jobs:
build:
strategy:
matrix:
java: [
17 # Current Java LTS & minimum supported by Minecraft
]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@v3
- name: Gradle Cache
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
.gradle/loom-cache
build/
key: ${{ runner.os }}-jdk${{ matrix.java }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle.properties', '**/gradle-wrapper.properties', '.github/workflows/build.yml') }}
- name: Setup JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Make Gradle Wrapper Executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: Build
# doesn't actually publish, as no secrets are passed in, just makes sure that publishing works
run: ./gradlew publish --no-daemon
- name: Capture Build Artifacts
if: ${{ runner.os == 'Linux' && matrix.java == '17' }}
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: |
common/build/libs/
fabric/build/libs/
forge/build/libs/
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,4 @@ local.properties
# Other
mcmodsrepo
src/*/generatedPackageInfos/
*/src/*/generatedPackageInfos/
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2021-2023 Jozufozu
Copyright (c) 2021-2024 Jozufozu

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@ repositories {
}

dependencies {
implementation fg.deobf("com.jozufozu.flywheel:Flywheel-Forge:${flywheel_version}")
compileOnly fg.deobf("com.jozufozu.flywheel:flywheel-forge-api-${minecraft_version}:${flywheel_version}")
runtimeOnly fg.deobf("com.jozufozu.flywheel:flywheel-forge-${minecraft_version}:${flywheel_version}")
}
```
`${flywheel_version}` gets replaced by the version of Flywheel you want to use, eg. `1.18-0.3.0.3`
`${flywheel_version}` gets replaced by the version of Flywheel you want to use, eg. `1.0.0-beta`
`${minecraft_version}` gets replaced by the version of Minecraft you're on, eg. `1.20.1`

For a list of available Flywheel versions, you can check [the maven](https://maven.tterrag.com/com/jozufozu/flywheel/Flywheel-Forge/).

Expand Down
205 changes: 0 additions & 205 deletions build.gradle

This file was deleted.

15 changes: 15 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
plugins {
idea
java
id("dev.architectury.loom") apply false
}

println("Java: ${System.getProperty("java.version")}, JVM: ${System.getProperty("java.vm.version")} (${System.getProperty("java.vendor")}), Arch: ${System.getProperty("os.arch")}")

idea {
// Tell IDEA to always download sources/javadoc artifacts from maven.
module {
isDownloadJavadoc = true
isDownloadSources = true
}
}
35 changes: 35 additions & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
plugins {
id("java-gradle-plugin")
kotlin("jvm") version "1.9.23"
`kotlin-dsl`
}

repositories {
gradlePluginPortal()
mavenCentral()
maven("https://maven.minecraftforge.net/") {
name = "MinecraftForge"
}
maven("https://maven.architectury.dev/") {
name = "Architectury"
}
maven("https://repo.spongepowered.org/repository/maven-public")
maven("https://maven.parchmentmc.org")
}

gradlePlugin {
plugins {
create("platformPlugin") {
id = "flywheel.platform"
implementationClass = "com.jozufozu.gradle.platform.PlatformPlugin"
}
create("subprojectPlugin") {
id = "flywheel.subproject"
implementationClass = "com.jozufozu.gradle.subproject.SubprojectPlugin"
}
}
}

dependencies {
implementation("dev.architectury.loom:dev.architectury.loom.gradle.plugin:1.6-SNAPSHOT")
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package com.jozufozu.gradle.jarset

import net.fabricmc.loom.task.RemapJarTask
import net.fabricmc.loom.task.RemapSourcesJarTask
import org.gradle.api.Project
import org.gradle.api.tasks.SourceSet
import org.gradle.jvm.tasks.Jar
import org.gradle.kotlin.dsl.named
import org.gradle.kotlin.dsl.provideDelegate

open class JarSetExtension(private val project: Project) {
fun create(name: String, vararg sourceSetSet: SourceSet): JarTaskSet {
return JarTaskSet.create(project, name, *sourceSetSet)
}

fun outgoing(name: String, vararg sourceSetSet: SourceSet): JarTaskSet {
return JarTaskSet.create(project, name, *sourceSetSet).also { it.createOutgoingConfiguration() }
}

val mainSet: JarTaskSet by lazy {
val jarTask = project.tasks.named<Jar>("jar")
val remapJarTask = project.tasks.named<RemapJarTask>("remapJar")
val sourcesJarTask = project.tasks.named<Jar>("sourcesJar")
val remapSourcesJarTask = project.tasks.named<RemapSourcesJarTask>("remapSourcesJar")
val javadocJarTask = project.tasks.named<Jar>("javadocJar")

JarTaskSet(project, "main", jarTask, sourcesJarTask, javadocJarTask, remapJarTask, remapSourcesJarTask)
}
}
Loading