Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

grepper

Members
  • Joined

  • Last visited

  1. I am wrong. Looks like shadowJar runs on assemble. I will try it.
  2. When does shadowJar run? I thought it runs at the same time the jar task runs, which is before reobfJar. I need it to run after reobfJar.
  3. Hi, I am trying to get HikariCP bundled with my mod as a one fat jar. But there is a problem where HikariCP causes reobfJar to fail with InvalidArgumentException, and I'm not sure why. Here is my gradle code right now (I left out a lot of stuff which I don't think matters): configurations { embed } dependencies { minecraft 'net.minecraftforge:forge:1.16.5-36.1.0' embed group: 'com.zaxxer', name: 'HikariCP', version: '4.0.3' compileOnly group: 'com.ea.async', name: 'ea-async', version: '1.2.3' } jar { from configurations.embed.collect{ it.isDirectory() ? it : zipTree(it) } manifest { attributes([ "Specification-Title": "examplemod", "Specification-Vendor": "examplemodsareus", "Specification-Version": "1", // We are version 1 of ourselves "Implementation-Title": project.name, "Implementation-Version": "${version}", "Implementation-Vendor" :"examplemodsareus", "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") ]) } } jar.finalizedBy('reobfJar') As I understand, this is the current order of events: `jar` task to run, which will bundle all the dependencies marked with `embed`, which will create the fat jar `reobfJar` will run on that fat jar. Would I would like to do instead is this order of events: `jar` task to run, but no fat jar is created at this time. `reobfJar` will run on the output of `jar`. A new task runs, which will take the output of `reobfJar` and combine it with the dependencies marked with `embed` to create the one fat jar I think the code would look something like this: jar { manifest { attributes([ "Specification-Title": "examplemod", "Specification-Vendor": "examplemodsareus", "Specification-Version": "1", // We are version 1 of ourselves "Implementation-Title": project.name, "Implementation-Version": "${version}", "Implementation-Vendor" :"examplemodsareus", "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") ]) } } jar.finalizedBy('reobfJar') task bundle(type: Jar) { manifest { attributes 'Main-Class': 'com.gluecode.fpvdrone.server.Main' } from "build/libs/modid-1.0.jar" from configurations.embed.collect{ it.isDirectory() ? it : zipTree(it) } } The problems I have with the above is: I have to run `./gradlew bundle` after running `./gradlew buildNeeded`. And I'd like to just run 1 command. It doesn't work because it results in an invalid mod jar. I'm am still learning gradle. Can anyone help me?

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.