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

    • ladangtoto situs resmi ladangtoto situs terpercaya 2024   Temukan situs resmi dan terpercaya untuk tahun 2024 di LadangToto! Dengan layanan terbaik dan keamanan yang terjamin, LadangToto adalah pilihan utama untuk penggemar judi online. Daftar sekarang untuk mengakses berbagai jenis permainan taruhan, termasuk togel, kasino, dan banyak lagi. Jelajahi sensasi taruhan yang tak terlupakan dan raih kesempatan besar untuk meraih kemenangan di tahun ini dengan LadangToto!" [[jumpuri:❱❱❱❱❱ DAFTAR DI SINI ❰❰❰❰❰ > https://w303.pink/orochimaru]] [[jumpuri:❱❱❱❱❱ DAFTAR DI SINI ❰❰❰❰❰ > https://w303.pink/orochimaru]]
    • WINNING303 DAFTAR SITUS JUDI SLOT RESMI TERPERCAYA 2024 Temukan situs judi slot resmi dan terpercaya untuk tahun 2024 di Winning303! Daftar sekarang untuk mengakses pengalaman berjudi slot yang aman dan terjamin. Dengan layanan terbaik dan reputasi yang kokoh, Winning303 adalah pilihan terbaik bagi para penggemar judi slot. Jelajahi berbagai pilihan permainan dan raih kesempatan besar untuk meraih kemenangan di tahun ini dengan Winning303 [[jumpuri:❱❱❱❱❱ DAFTAR DI SINI ❰❰❰❰❰ > https://w303.pink/orochimaru]] [[jumpuri:❱❱❱❱❱ DAFTAR DI SINI ❰❰❰❰❰ > https://w303.pink/orochimaru]]
    • SLOT PULSA TANPA POTONGAN : SLOT PULSA 5000 VIA INDOSAT IM3 TANPA POTONGAN - SLOT PULSA XL TELKOMSEL TANPA POTONGAN  KLIK DISINI DAFTAR DISINI SLOT VVIP << KLIK DISINI DAFTAR DISINI SLOT VVIP << KLIK DISINI DAFTAR DISINI SLOT VVIP << KLIK DISINI DAFTAR DISINI SLOT VVIP << SITUS SLOT GACOR 88 MAXWIN X500 HARI INI TERBAIK DAN TERPERCAYA GAMPANG MENANG Dunia Game gacor terus bertambah besar seiring berjalannya waktu, dan sudah tentu dunia itu terus berkembang serta merta bersamaan dengan berkembangnya SLOT GACOR sebagai website number #1 yang pernah ada dan tidak pernah mengecewakan sekalipun. Dengan banyaknya member yang sudah mempercayakan untuk terus menghasilkan uang bersama dengan SLOT GACOR pastinya mereka sudah percaya untuk bermain Game online bersama dengan kami dengan banyaknya testimoni yang sudah membuktikan betapa seringnya member mendapatkan jackpot besar yang bisa mencapai ratusan juta rupiah. Best online Game website that give you more money everyday, itu lah slogan yang tepat untuk bermain bersama SLOT GACOR yang sudah pasti menang setiap harinya dan bisa menjadikan bandar ini sebagai patokan untuk mendapatkan penghasilan tambahan yang efisien dan juga sesuatu hal yang fix setiap hari nya. Kami juga mendapatkan julukan sebagai Number #1 website bocor yang berarti terus memberikan member uang asli dan jackpot setiap hari nya, tidak lupa bocor itu juga bisa diartikan dalam bentuk berbagi promosi untuk para official member yang terus setia bermain bersama dengan kami. Berbagai provider Game terus bertambah banyak setiap harinya dan terus melakukan support untuk membuat para official member terus bisa menang dan terus maxwin dalam bentuk apapun maka itu langsung untuk feel free to try yourself, play with SLOT GACOR now or never !
    • BRI4D adalah pilihan tepat bagi Anda yang menginginkan pengalaman bermain slot dengan RTP tinggi dan transaksi yang akurat melalui Bank BRI. Berikut adalah beberapa alasan mengapa Anda harus memilih BRI4D: Tingkat Pengembalian (RTP) Tertinggi Kami bangga menjadi salah satu agen situs slot dengan RTP tertinggi, mencapai 99%! Ini berarti Anda memiliki peluang lebih besar untuk meraih kemenangan dalam setiap putaran permainan. Transaksi Melalui Bank BRI yang Akurat Proses deposit dan penarikan dana di BRI4D cepat, mudah, dan akurat. Kami menyediakan layanan transaksi melalui Bank BRI untuk kenyamanan Anda. Dengan begitu, Anda dapat melakukan transaksi dengan lancar dan tanpa khawatir. Beragam Pilihan Permainan BRI4D menyajikan koleksi permainan slot yang beragam dan menarik dari berbagai provider terkemuka. Mulai dari tema klasik hingga yang paling modern, Anda akan menemukan banyak pilihan permainan yang sesuai dengan selera dan preferensi Anda.  
    • SPARTA88 adalah pilihan tepat bagi Anda yang menginginkan agen situs slot terbaik dengan RTP tinggi dan transaksi yang mudah melalui Bank BNI. Berikut adalah beberapa alasan mengapa Anda harus memilih SPARTA88: Tingkat Pengembalian (RTP) Tinggi Kami bangga menjadi salah satu agen situs slot dengan RTP tertinggi, mencapai 98%! Ini berarti Anda memiliki peluang lebih besar untuk meraih kemenangan dalam setiap putaran permainan. Beragam Pilihan Permainan SPARTA88 menyajikan koleksi permainan slot yang beragam dan menarik dari berbagai provider terkemuka. Mulai dari tema klasik hingga yang paling modern, Anda akan menemukan banyak pilihan permainan yang sesuai dengan selera dan preferensi Anda. Kemudahan Bertransaksi Melalui Bank BNI Proses deposit dan penarikan dana di SPARTA88 cepat, mudah, dan aman. Kami menyediakan layanan transaksi melalui Bank BNI untuk kenyamanan Anda. Dengan begitu, Anda dapat melakukan transaksi dengan lancar tanpa perlu khawatir.
  • Topics

×
×
  • Create New...

Important Information

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