« Return to Thread: Add dependency to javaws (Java Web Start)

Fwd: Add dependency to javaws (Java Web Start)

by Trond Andersen :: Rate this Message:

Reply to Author | View in Thread

Found the error in the build script.

I was adding a repository inside a dependency. It should be:

<pre>
repositories {
  flatDir (name: 'jre library', dirs: java_home)
}

dependencies {
  compile name:'javaws'  
}
</pre>



From: Trond Andersen <trond.andersen@...>
Date: 2009/6/16
Subject: Add dependency to javaws (Java Web Start)
To: user@...


I'm a beginner when it comes to Gradle. I would like to add a providedCompile dependency towards Java Web Start (javaws.jar). Since I didn't find any 'built-in' references to the JDK running Gradle, I tried the following:

<pre>
java_home =System.env['JAVA_HOME'] + '\\jre\\lib'

dependencies {
  flatDir (name: 'jre library', dirs: java_home)

  providedCompile name:'javaws'
}
</pre>

I'm sure that I've got the correct value from System.env, but the flatDir set up doesn't seem to like what I try to do. When I comment the dependency reference and use the following task:

<pre>
task printProps << {
    println java_home
}
</pre>
It definitely prints the correct directory.

Should I use something else than flatDir? If so - what? If flatDir is the way to go, what have I done wrong?

Regards,
Trond Andersen

 « Return to Thread: Add dependency to javaws (Java Web Start)