Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to implement Origins: Classes as a dependency using Jitpack. #70

Open
Clark919 opened this issue Jan 22, 2023 · 5 comments
Open

Comments

@Clark919
Copy link

As the title suggests, implementing a Jitpack repository that points to any recent version of Origins Classes will fail to download the mod as a dependency.

gradle.properties relevant content:

origins_version=v1.6.2
classes_version=v1.4.0

(does not work with 1.4.0 as the parameter either)

build.gradle relevant content:

repositories {
       minecraft "com.mojang:minecraft:${project.minecraft_version}"
       maven {
		name = "Ladysnake Libs"
		url = 'https://ladysnake.jfrog.io/artifactory/mods'
	}
	maven {
		url = 'https://maven.cafeteria.dev'
		content {
			includeGroup 'net.adriantodt.fabricmc'
		}
	}
	maven {
		url "https://maven.jamieswhiteshirt.com/libs-release"
		content {
			includeGroup "com.jamieswhiteshirt"
		}
	}
	maven {
		url "https://jitpack.io"
	}
	maven {
		url "https://maven.shedaniel.me/"
	}
	maven {
		url "https://maven.terraformersmc.com/"
	}
}
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 "com.github.apace100:origins-fabric:${project.origins_version}"
       modImplementation "com.github.apace100:origins-classes:${project.classes_version}"
}

Expected:
Origins: Classes is implemented as an external library for the mod.

Actual:
An error log is produced:

A problem occurred configuring root project 'Project'.
> Could not resolve all dependencies for configuration ':modImplementation'.
   > Could not find com.github.apace100:origins-classes:v1.4.0.
     Searched in the following locations:
       - file:/C:/Users/user/Desktop/Project/.gradle/loom-cache/remapped_mods/com/github/apace100/origins-classes/v1.4.0/origins-classes-v1.4.0.pom
       - https://maven.fabricmc.net/com/github/apace100/origins-classes/v1.4.0/origins-classes-v1.4.0.pom
       - https://libraries.minecraft.net/com/github/apace100/origins-classes/v1.4.0/origins-classes-v1.4.0.pom
       - https://libraries.minecraft.net/com/github/apace100/origins-classes/v1.4.0/origins-classes-v1.4.0.jar
       - https://repo.maven.apache.org/maven2/com/github/apace100/origins-classes/v1.4.0/origins-classes-v1.4.0.pom
       - file:/C:/Users/user/.gradle/caches/fabric-loom/v1.4.0/origins-classes.jar
       - file:/C:/Users/user/Desktop/Project/.gradle/loom-cache/v1.4.0/origins-classes.jar
       - https://ladysnake.jfrog.io/artifactory/mods/com/github/apace100/origins-classes/v1.4.0/origins-classes-v1.4.0.pom
       - https://jitpack.io/com/github/apace100/origins-classes/v1.4.0/origins-classes-v1.4.0.pom
       - https://maven.shedaniel.me/com/github/apace100/origins-classes/v1.4.0/origins-classes-v1.4.0.pom
       - https://maven.terraformersmc.com/com/github/apace100/origins-classes/v1.4.0/origins-classes-v1.4.0.pom
     Required by:
         project :

Jitpack Latest Files (https://jitpack.io/#apace100/origins-classes):
image

Jitpack Build Log (https://jitpack.io/com/github/apace100/origins-classes/v1.4.0/build.log)

I believe I've taken all the necessary steps to implement the mod as a library here. If I've done anything wrong please correct me so I can fix it. Cheers.

@apace100
Copy link
Owner

Hi there!
I hadn't yet added a jitpack.yml file to this repository, which is necessary to allow JitPack to build the source with the proper Java version.
I did this now in this commit: d27b9c9

You should be able to use the short commit hash (d27b9c9) as the version for Origins: Classes in your build.gradle / gradle.properties. Keep in mind doing this the first time requests JitPack to start building that commit, so it will likely time out and then only work on your second or third try.
Let me know if it works so I can close the issue. :)

@Clark919
Copy link
Author

Still unable to download, with the same errors as before (even after multiple attempts to build, this is visible on the Jitpack page also). I have tried both d27b9c9 and d27b9c9d6f42bda93ec5d8e0d01f40e9f48056aa as hashes for the version number.

@apace100
Copy link
Owner

Ah, I see. Origins: Classes seems to reference Origins version 1.6.1, which had the same trouble building on JitPack. I committed a change to depend on 1.6.2 in 8faac98 - could you try that short commit hash as the version now?

@Clark919
Copy link
Author

Still no dice. Is there a specific version of Origins I should be adding as a dependency as well? I'm using v1.6.2 as the current version.

@apace100
Copy link
Owner

I'm really sorry about this!
As a temporary work-around, you can change the following dependency line in your build.gradle:

       modImplementation "com.github.apace100:origins-fabric:${project.origins_version}"

To:

       modImplementation "com.github.eggohito:origins-fabric:${project.origins_version}"

And it should be able to fetch the dependencies then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants