badasintended / wthit

what the hell is that?
https://docs.bai.lol/wthit
Other
123 stars 20 forks source link

API crashes even when used only as compile #119

Closed LostQuasar closed 2 years ago

LostQuasar commented 2 years ago

Crash:

Caused by: mcp.mobius.waila.api.__internal__.ApiJarInRuntimeException: ONLY USE WTHIT API JAR AS A COMPILE ONLY DEPENDENCY

Import:

    modCompileOnly "mcp.mobius.waila:wthit-api:fabric-${wthit_version}"
    modRuntimeOnly "mcp.mobius.waila:wthit:fabric-${wthit_version}"

Version: 4.7.3

deirn commented 2 years ago

Can you post your full build.gradle?

LostQuasar commented 2 years ago
plugins {
    id 'fabric-loom' version '0.11-SNAPSHOT'
    id 'maven-publish'
}

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

archivesBaseName = project.archives_base_name
version = project.mod_version+ "+" +project.minecraft_version
group = project.maven_group

repositories { 
    jcenter() 
    maven {
        url = uri("https://storage.googleapis.com/devan-maven/")
    }
    maven { url "https://maven.bai.lol" }
}

dependencies {
    minecraft "com.mojang:minecraft:${minecraft_version}"
    mappings "net.fabricmc:yarn:${yarn_mappings}:v2"
    modImplementation "net.fabricmc:fabric-loader:${loader_version}"
    modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_version}"

    modImplementation "net.devtech:arrp:${arrp_version}"
    include "net.devtech:arrp:${arrp_version}"

    modCompileOnly "mcp.mobius.waila:wthit-api:fabric-${wthit_version}"
    modRuntimeOnly "mcp.mobius.waila:wthit:fabric-${wthit_version}"
  }

processResources {
    inputs.property "version", project.version

    filesMatching("fabric.mod.json") {
        expand "version": project.version
    }
}

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

java {
    // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
    // if it is present.
    // If you remove this line, sources will not be generated.
    withSourcesJar()
}

jar {
    from("LICENSE") {
        rename { "${it}_${project.archivesBaseName}"}
    }
}

// configure the maven publication
publishing {
    publications {
        mavenJava(MavenPublication) {
            // add all the jars that should be included when publishing to maven
            artifact(remapJar) {
                builtBy remapJar
            }
            artifact(sourcesJar) {
                builtBy remapSourcesJar
            }
        }
    }

    // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
    repositories {
        // Add repositories to publish to here.
        // Notice: This block does NOT have the same function as the block in the top level.
        // The repositories here will be used for publishing your artifact, not for
        // retrieving dependencies.
    }
}
deirn commented 2 years ago

What IDE are you using? What about if you use gradlew runClient on the terminal? What's the output of gradlew dependencies?

LostQuasar commented 2 years ago

huh gradlew runClient works

deirn commented 2 years ago

Hmm your IDE might be messing with the classpath. What IDE is that?

LostQuasar commented 2 years ago

VSCodium

deirn commented 2 years ago

Try running gradlew vscode and see if it fixes it.

LostQuasar commented 2 years ago

no luck

deirn commented 2 years ago

Try deleting all vscode related files (should be in .gitignore if you use the fabric-example-mod teemplate) and reload the project.

LostQuasar commented 2 years ago

Will do

On Mon, Mar 7, 2022, 7:19 PM deirn @.***> wrote:

Try deleting all vscode related files (should be in .gitignore if you use the fabric-example-mod teemplate) and reload the project.

— Reply to this email directly, view it on GitHub https://github.com/badasintended/wthit/issues/119#issuecomment-1061275049, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZ3QPEBREI6IQ2H37DWORLU62MI3ANCNFSM5QEVD4UQ . You are receiving this because you authored the thread.Message ID: @.***>