API crashes even when used only as compile
LostQuasar opened this issue · 10 comments
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
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.
}
}
What IDE are you using? What about if you use gradlew runClient
on the terminal? What's the output of gradlew dependencies
?
Try deleting all vscode related files (should be in .gitignore if you use the fabric-example-mod teemplate) and reload the project.
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
<#119 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACZ3QPEBREI6IQ2H37DWORLU62MI3ANCNFSM5QEVD4UQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>