How to add external dependency jar files into build.gradle file?

(Dasthagiri Shaik) #1

I have tried the below mention way but that didn’t work. i have add add nre.jar as a dependency to my build.gradle file. Even after tried the below step, during compilation its gives me an error. please help me on this

dependencies {

compile files(’${System.getenv(“niagara_home”)}/bin/ext/nre.jar’)


(Radim Kubacki) #2

Use double-quotes if you need sting interpolation in Groovy (

(Peter Niederwieser) #3

You need to use double quotes for the outer string, or string interpolation won’t work.

(Dasthagiri Shaik) #4

Thanks Radim Kubacki,Peter Niederwieser

Now my compilation went successfully.

Used below mentioned code:

dependencies {

compile files("${System.getenv(“niagara_home”)}/bin/ext/nre.jar")