Skip to content

JiJ ignores classifier #306

Description

@USS-Shenzhou

(Not sure if this repo is the right place to report it.)

I wrote this in my build.gradle:

    compileOnly(group: "dev.onvoid.webrtc", name: "webrtc-java", version: "0.14.0")
    additionalRuntimeClasspath(group: "dev.onvoid.webrtc", name: "webrtc-java", version: "0.14.0")
    jarJar(group: "dev.onvoid.webrtc", name: "webrtc-java", version: "0.14.0")

    implementation group: "dev.onvoid.webrtc", name: "webrtc-java", version: "0.14.0", classifier: "windows-x86_64"
    additionalRuntimeClasspath group: "dev.onvoid.webrtc", name: "webrtc-java", version: "0.14.0", classifier: "windows-x86_64"
    jarJar(group: "dev.onvoid.webrtc", name: "webrtc-java", version: "0.14.0", classifier: "windows-x86_64")

And JiJ does not consider the classifier when packing jar, so 2 jars get the same identifier in metada.json:

    {
      "identifier": {
        "group": "dev.onvoid.webrtc",
        "artifact": "webrtc-java"
      },
      "version": {
        "range": "[0.14.0,)",
        "artifactVersion": "0.14.0"
      },
      "path": "META-INF/jarjar/webrtc-java-0.14.0.jar",
      "isObfuscated": false
    },
    {
      "identifier": {
        "group": "dev.onvoid.webrtc",
        "artifact": "webrtc-java"
      },
      "version": {
        "range": "[0.14.0,)",
        "artifactVersion": "0.14.0"
      },
      "path": "META-INF/jarjar/webrtc-java-0.14.0-windows-x86_64.jar",
      "isObfuscated": false
    },

So FML only recognizes the latter one:

[23:58:03] [main/INFO]: Found gamelibrary file "mixinextras-neoforge-0.5.0.jar" [parent: neoforge-21.8.51-universal.jar, locator: jarinjar, reader: mod manifest]
[23:58:03] [main/INFO]: Found library file "webrtc-java-0.14.0-windows-x86_64.jar" [parent: channel-0.1.0.jar, locator: jarinjar]
[23:58:03] [main/INFO]: Found library file "net.neoforged.neoforge-coremods-21.8.51.jar" [parent: neoforge-21.8.51-universal.jar, locator: jarinjar, reader: mod manifest]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions