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

Issue with MixinGradle #942

Open
verityw opened this issue Jan 22, 2024 · 2 comments
Open

Issue with MixinGradle #942

verityw opened this issue Jan 22, 2024 · 2 comments

Comments

@verityw
Copy link

verityw commented Jan 22, 2024

I am using MineDojo and MineRL. The two of them share a part of the build.gradle code, specifically:

dependencies {
        classpath 'org.ow2.asm:asm:6.0'
        classpath('com.github.SpongePowered:MixinGradle:dcfaf61'){ // 0.6
            // Because forgegradle requires 6.0 (not -debug-all) while mixingradle depends on 5.0
            // and putting mixin right here will place it before forge in the class loader
            exclude group: 'org.ow2.asm', module: 'asm-debug-all'
        }
        classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'
    }

However, when running MineDojo's validate_install.py script or trying to download / build MineRL, it yields:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'Minecraft'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not find com.github.SpongePowered:MixinGradle:dcfaf61.
     Searched in the following locations:
       - https://jitpack.io/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.pom
       - https://jitpack.io/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.jar
       - https://jcenter.bintray.com/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.pom
       - https://jcenter.bintray.com/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.jar
       - https://repo.maven.apache.org/maven2/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.pom
       - https://repo.maven.apache.org/maven2/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.jar
       - https://maven.minecraftforge.net/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.pom
       - https://maven.minecraftforge.net/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.jar
       - https://oss.sonatype.org/content/repositories/snapshots/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.pom
       - https://oss.sonatype.org/content/repositories/snapshots/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.jar
       - https://plugins.gradle.org/m2/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.pom
       - https://plugins.gradle.org/m2/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.jar
     Required by:
         project :

Has the repo for com.github.SpongePowered:MixinGradle:dcfaf61 been changed or something? How can I fix this?

@verityw
Copy link
Author

verityw commented Jan 24, 2024

I found that I had a cached copy of the requisite jar file, which I am hosting on GitHub here: https://github.com/verityw/MixinGradle-dcfaf61

After cloning, in the build.gradle file, add this to the repositories{} section:

maven {
            url 'file:/path/to/that/repo'
        }

Then, change the classpath for MixinGradle to:

classpath('MixinGradle-dcfaf61:MixinGradle:dcfaf61'){ // 0.6
            // Because forgegradle requires 6.0 (not -debug-all) while mixingradle depends on 5.0
            // and putting mixin right here will place it before forge in the class loader
            exclude group: 'org.ow2.asm', module: 'asm-debug-all'
        }

Hopefully the actual URL gets fixed soon though!

@qinglongyu23
Copy link

This one also do the trick with official spongepowerd artifacts
(dcfaf61 seems to equivalent to 0.6-SNAPSHOT)

    repositories {

        maven { url 'https://repo.spongepowered.org/repository/maven-public/' }
    }
    dependencies {

        classpath('org.spongepowered:mixingradle:0.6-SNAPSHOT'){ // 0.6
            // Because forgegradle requires 6.0 (not -debug-all) while mixingradle depends on 5.0
            // and putting mixin right here will place it before forge in the class loader
            exclude group: 'org.ow2.asm', module: 'asm-debug-all'
        }

j3soon added a commit to j3soon/MineDojo that referenced this issue Oct 21, 2024
Error message:

    Starting a Gradle Daemon (subsequent builds will be faster)

    FAILURE: Build failed with an exception.

    * What went wrong:
    A problem occurred configuring root project 'Minecraft'.
    > Could not resolve all artifacts for configuration ':classpath'.
       > Could not find com.github.SpongePowered:MixinGradle:dcfaf61.
         Searched in the following locations:
           - https://jitpack.io/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.pom
           - https://jitpack.io/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.jar
           - https://jcenter.bintray.com/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.pom
           - https://jcenter.bintray.com/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.jar
           - https://repo.maven.apache.org/maven2/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.pom
           - https://repo.maven.apache.org/maven2/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.jar
           - https://maven.minecraftforge.net/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.pom
           - https://maven.minecraftforge.net/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.jar
           - https://oss.sonatype.org/content/repositories/snapshots/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.pom
           - https://oss.sonatype.org/content/repositories/snapshots/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.jar
           - https://plugins.gradle.org/m2/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.pom
           - https://plugins.gradle.org/m2/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.jar
         Required by:
             project :

Reference: microsoft/malmo#942 (comment)
j3soon added a commit to j3soon/MineDojo that referenced this issue Oct 21, 2024
Error message:

    Starting a Gradle Daemon (subsequent builds will be faster)

    FAILURE: Build failed with an exception.

    * What went wrong:
    A problem occurred configuring root project 'Minecraft'.
    > Could not resolve all artifacts for configuration ':classpath'.
       > Could not find com.github.SpongePowered:MixinGradle:dcfaf61.
         Searched in the following locations:
           - https://jitpack.io/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.pom
           - https://jitpack.io/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.jar
           - https://jcenter.bintray.com/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.pom
           - https://jcenter.bintray.com/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.jar
           - https://repo.maven.apache.org/maven2/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.pom
           - https://repo.maven.apache.org/maven2/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.jar
           - https://maven.minecraftforge.net/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.pom
           - https://maven.minecraftforge.net/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.jar
           - https://oss.sonatype.org/content/repositories/snapshots/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.pom
           - https://oss.sonatype.org/content/repositories/snapshots/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.jar
           - https://plugins.gradle.org/m2/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.pom
           - https://plugins.gradle.org/m2/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.jar
         Required by:
             project :

Reference: microsoft/malmo#942 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants