Skip to content

Commit

Permalink
promote 1.1.x to lts
Browse files Browse the repository at this point in the history
  • Loading branch information
wagyourtail committed Dec 3, 2023
2 parents cc16729 + 55456bc commit 907c751
Show file tree
Hide file tree
Showing 173 changed files with 8,791 additions and 2,416 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:

steps:
- uses: actions/checkout@v3
- run: gradle test --tests ${{ matrix.test }} --stacktrace --warning-mode fail
- run: gradle test --tests ${{ matrix.test }} --stacktrace --info --warning-mode fail
env:
TEST_WARNING_MODE: fail
id: test
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
- run: ./gradlew test --tests ${{ matrix.test }} --stacktrace --warning-mode fail
- run: ./gradlew test --tests ${{ matrix.test }} --stacktrace --info --warning-mode fail
env:
TEST_WARNING_MODE: fail
id: test
Expand Down
221 changes: 50 additions & 171 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,175 +1,54 @@
# Unimined

unified minecraft modding environment.

## TODO for initial release

* ~~remap fg2+ era at's back to notch (fixing mc 1.7+)~~
* ~~remap user at's to notch~~
* ~~auto disable combined on <=1.2.5~~
* ~~figure out, why modloader not launching in dev due to classpath path instead of jar path~~
unified minecraft modding environment with support for legacy environments.

## Supported Loaders
* Fabric
* Quilt
* Forge
* Neoforge
* Modloader
* [JarModAgent](https://github.com/unimined/JarModAgent)
* just plain jarmodding

## Planned Loaders
* Bukkit Derrivitives (at least paper)
* LiteLoader
* Sponge
* NilLoader

## Custom Loaders
yes, this is possible, see [PrcraftExampleMod](https://github.com/prcraft-minecraft/PrcraftExampleMod) and it's buildsrc dir.

## TODO

* ~~Refactor, refactor, refactor~~
* ~~FG3+ support (>1.12.2)~~
* ~~test user AT support~~
* ~~fix fg3 versions of 1.12.2~~
* ~~fabric aw support~~
* ~~combined jar support : forge 1.13+ does this, do with the rest~~
* fix split jars on fg3
* ~~figure out how to get forge to recognise resources as part of the dev mod~~
* split fg2+ out of the mc jar
* figure out how to do automated testing
* figure out how to determine the correctness of remap output
* aka automate the verification that versions work
* list of versions to verify
* 1.17.1
* 1.16.5
* 1.13.2
* 1.12.2
* 1.8.9
* 1.7.10
* 1.6.4
* 1.5.2
* 1.3.2
* 1.2.5
* 1.7.3
* b1.3_01
* a1.1.2_01
* maybe by hash check?
* figure out what versions need `-Djava.util.Arrays.useLegacyMergeSort=true` to not randomly crash, this should really
be part of the legacy mc version.json, or at least betacraft's, but it's not
* ~~make myself a maven to host this on~~: https://maven.wagyourtail.xyz
* ~~fix forge mappings on 1.17+~~
* ~~mixin support~~
* ~~add parchment mappings support~~

## Example Usage

```groovy
plugins {
id 'java'
id 'xyz.wagyourtail.unimined' // I'm using it from buildSrc, so I don't need a version, you probably do
}
group 'com.example'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
// debug, puts some things in build/unimined instead of ~/.gradle/caches/unimined
unimined.useGlobalCache = false
// when targetting main the first arg is optional
// unimined.minecraft {
unimined.minecraft(sourceSets.main) {
// defaults to combined on 1.3+ so you don't need to set this one
side "combined"
version "1.14.4"
mappings {
/* helper declarations - intermediary/searge are auto added by fabric/forge */
// intermediary()
// searge()
mojmap()
// retroMCP()
// yarn(1)
// parchment("1.19.3", "2022.12.18")
// mcp("stable", "39+1.12")
// these will auto-resolve with the first available from your declared mappings
devNamespace "mojmap"
devFallbackNamespace "intermediary"
}
// specify modloader
/*
fabric {
accessWidener "src/main/resources/whatever.aw"
loader "0.14.18"
// set these ones to target fabric versions without intermediaries
customIntermediaries = true
prodNamespace "official"
devMappings = null
}
*/
/*
forge {
forge "28.2.26"
accessTransformer "src/main/resources/META-INF/accesstransformer.cfg"
mixinConfig "modid.mixins.json"
}
*/
// other options available, see PatchProviders
mods {
// auto-genned, default to `configuration.${sourceSet.name}ModImplementation` (or just modImplementation if main),
// these are additive, so always has at least this configuration
remap(configurations.modImplementation) {
// optional, these are auto-set
namespace "intermediary"
fallbackNamespace "intermediary"
remapAtToLegacy = true // auto set to value in forge provider
mixinRemap("unimined") // default value is none, this value does full mixin remapping for dev... may be necessary for run configs in some envs
remapper {
// tiny remapper settings
}
}
// if you have multiple, and they have the same config,
// use a list of configurations so they can remap together for speed reasons
// the configurations can be different, just the options in remap the same
/*
remap([configurations.a, configurations.b]) {
// stuff
}
*/
}
minecraftRemapper.config {
// tiny remapper settings
}
// this is default value when sourceSet main...
// would bind a remapJar task after jar
remap(jar)
// this one is custom
remap(jar, "customRemap") {
// these can be config'd here, but don't need to be. they can be configured below
}
runs {
// off = true // disable runs
config("client") {
jvmArgs += ["-Dexample.arg=true"]
}
}
}
dependencies {
// these get prepended with the sourceSet name for the mc config
modImplementation "mod:identifier:stuff"
include "mod:identifier:stuff"
modImplementation "other:mod:stuff"
}
remapJar {
// basically don't need to change anything here, but you can do things like set the classifier
}
customRemap {
// extra remap after jar, can be used for second other-mapped output for
// more complicated stuff
prodNamespace "official"
}
```
* stop using artifactural
* rework mcpconfig runner to be more kotlin and less old version of arch-loom code
* Fabric injected interfaces
* Forge JarJar
* Support for launch configs in other dev envs
* vscode
* eclipse
* support to login to minecraft in dev
* support to launch with the prod jar
* add datagen support
* forge datagen
* fabric datagen
* quilt datagen
* fix yarn on neoforge (these will probably be agents, possibly in separate projects and pulled like JarModAgent)
* inject remapper into ASMAPI
* reflection remapper (also for forge potentially, or in general).
* genSources should apply forge source patches (at least on fg3+)

## Recommended Setup
1. take one of the versions from [testing](./testing)
1. remove `includeBuild('../../')` from `settings.gradle`
1. put a proper version number for the plugin in `build.grade`

## Other Setups

### Arch-Loom Style
* direct porting of arch-loom projects without changing the directory structure is possible.
* instructions pending...
### third party template(s)
* arch style: https://github.com/firstdarkdev/fdd-xplat
* //todo: add more
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,12 @@ dependencies {
implementation("net.fabricmc:access-widener:2.1.0")

// at
implementation("net.minecraftforge:accesstransformers:8.0.7") {
implementation("net.neoforged:accesstransformers:9.0.3") {
exclude(group = "org.apache.logging.log4j")
exclude(group = "org.ow2.asm")
}

implementation("org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.4.2") {
compileOnly("org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.4.2") {
isTransitive = false
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ org.gradle.parallel=true

maven_group=xyz.wagyourtail.unimined
archives_base_name=unimined
version=1.0.6
version=1.1.0
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-8.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
11 changes: 10 additions & 1 deletion src/api/kotlin/xyz/wagyourtail/unimined/api/UniminedExtension.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ import kotlin.io.path.createDirectories
val Project.unimined
get() = extensions.getByType(UniminedExtension::class.java)

val Project.uniminedMaybe
get() = extensions.findByType(UniminedExtension::class.java)

/**
* the main entrypoint.
*
Expand Down Expand Up @@ -54,6 +57,9 @@ abstract class UniminedExtension(val project: Project) {
@get:ApiStatus.Internal
abstract val minecrafts: DefaultMap<SourceSet, MinecraftConfig>

@get:ApiStatus.Internal
abstract val minecraftConfiguration: Map<SourceSet, MinecraftConfig.() -> Unit>

/**
* @since 1.0.0
*/
Expand Down Expand Up @@ -135,12 +141,15 @@ abstract class UniminedExtension(val project: Project) {
abstract fun minecraftForgeMaven()
abstract fun fabricMaven()
abstract fun legacyFabricMaven()
abstract fun ornitheMaven()
abstract fun wagYourMaven(name: String)
abstract fun mcphackersIvy()
abstract fun quiltMaven()
@Deprecated("Use glassLauncherMaven(\"babric\") instead", ReplaceWith("glassLauncherMaven(\"babric\")"))
abstract fun babricMaven()
abstract fun glassLauncherMaven(name: String)
abstract fun parchmentMaven()

abstract fun neoForgedMaven()
abstract fun sonatypeStaging()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ open class MappingNamespaceTree {
return _targets
}

override fun equals(other: Any?): Boolean {
if (this === other) return true
if (other !is Namespace) return false

if (name != other.name || named != other.named) return false
return true
}

override fun toString(): String {
return name.lowercase()
}
Expand Down
Loading

0 comments on commit 907c751

Please sign in to comment.