Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
1d7fff6
Analyze jdk classes through reflection instead of asm
Player3324 Sep 20, 2024
ec76ae4
Fix L being dropped from @Shadow's (#154)
IThundxr Oct 26, 2024
0b6875f
Bump version
modmuss50 Oct 26, 2024
c516fb7
Fix: Properly handle arrays when checking if members are owned by mix…
LlamaLad7 Oct 30, 2024
1c69523
Fix: Rework bridge method merging.
LlamaLad7 Nov 24, 2024
3b77b68
Allow `@Desc` to match field instructions
Geolykt Nov 5, 2024
cfe821a
Bump version
Player3324 Nov 24, 2024
26c8d9c
Fix: Pass binary class name from agent to transformer.
LlamaLad7 Jan 23, 2025
7c7eac3
Don't initialize classes in mixin audit
Earthcomputer Jun 17, 2025
0d45574
Fix assuming annotation values were keys (#168)
sschr15 Jun 18, 2025
b205f54
Add new Java versions (#170)
modmuss50 Jun 18, 2025
fe482da
Fix typo.
modmuss50 Jun 18, 2025
5334af3
Fix: Synchronize methods in `MixinTransformer`.
LlamaLad7 Jun 22, 2025
4d0e1df
Update to Gradle 8.14 (#174)
modmuss50 Jul 1, 2025
95a00ed
New Maven Central publishing (#175)
modmuss50 Jul 1, 2025
d628b14
Bump version
modmuss50 Jul 1, 2025
9f04e07
Bump version
modmuss50 Jul 1, 2025
a64ce0d
Populate class nesting information
Player3324 Jul 1, 2025
de008c2
Allow querying whether classes could be transformed by mixin (#176)
lukebemish Jul 26, 2025
c09f394
Bump version
modmuss50 Jul 26, 2025
da71851
Merge pull request #158 from Player3324/reflectClassInfo
LlamaLad7 Jul 27, 2025
da648ea
Fix enum MixinEnvironment.Option parsing always using the default (#157)
Player3324 Jul 27, 2025
baf5b4d
Bump version
Player3324 Jul 27, 2025
129d9d4
fix java8 interface mixin
vfyjxf Aug 16, 2025
03b0312
update code from upstream correctly
vfyjxf Aug 16, 2025
776597b
Merge pull request #182 from vfyjxf/main
LlamaLad7 Aug 23, 2025
c958aaa
Add module version to compiled module-info (#184)
lukebemish Aug 26, 2025
5c563d9
Bump version
modmuss50 Aug 26, 2025
5250ed3
Close resource streams for mixin configs. (#185)
cputnam-a11y Oct 3, 2025
76b38b8
Improvement: Avoid reflection in Bytecode opcode name utils. (#186)
LlamaLad7 Oct 3, 2025
a3cd815
Fix: Respect injection point specifier with shift. (#187)
LlamaLad7 Oct 8, 2025
292070a
Improvement: Avoid ClassInfo lookups wherever possible without changi…
LlamaLad7 Oct 10, 2025
2c6ea18
Fix: Use null as a proper ClassInfo cache value.
LlamaLad7 Oct 10, 2025
9f8bc5f
Improvement: Remove warning for string-targeted public classes.
LlamaLad7 Oct 10, 2025
b0be3b2
Improvement: Check inner class visibility without using ClassInfos.
LlamaLad7 Oct 10, 2025
10af730
Improvement: Only check for final method overrides if `debug.verify` …
LlamaLad7 Oct 10, 2025
41a0ead
Use actual parameter names instead of generic 'argN' names (#191)
zOnlyKroks Dec 22, 2025
7a21799
Bump version
LlamaLad7 Dec 22, 2025
549a0cc
Exclude guava and gson from maven POM as we shade + repackage them.
modmuss50 Dec 26, 2025
f982c2f
Fix: Transform field refs to inner classes
LlamaLad7 Dec 21, 2025
12167db
Refactor: Don't special case synthetic inner classes.
LlamaLad7 Dec 22, 2025
c57fe73
Improvement: Support nested inner classes in Mixins.
LlamaLad7 Dec 22, 2025
33705b8
Fix: Don't use MixinInfo#toString for inner class coordinate generation.
LlamaLad7 Dec 23, 2025
495f177
Improvement: Use deterministic UUIDs for generated inner class names.
LlamaLad7 Dec 28, 2025
481be33
sync upstream
danyadev Mar 3, 2026
3118350
don't exclude guava dep
danyadev Mar 3, 2026
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
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [17-jdk, 21-jdk]
java: [21-jdk]
runs-on: ubuntu-24.04
container:
image: eclipse-temurin:${{ matrix.java }}
options: --user root
steps:
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v2
- uses: gradle/actions/wrapper-validation@v4
- run: ./gradlew build publishToMavenLocal --stacktrace --warning-mode fail
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
options: --user root
steps:
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v2
- uses: gradle/actions/wrapper-validation@v4
- run: ./gradlew build publish --stacktrace
env:
MAVEN_URL: ${{ secrets.MAVEN_URL }}
Expand Down
46 changes: 24 additions & 22 deletions HEADER.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
This file is part of ${name}, licensed under the MIT License (MIT).

Copyright (c) ${organization} <${url}>
Copyright (c) contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
/*
* This file is part of Mixin, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
62 changes: 26 additions & 36 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,28 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin:0.16.1'
classpath 'com.guardsquare:proguard-gradle:' + (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_11) ? '7.5.0' : '7.1.0')
}
}

plugins {
//id "me.modmuss50.remotesign" version "0.4.0"
id "io.github.goooler.shadow" version "8.1.7"
// id "me.modmuss50.remotesign" version "0.5.0"
id "com.gradleup.shadow" version "9.0.0-beta17"
id "dev.lukebemish.central-portal-publishing" version "0.1.7"
}

import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

// Apply plugin
apply plugin: 'java'
apply plugin: 'com.github.hierynomus.license'
apply plugin: 'checkstyle'
apply plugin: 'maven-publish'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'potemkin-modules'

// Default tasks
defaultTasks 'licenseFormat', 'check', 'build'
defaultTasks 'check', 'build'

// Basic project information
group = 'io.github.legacymoddingmc'
Expand Down Expand Up @@ -298,22 +297,13 @@ processResources {
}

// License header formatting
license {
ext {
name = "Mixin"
organization = "SpongePowered"
url = "https://www.spongepowered.org"
}
include '**/*.java'
header file("HEADER.txt")
sourceSets = project.sourceSets
ignoreFailures false
strictCheck true
mapping {
java = 'SLASHSTAR_STYLE'
}
def validateHeaders = tasks.register("validateHeaders", org.spongepowered.asm.mixin.build.ValidateLicenseHeadersTasks) {
header = resources.text.fromFile("HEADER.txt")
source = sourceSets.collect { it.allJava }
}

tasks.check.dependsOn validateHeaders

checkstyle {
configProperties = [
"name" : project.name,
Expand Down Expand Up @@ -353,6 +343,7 @@ project.sourceSets.each { set -> {

compileModularityJava {
inputs.files(modularityInputs)
options.javaModuleVersion = project.version as String
doFirst {
options.compilerArgs = [
'--module-path', classpath.asPath,
Expand Down Expand Up @@ -457,15 +448,23 @@ ext.excludePomDeps = [
'junit',
'mockito-core',
'mixin-asm-debug-all',
'log4j-core'
'log4j-core',
'gson'
]

centralPortalPublishing.bundle('mixin') {
username = ENV.MAVEN_CENTRAL_USERNAME
password = ENV.MAVEN_CENTRAL_PASSWORD
}

tasks.publish.dependsOn tasks.named("publishMixinCentralPortalBundle")

publishing {
publications {
developer(MavenPublication) { publication ->
groupId project.group
artifactId project.base.archivesName.get()
version project.version
groupId = project.group
artifactId = project.base.archivesName.get()
version = project.version

artifact sourceJar
artifact javadocJar
Expand Down Expand Up @@ -547,24 +546,15 @@ publishing {
repositories {
if (ENV.MAVEN_URL) {
maven {
url ENV.MAVEN_URL
url = ENV.MAVEN_URL
credentials {
username ENV.MAVEN_USERNAME
password ENV.MAVEN_PASSWORD
username = ENV.MAVEN_USERNAME
password = ENV.MAVEN_PASSWORD
}
}
}

if (ENV.MAVEN_CENTRAL_URL) {
repositories.maven {
name "central"
url ENV.MAVEN_CENTRAL_URL
credentials {
username ENV.MAVEN_CENTRAL_USERNAME
password ENV.MAVEN_CENTRAL_PASSWORD
}
}
}
centralPortalPublishing.portalBundle(':', 'mixin')
}
}

Expand Down
4 changes: 2 additions & 2 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ plugins {

repositories {
maven {
name 'sponge'
url 'https://repo.spongepowered.org/repository/maven-public'
name = 'sponge'
url = 'https://repo.spongepowered.org/repository/maven-public'
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*
* This file is part of Mixin, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

package org.spongepowered.asm.mixin.build

import org.gradle.api.resources.TextResource
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.SourceTask
import org.gradle.api.tasks.TaskAction

abstract class ValidateLicenseHeadersTasks extends SourceTask {
@Input
TextResource header

@TaskAction
void run() {
def headerStr = header.asString()
def javaSources = getSource().matching(pattern -> pattern.include("**/*.java")).files

def failedFiles = []

for (def source : javaSources) {
if (!source.text.startsWith(headerStr)) {
failedFiles.add(source.name)
logger.warn("File {} does not have the correct license header", source.path)
}
}

if (!failedFiles.isEmpty()) {
throw new RuntimeException("License header validation failed for the following files:\n" +
failedFiles.join("\n"))
}
}
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
10 changes: 6 additions & 4 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public byte[] transform(ClassLoader loader, String className, Class<?> classBein

try {
MixinAgent.log(Level.INFO, "Redefining class {}", className);
return MixinAgent.this.classTransformer.transformClassBytes(null, className, classfileBuffer);
return MixinAgent.this.classTransformer.transformClassBytes(null, className.replace('/', '.'), classfileBuffer);
} catch (Throwable th) {
MixinAgent.log(Level.ERROR, "Error while re-transforming class {}", className, th);
return MixinAgent.ERROR_BYTECODE;
Expand Down
12 changes: 11 additions & 1 deletion src/main/java/org/spongepowered/asm/mixin/FabricUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,20 @@ public final class FabricUtil {
*/
public static final int COMPATIBILITY_0_14_0 = 14000; // 0.14.0+mixin.0.8.6

/**
* Fabric compatibility version 0.16.5
*/
public static final int COMPATIBILITY_0_16_5 = 16005; // 0.16.5+mixin.0.8.7

/**
* Fabric compatibility version 0.17.0
*/
public static final int COMPATIBILITY_0_17_0 = 17000; // 0.17.0+mixin.0.8.7

/**
* Latest compatibility version
*/
public static final int COMPATIBILITY_LATEST = COMPATIBILITY_0_14_0;
public static final int COMPATIBILITY_LATEST = COMPATIBILITY_0_17_0;

public static String getModId(IMixinConfig config) {
return getModId(config, "(unknown)");
Expand Down
Loading