#Jar-in-Jar

1 messages · Page 1 of 1 (latest)

carmine cypress
#

I would like to embed some dependencies into the .jar, but can't get it to work. I do have jarJar.enable() at the top of the file. Here are my dependencies:

implementation("com.microsoft.signalr:signalr:[7.0,8.1)") {
        jarJar.pin(this, "8.0.1")
    }
    compileOnly("io.reactivex.rxjava3:rxjava:3.1.8")
    compileOnly("org.reactivestreams:reactive-streams:1.0.4")
    runtimeOnly("com.google.code.gson:gson:[1.0,2.11)") {
        jarJar.pin(this, "2.10.1")
    }
    runtimeOnly("com.squareup.okhttp3:okhttp:[3.0,4.13)") {
        jarJar.pin(this, "4.12.0")
    }
    compileOnly("com.squareup.okio:okio:3.7.0")
    compileOnly("com.squareup.okio:okio-jvm:3.7.0")
    compileOnly("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.22")
    runtimeOnly("org.slf4j:slf4j-api:[1.0,2.1)") {
        jarJar.pin(this, "2.0.11")
    }

Any help would be greatly appreciated

sturdy pelicanBOT
#

<@&987246554085740594> please have a look, thanks.

white raptor
#

hmm

#

don't do that?

#

also version ranges in your dependencies are scary

hexed vapor
#

I'm not sure the arg for jarJar.pin is 'this', there is a default 'it'

carmine cypress
carmine cypress
carmine cypress
white raptor
carmine cypress
carmine cypress
hexed vapor
#

Is that how they do version ranges in kotlin build files?

carmine cypress
#

I don't think it's specific to Kotlin

hexed vapor
#

You're specifying a range but trying to pin a particular version?

carmine cypress
#

Yeah, that's what was in the docs. I was desperate and wanted to try it to see if it would work that way

#

The modding docs that is

#

I'm considering switching to maven as it seems to be easier to use

#

Or perhaps I'm misunderstanding how it works

hexed vapor
#

What was the error message.

#

Lead with that.

#

Also groovy gradle build file might be more forgiving.

carmine cypress
hexed vapor
#

good night, sweet prince.