
Corelib Importing doesn't work
awesomeshot5051 opened this issue ยท 10 comments
Bug description
I use your core library for my mod. I try to import it using this repository:
maven { url = 'https://maven.maxhenkel.de/repository/public' }
and this dependancy:
jarJar(implementation("de.maxhenkel.corelib:corelib:${minecraft_version}-${corelib_version}")) {
compileOnly "de.maxhenkel.corelib:corelib:${minecraft_version}-${corelib_version}:javadoc"
// implementation 'net.neoforged:JarJarSelector:0.4.2'
}
When I try to load the gradle script, it throws:
Execution failed for task ':createClientLaunchScript'.
Error while evaluating property 'runtimeClasspath' of task ':createClientLaunchScript'.
Failed to calculate the value of task ':createClientLaunchScript' property 'runtimeClasspath'.
> Could not resolve all files for configuration ':runtimeClasspath'.
> Could not find de.maxhenkel.corelib:corelib:1.21.4-2.1.5.
Searched in the following locations:
- https://maven.neoforged.net/releases/de/maxhenkel/corelib/corelib/1.21.4-2.1.5/corelib-1.21.4-2.1.5.pom
- file:/C:/Users/Admin/.m2/repository/de/maxhenkel/corelib/corelib/1.21.4-2.1.5/corelib-1.21.4-2.1.5.pom
- https://maven.maxhenkel.de/repository/public/de/maxhenkel/corelib/corelib/1.21.4-2.1.5/corelib-1.21.4-2.1.5.pom
- https://maven.blamejared.com/de/maxhenkel/corelib/corelib/1.21.4-2.1.5/corelib-1.21.4-2.1.5.pom
- https://modmaven.dev/de/maxhenkel/corelib/corelib/1.21.4-2.1.5/corelib-1.21.4-2.1.5.pom
- https://maven.tterrag.com/de/maxhenkel/corelib/corelib/1.21.4-2.1.5/corelib-1.21.4-2.1.5.pom
- https://mvnrepository.com/artifact/net.neoforged/JarJarSelector/de/maxhenkel/corelib/corelib/1.21.4-2.1.5/corelib-1.21.4-2.1.5.pom
- https://maven.k-4u.nl/de/maxhenkel/corelib/corelib/1.21.4-2.1.5/corelib-1.21.4-2.1.5.pom
- file:/D:/MCreatorWorkspaces/plantFarms/repo/de/maxhenkel/corelib/corelib/1.21.4-2.1.5/corelib-1.21.4-2.1.5.pom
Required by:
project :
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
Minecraft version
1.21.4
Mod version
1.21.4-2.1.5
Mod loader and version
Neoforge 21.4.97
Steps to reproduce
Setup ModDevGradle like normal
set the repository as maven { url = 'https://maven.maxhenkel.de/repository/public' }
and dependency as
jarJar(implementation("de.maxhenkel.corelib:corelib:${minecraft_version}-${corelib_version}")) {
compileOnly "de.maxhenkel.corelib:corelib:${minecraft_version}-${corelib_version}:javadoc"
// implementation 'net.neoforged:JarJarSelector:0.4.2'
}
Crash
Expected behavior
Successful import of the corelib file.
Log files
https://gist.github.com/awesomeshot5051/ce62f760d4d5f129dce2f752d0059f97
Screenshots
No response
I can't open an issue over on the corelib repo because it wants a template but there are no templates.
This issue tracker is just for bugs with the mod itself, not with the build system.
I understand it's meant for the mod itself and not the build system. As I said before, the core lib repository issue system is broken because it wants a template to open an issue, but no templates are provided. If I open an issue it automatically closes it and marks it as invalid. Either make the issue system work for the core lib or I can just fork the repository and use my own gradle system.
The corelib is not yet uploaded to maven, as it isn't fully updated to 1.21.4. You are not meant to compile the mod yourself. Download it from curseforge or modrinth.
I don't compile the mod myself. I use your core library for my own mod. The core library is not available on curseforge or modrinth.
This library is not meant to be used in other mods. Its license is "All Rights Reserved" which would not allow you to publish your mod if you'd include it.
Corelib
A library containing shared code for all of my mods.
Usage
This library should be packed into the mods jar file. Here is an example using shadow:
build.gradle
plugins {
id 'com.github.johnrengelman.shadow' version '8.1.1'
}
// ...
repositories {
maven {
name = "henkelmax.public"
url = 'https://maven.maxhenkel.de/repository/public'
}
// ...
}
// ...
dependencies {
// ...
shadow fg.deobf("de.maxhenkel.corelib:corelib:${minecraft_version}-${corelib_version}:api")
runtimeOnly fg.deobf("de.maxhenkel.corelib:corelib:${minecraft_version}-${corelib_version}")
runtimeOnly fg.deobf("de.maxhenkel.corelib:corelib:${minecraft_version}-${corelib_version}:javadoc")
}
// ...
shadowJar {
configurations = [project.configurations.shadow]
archiveClassifier = ''
relocate 'de.maxhenkel.corelib', "de.maxhenkel.${mod_id}.corelib"
}
shadowJar.dependsOn('reobfJar')
reobf {
shadowJar {}
}
It is very important to relocate the corelib package, to avoid conflicts with other mods using this library.
Then don't explain how to include it in a mod. That's misleading.
You must post the license on your GitHub.
There is no indication that it is "All Rights Reserved", so that is untrue.
You also publicly explain how to compile the core library in another mod, so obviously you just don't want to deal with the problem.
I will just fork the Library and expand on it myself, as well as store it in my own Gradle. Sorry for bothering you.
On that note, no one can access the corelib when they use my mod. It's contained within the mod itself and obfuscated.