Jump to content

Recommended Posts

Posted

Maven or not matters only for the jar being packed inside, and there is a built-in workaround for non-maven jars.

Look at the "Dependency extraction" section.

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Posted
  On 9/6/2018 at 3:19 AM, DaemonUmbra said:

Maven or not matters only for the jar being packed inside, and there is a built-in workaround for non-maven jars.

Look at the "Dependency extraction" section.

Expand  

but I'm confused about "META-INF" I do not know what it is and I do not have that folder for the location

Posted

It is a folder for meta files (files that contain information about the jar itself), these are built by the tool that packages the jar.

https://docs.gradle.org/current/userguide/java_plugin.html#example_customization_of_manifest_mf

 

In this case though you will want to create the folder yourself, however do nothing more than create /META-INF/libraries/ and put your dependency jar into it.

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Posted

What I linked is instructions for how to have Gradle add Manifest Attributes, this includes ContainedDeps.

What is shown in the example on that page goes in your build.gradle

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Posted
  On 9/6/2018 at 3:47 AM, DaemonUmbra said:

What I linked is instructions for how to have Gradle add Manifest Attributes, this includes ContainedDeps.

What is shown in the example on that page goes in your build.gradle

Expand  

I found that, should it work?

 

configurations {
    embed
    compile.extendsFrom embed
}

dependencies {
    embed 'club.minnced:java-discord-rpc:v2.0.1'
}

task generateMetaFiles {
    doLast {
        file("${buildDir}/dependencyMeta/").deleteDir()
        configurations.embed.resolvedConfiguration.resolvedArtifacts.each {
            def metaFile = file("${buildDir}/dependencyMeta/${it.file.name}.meta")
            metaFile.parentFile.mkdirs()
            def artifactRef = it.moduleVersion.toString()
            if (it.classifier != null) {
                artifactRef += ":${it.classifier}"
            }
            metaFile.text = "Maven-Artifact: $artifactRef"
        }
    }
}

jar {
    into('/') {
        from configurations.embed
        from "${buildDir}/dependencyMeta/"
    }
    manifest {
        attributes 'ContainedDeps': configurations.embed.collect { it.name }.join(' ')
    }
    dependsOn generateMetaFiles
}

 

Posted
  On 9/6/2018 at 3:47 AM, DaemonUmbra said:

What I linked is instructions for how to have Gradle add Manifest Attributes, this includes ContainedDeps.

What is shown in the example on that page goes in your build.gradle

Expand  

Another thing, said it was easier, but then you can with shadow? as? or what do I do wrong?, really that late in understanding it (shadow) I think it would be easier

Posted

I have yet to see you use either method correctly and for some reason you appear to want to automate/complicate the painfully simple process of using Forge's Jar-in-Jar system.

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Posted

I believe this could be accomplished with Shadow, however the Forge system allows archiving it so it can be extracted once and only once.

 

I see now why you were automating the meta files while my test worked without, and I feel stupid.

Seems my test relied on backwards compatibility, oops.

 

Continuing to work on my test (even though it works i don't want to get in the habit of relying on old methods).

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Posted

Then can you tell me what is my problem with shadow ?, I really think I like it better

  On 9/6/2018 at 4:55 AM, DaemonUmbra said:

I believe this could be accomplished with Shadow, however the Forge system allows archiving it so it can be extracted once and only once.

 

I see now why you were automating the meta files while my test worked without, and I feel stupid.

Seems my test relied on backwards compatibility, oops.

 

Continuing to work on my test (even though it works i don't want to get in the habit of relying on old methods).

Expand  

 

Posted
  On 9/6/2018 at 4:55 AM, DaemonUmbra said:

I believe this could be accomplished with Shadow, however the Forge system allows archiving it so it can be extracted once and only once.

 

I see now why you were automating the meta files while my test worked without, and I feel stupid.

Seems my test relied on backwards compatibility, oops.

 

Continuing to work on my test (even though it works i don't want to get in the habit of relying on old methods).

Expand  

Please, I would like to be able to solve this

Posted

If you want to rely on the legacy system you can use Jar-in-Jar without a "Maven-Artifact" property, though from a code comment "Maven-Artifact" is likely to be required in Forge for 1.13.

This means that you can do this without doing anything with meta files FOR NOW.

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Posted

Because Forge's system is superior to just shoving your dependency inside your jar, Forge's system does things to prevent collisions between packed dependencies, as well as archiving them so they only need to be extracted once.

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Posted

I am talking about Forge's Jar-in-Jar system, NOT shadow...

The mod you linked uses shadow, not Forge's Jar-in-Jar system

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Posted

Because you are not building it correctly and you are still using 1.8.X

I will help you further when i see your repo updated to a modern version.

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Posted

Not according to GitHub

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

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



×
×
  • Create New...

Important Information

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