Jump to content

How do I add github dependencies to build.gradle?


That_Martin_Guy

Recommended Posts

A mod I want to create requires CoFH core, and I see no source download for this. Therefore I go onto their github and try and add the clone command found there to my build.gradle 

dependencies { compile 'https://github.com/CoFH/CoFHCore.git' }

(The code isn't actually all on one line, the formatter was just not happy with me copy pasting it.)

 

I run "gradlew setupDecompWorkspace --refresh-dependencies", followed by gradlew dependencies, but it says lines like

testRuntime - Runtime dependencies for source set 'test'.
\--- https://github.com/CoFH/CoFHCore.git: FAILED

.

 

So instead I use  

compile 'scm:git:git://github.com/CoFH/CoFHCore.git'

which I found in their build.gradle, but it provides a similar result. What am I doing wrong?

Link to comment
Share on other sites

26 minutes ago, diesieben07 said:

You can't add github repositories as a dependency by default. You can use something like https://jitpack.io/ though.

I did find an existing version of CoFH-Core on there, but when I ran gradlew dependencies it showed

testRuntime - Runtime dependencies for source set 'test'.
+--- com.github.CoFH:CoFHCore:a19dbc5eea
|    \--- mezz.jei:jei_1.11.2:4.5.0.+ FAILED

Is this an error on CoFH's part? I don't think 4.5.0.+ is a valid version of JEI (I might be wrong though). Also, I tried adding my own version of JEI, also via jitpack, but JEI doesn't show up in game, and no new files are created in my project directory. Is this intended? Do I still need a jar for viewing the CoFH's source code in my IDE?

Edited by That_Martin_Guy
Link to comment
Share on other sites

So I simply cloned the 1.10.2 branch (since that is the version I'm working on) and moved the src folders to my project. However, I get a ton of errors in IDEA (mostly related to IDEA not recognizing it should compile for java 1.8). If I try to use gradlew runClient with the dependencies in build.gradle it tells me this:

> Could not find mezz.jei:jei_1.10.2:3.14.7.416.
  Searched in the following locations:
      http://files.minecraftforge.net/maven/mezz/jei/jei_1.10.2/3.14.7.416/jei_1.10.2-3.14.7.416.pom
      http://files.minecraftforge.net/maven/mezz/jei/jei_1.10.2/3.14.7.416/jei_1.10.2-3.14.7.416.jar
      https://repo1.maven.org/maven2/mezz/jei/jei_1.10.2/3.14.7.416/jei_1.10.2-3.14.7.416.pom
      https://repo1.maven.org/maven2/mezz/jei/jei_1.10.2/3.14.7.416/jei_1.10.2-3.14.7.416.jar
      https://libraries.minecraft.net/mezz/jei/jei_1.10.2/3.14.7.416/jei_1.10.2-3.14.7.416.pom
      https://libraries.minecraft.net/mezz/jei/jei_1.10.2/3.14.7.416/jei_1.10.2-3.14.7.416.jar
      https://jitpack.io/mezz/jei/jei_1.10.2/3.14.7.416/jei_1.10.2-3.14.7.416.pom
      https://jitpack.io/mezz/jei/jei_1.10.2/3.14.7.416/jei_1.10.2-3.14.7.416.jar
      file:/C:/Users/Axel/.gradle/caches/minecraft/deobfedDeps/mezz/jei/jei_1.10.2/3.14.7.416/jei_1.10.2-3.14.7.416.pom
      file:/C:/Users/Axel/.gradle/caches/minecraft/deobfedDeps/mezz/jei/jei_1.10.2/3.14.7.416/jei_1.10.2-3.14.7.416.jar
      file:/D:/Java Projects/Minecraft Mods/Brighten Up/.gradle/minecraft/jei_1.10.2-3.14.7.416.jar
      file:/D:/Java Projects/Minecraft Mods/Brighten Up/.gradle/minecraft/jei_1.10.2.jar

. If I remove the dependencies from build.gradle the output still gives a ton of errors, mostly it telling me not to use code only available in java 1.7+. What did I do wrong?

Link to comment
Share on other sites

6 hours ago, That_Martin_Guy said:

I did find an existing version of CoFH-Core on there, but when I ran gradlew dependencies it showed


testRuntime - Runtime dependencies for source set 'test'.
+--- com.github.CoFH:CoFHCore:a19dbc5eea
|    \--- mezz.jei:jei_1.11.2:4.5.0.+ FAILED

Is this an error on CoFH's part? I don't think 4.5.0.+ is a valid version of JEI (I might be wrong though). Also, I tried adding my own version of JEI, also via jitpack, but JEI doesn't show up in game, and no new files are created in my project directory. Is this intended? Do I still need a jar for viewing the CoFH's source code in my IDE?

 

You need add the dependency repositories used by CoFH to your build.gradle file manually, JitPack doesn't seem to handle that automatically.

 

Basically, copy the repositories from the repositories section of CoFHCore's build.gradle file into the repositories section of your build.gradle file. Use the repositories sections in the main body, not in the buildscript section.

 

I also had to add the universal classifier to the CoFHCore dependency, e.g. deobfCompile 'com.github.CoFH:CoFHCore:f60b7b70fe:universal'.

Edited by Choonster

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I was just trying to play my modded world when i randomly got this crash for no reason. I sorted through like every mod and eventually I realized it was LLibrary but I can't seem to find a solution to fix the crashing. I can't lose the world that I have that uses this mod please help me. Here's the report: https://pastebin.com/0D00B79i If anyone has a solution please let me know.  
    • 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑   Daftar Slot Ligawin88 adalah bocoran slot rekomendasi gacor dari Ligawin88 yang bisa anda temukan di SLOT Ligawin88. Situs SLOT Ligawin88 hari ini yang kami bagikan di sini adalah yang terbaik dan bersiaplah untuk mengalami sensasi tak terlupakan dalam permainan slot online. Temukan game SLOT Ligawin88 terbaik dengan 100 pilihan provider ternama yang dipercaya akan memberikan kepuasan dan kemenangan hari ini untuk meraih x500. RTP SLOT Ligawin88 merupakan SLOT Ligawin88 hari ini yang telah menjadi pilihan utama bagi pemain judi online di seluruh Indonesia. Setiap harinya jutaan pemain memasuki dunia maya untuk memperoleh hiburan seru dan kemenangan besar dalam bermain slot dengan adanya bocoran RTP SLOT Ligawin88. Tidak ada yang lebih menyenangkan daripada mengungguli mesin slot dan meraih jackpot x500 yang menggiurkan di situs SLOT Ligawin88 hari ini yang telah disediakan SLOT Ligawin88. Menangkan jackpot besar x500 rajanya maxwin dari segala slot dan raih kemenangan spektakuler di situs Ligawin88 terbaik 2024 adalah tempat yang menyediakan mesin slot dengan peluang kemenangan lebih tinggi daripada situs slot lainnya. Bagi anda yang mencari pengalaman judi slot paling seru dan mendebarkan, situs bo SLOT Ligawin88 terbaik 2024 adalah pilihan yang tepat. Jelajahi dunia slot online melalui situs SLOT Ligawin88 di link SLOT Ligawin88.
    • 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑   Daftar Slot Asusslot adalah bocoran slot rekomendasi gacor dari Asusslot yang bisa anda temukan di SLOT Asusslot. Situs SLOT Asusslot hari ini yang kami bagikan di sini adalah yang terbaik dan bersiaplah untuk mengalami sensasi tak terlupakan dalam permainan slot online. Temukan game SLOT Asusslot terbaik dengan 100 pilihan provider ternama yang dipercaya akan memberikan kepuasan dan kemenangan hari ini untuk meraih x500. RTP SLOT Asusslot merupakan SLOT Asusslot hari ini yang telah menjadi pilihan utama bagi pemain judi online di seluruh Indonesia. Setiap harinya jutaan pemain memasuki dunia maya untuk memperoleh hiburan seru dan kemenangan besar dalam bermain slot dengan adanya bocoran RTP SLOT Asusslot. Tidak ada yang lebih menyenangkan daripada mengungguli mesin slot dan meraih jackpot x500 yang menggiurkan di situs SLOT Asusslot hari ini yang telah disediakan SLOT Asusslot. Menangkan jackpot besar x500 rajanya maxwin dari segala slot dan raih kemenangan spektakuler di situs Asusslot terbaik 2024 adalah tempat yang menyediakan mesin slot dengan peluang kemenangan lebih tinggi daripada situs slot lainnya. Bagi anda yang mencari pengalaman judi slot paling seru dan mendebarkan, situs bo SLOT Asusslot terbaik 2024 adalah pilihan yang tepat. Jelajahi dunia slot online melalui situs SLOT Asusslot di link SLOT Asusslot.
    • 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 Daftar Slot Galeri555 adalah bocoran slot rekomendasi gacor dari Galeri555 yang bisa anda temukan di SLOT Galeri555. Situs SLOT Galeri555 hari ini yang kami bagikan di sini adalah yang terbaik dan bersiaplah untuk mengalami sensasi tak terlupakan dalam permainan slot online. Temukan game SLOT Galeri555 terbaik dengan 100 pilihan provider ternama yang dipercaya akan memberikan kepuasan dan kemenangan hari ini untuk meraih x500. RTP SLOT Galeri555 merupakan SLOT Galeri555 hari ini yang telah menjadi pilihan utama bagi pemain judi online di seluruh Indonesia. Setiap harinya jutaan pemain memasuki dunia maya untuk memperoleh hiburan seru dan kemenangan besar dalam bermain slot dengan adanya bocoran RTP SLOT Galeri555. Tidak ada yang lebih menyenangkan daripada mengungguli mesin slot dan meraih jackpot x500 yang menggiurkan di situs SLOT Galeri555 hari ini yang telah disediakan SLOT Galeri555. Menangkan jackpot besar x500 rajanya maxwin dari segala slot dan raih kemenangan spektakuler di situs Galeri555 terbaik 2024 adalah tempat yang menyediakan mesin slot dengan peluang kemenangan lebih tinggi daripada situs slot lainnya. Bagi anda yang mencari pengalaman judi slot paling seru dan mendebarkan, situs bo SLOT Galeri555 terbaik 2024 adalah pilihan yang tepat. Jelajahi dunia slot online melalui situs SLOT Galeri555 di link SLOT Galeri555.
    • 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 Daftar Slot Kocok303 adalah bocoran slot rekomendasi gacor dari Kocok303 yang bisa anda temukan di SLOT Kocok303. Situs SLOT Kocok303 hari ini yang kami bagikan di sini adalah yang terbaik dan bersiaplah untuk mengalami sensasi tak terlupakan dalam permainan slot online. Temukan game SLOT Kocok303 terbaik dengan 100 pilihan provider ternama yang dipercaya akan memberikan kepuasan dan kemenangan hari ini untuk meraih x500. RTP SLOT Kocok303 merupakan SLOT Kocok303 hari ini yang telah menjadi pilihan utama bagi pemain judi online di seluruh Indonesia. Setiap harinya jutaan pemain memasuki dunia maya untuk memperoleh hiburan seru dan kemenangan besar dalam bermain slot dengan adanya bocoran RTP SLOT Kocok303. Tidak ada yang lebih menyenangkan daripada mengungguli mesin slot dan meraih jackpot x500 yang menggiurkan di situs SLOT Kocok303 hari ini yang telah disediakan SLOT Kocok303. Menangkan jackpot besar x500 rajanya maxwin dari segala slot dan raih kemenangan spektakuler di situs Kocok303 terbaik 2024 adalah tempat yang menyediakan mesin slot dengan peluang kemenangan lebih tinggi daripada situs slot lainnya. Bagi anda yang mencari pengalaman judi slot paling seru dan mendebarkan, situs bo SLOT Kocok303 terbaik 2024 adalah pilihan yang tepat. Jelajahi dunia slot online melalui situs SLOT Kocok303 di link SLOT Kocok303.
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.