NickImpact / Impactor

A developer API providing a common interface across minecraft platforms such as forge, fabric, bukkit, and proxy systems
MIT License
7 stars 9 forks source link

1.20.1 Fabric support question #25

Open Artasov opened 2 weeks ago

Artasov commented 2 weeks ago

I tried to use the mod inside my own and I get this error, I'm not good at Java, please help if possible. How i can configurate this?

Error

Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
   > Could not find net.impactdev.impactor.api:economy:5.2.7.
     Searched in the following locations:
       - file:/F:/dev/xlmine-core/.gradle/loom-cache/remapped_mods/net/impactdev/impactor/api/economy/5.2.7/economy-5.2.7.pom
       - file:/C:/Users/xl/.gradle/caches/fabric-loom/minecraftMaven/net/impactdev/impactor/api/economy/5.2.7/economy-5.2.7.pom
       - file:/F:/dev/xlmine-core/.gradle/loom-cache/minecraftMaven/net/impactdev/impactor/api/economy/5.2.7/economy-5.2.7.pom
       - https://maven.fabricmc.net/net/impactdev/impactor/api/economy/5.2.7/economy-5.2.7.pom
       - https://libraries.minecraft.net/net/impactdev/impactor/api/economy/5.2.7/economy-5.2.7.pom
       - https://libraries.minecraft.net/net/impactdev/impactor/api/economy/5.2.7/economy-5.2.7.jar
       - https://repo.maven.apache.org/maven2/net/impactdev/impactor/api/economy/5.2.7/economy-5.2.7.jar
       - https://repo.maven.apache.org/maven2/net/impactdev/impactor/api/economy/5.2.7/economy-5.2.7.pom
       - https://maven.terraformersmc.com/releases/net/impactdev/impactor/api/economy/5.2.7/economy-5.2.7.pom
       - https://maven.wispforest.io/releases/net/impactdev/impactor/api/economy/5.2.7/economy-5.2.7.pom
       - https://maven.impactdev.net/repository/development/net/impactdev/impactor/api/economy/5.2.7/economy-5.2.7.pom
     Required by:
         root project :

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

build.gradle

plugins {
    id 'fabric-loom' version '1.10.5'
    id 'maven-publish'
}

version = project.mod_version
group = project.maven_group

base {
    archivesName = project.archives_base_name
}

repositories {
    maven { url = "https://maven.terraformersmc.com/releases/" }
    maven { url = "https://maven.wispforest.io/releases/" }
    maven { url = "https://maven.impactdev.net/repository/development/" }
    mavenCentral()
}

loom {
    splitEnvironmentSourceSets()

    mods {
        "modid" {
            sourceSet sourceSets.main
            sourceSet sourceSets.client
        }
    }

}

dependencies {
    minecraft "com.mojang:minecraft:${project.minecraft_version}"
    mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
    modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
    modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
    modImplementation "io.wispforest:owo-lib:0.11.2+1.20"
    include "io.wispforest:owo-sentinel:0.11.2+1.20"
    modImplementation("com.squareup.okhttp3:okhttp:4.12.0")
    include("com.squareup.okhttp3:okhttp:4.12.0")
    modImplementation("com.squareup.okio:okio:3.9.1")
    include("com.squareup.okio:okio:3.9.1")

    implementation("net.impactdev.impactor.api:economy:5.2.7")

    modImplementation("com.google.code.gson:gson:2.10")
    include("com.google.code.gson:gson:2.10")
}
processResources {
    inputs.property "version", project.version
    filesMatching("fabric.mod.json") {
        expand "version": inputs.properties.version
    }
}

tasks.withType(JavaCompile).configureEach {
    it.options.release = 17
}

java {
    withSourcesJar()
    sourceCompatibility = JavaVersion.VERSION_17
    targetCompatibility = JavaVersion.VERSION_17
}

jar {
    inputs.property "archivesName", project.base.archivesName
    from("LICENSE") {
        rename { "${it}_${inputs.properties.archivesName}" }
    }
}

publishing {
    publications {
        create("mavenJava", MavenPublication) {
            artifactId = project.archives_base_name
            from components.java
        }
    }
    repositories {
    }
}
NickImpact commented 2 weeks ago

Seems there was an issue with deploying 5.2.7 to the maven repo, and uploads stopped around 5.2.4. You could still realistically pull in 5.2.4 and it'd be compatible with 5.2.7 builds of the economy API.