florensie / ExpandAbility

Minecraft library mod that provides increased control over vanilla effects and abilities
MIT License
4 stars 4 forks source link

Problems when adding expandability as a dependency #5

Closed Kuikenpower closed 5 months ago

Kuikenpower commented 1 year ago

So I added expandability to my minecraft mod, but when I reload my gradle I get this error:

Could not find be.florens:expandability-forge:7.0.0_mapped_official_1.19.2. Searched in the following locations:

  • file:/C:/Users/julia/.gradle/caches/forge_gradle/bundeled_repo/be/florens/expandability-forge/7.0.0_mapped_official_1.19.2/expandability-forge-7.0.0_mapped_official_1.19.2.pom
  • file:/C:/Users/julia/.gradle/caches/forge_gradle/bundeled_repo/be/florens/expandability-forge/7.0.0_mapped_official_1.19.2/expandability-forge-7.0.0_mapped_official_1.19.2.jar

This is my build.gradle:

buildscript {
    repositories {
        maven { url = 'https://maven.minecraftforge.net/' }
        mavenCentral()
    }
    dependencies {
        classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
        classpath 'org.spongepowered:mixingradle:0.7.+'
    }
}

plugins {
    id 'eclipse'
    id 'maven-publish'
}

apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'org.spongepowered.mixin'

mixin {
    add sourceSets.main, "artifacts.refmap.json"
}

version = '1.19.2-5.0.1'
group = 'com.kuikenpower.falidsmp'
archivesBaseName = 'falidsmp'

java.toolchain.languageVersion = JavaLanguageVersion.of(17)

println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
minecraft {
    mappings channel: 'official', version: '1.19.2'

    runs {
        client {
            workingDirectory project.file('run')
            property 'forge.logging.markers', ''
            property 'forge.logging.console.level', 'debug'

            mods {
                falidsmp {
                    source sourceSets.main
                }
            }
        }

        server {
            workingDirectory project.file('run')
            property 'forge.logging.markers', ''
            property 'forge.logging.console.level', 'debug'

            mods {
                falidsmp {
                    source sourceSets.main
                }
            }
        }

        data {
            workingDirectory project.file('run')
            property 'forge.logging.markers', ''
            property 'forge.logging.console.level', 'debug'
            args '--mod', 'artifacts', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
            environment 'target', 'fmluserdevdata'

            mods {
                falidsmp {
                    source sourceSets.main
                }
            }
        }
    }
}

sourceSets.main.resources {
    srcDir 'src/generated/resources'
}

repositories {
    maven {
        name "expandability"
        url "https://maven.florens.be/releases"
    }
    maven { url 'https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/' }
}

jarJar.enable()

dependencies {
    minecraft 'net.minecraftforge:forge:1.19.2-43.1.1'

    //runtimeOnly fg.deobf("curse.maven:curious-armor-stands-398784:3579775")

    // runtimeOnly fg.deobf("curse.maven:creeper-overhaul-561625:3676158")
    // runtimeOnly fg.deobf("curse.maven:geckolib-388172:3930007")
    implementation fg.deobf('software.bernie.geckolib:geckolib-forge-1.19:3.1.37')

    implementation fg.deobf("be.florens:expandability-forge:7.0.0")
    jarJar "be.florens:expandability-forge:[7.0,8.0)"
}

mixin {
    add sourceSets.main, 'mixins.artifacts.refmap.json'
    config 'mixins.artifacts.json'
}

tasks.jarJar.configure {
    classifier ''
}

jar {
    manifest {
        attributes([
            "Specification-Title": "Falidsmp",
            "Specification-Vendor": "kuikenpower",
            "Specification-Version": "1",
            "Implementation-Title": project.name,
            "Implementation-Version": "${version}",
            "Implementation-Vendor": "kuikenpower",
            "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
        ])
    }
}

reobf { jarJar { } }

jar.finalizedBy('reobfJar')

publishing {
    publications {
        mavenJava(MavenPublication) {
            artifact jar
        }
    }
    repositories {
        maven {
            url "file:///${project.projectDir}/mcmodsrepo"
        }
    }
}
Kuikenpower commented 1 year ago

I got a more detailed error: https://pastebin.com/ntGKsYXW

florensie commented 1 year ago

Can you try adding Jitpack to your repositories?

maven {
    url = "https://jitpack.io/"
    content {
        includeGroupByRegex "com.github.*"
    }
}

Add it as the last repository, so it has the lowest priority, Jitpack can sometimes conflict with other repositories.

Kuikenpower commented 1 year ago

Can you try adding Jitpack to your repositories?

maven {
    url = "https://jitpack.io/"
    content {
        includeGroupByRegex "com.github.*"
    }
}

Add it as the last repository, so it has the lowest priority, Jitpack can sometimes conflict with other repositories.

This works, thanks

florensie commented 1 year ago

It's required by MixinExtras, I'll have to add it to the readme.

florensie commented 5 months ago

MixinExtras is on Maven Central these days, so I guess it's no longer an issue.