Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Thanks. That gave me an idea: always try to download URL, but keep a copy just in case. In build.gradle I changed this:

buildscript { apply from: "https://github.com/rosjava/rosjava_bootstrap/raw/indigo/buildscript.gradle"
}
To this: buildscript { def f = new File("buildscript.gradle") try{ new URL("https://github.com/rosjava/rosjava_bootstrap/raw/indigo/buildscript.gradle").withInputStream{ i -> f.withOutputStream{ it << i }}
} catch (all) { //do nothing, keep cached script } apply from: "buildscript.gradle" }

Thanks. That gave me an idea: always try to download URL, but keep a copy just in case. In build.gradle I changed this:


buildscript {
{ 
  apply from: "https://github.com/rosjava/rosjava_bootstrap/raw/indigo/buildscript.gradle" 
}

To this: this:


buildscript {
    def f = new File("buildscript.gradle")
File("buildscript.gradle") 
 try{
try{ 
    new URL("https://github.com/rosjava/rosjava_bootstrap/raw/indigo/buildscript.gradle").withInputStream{ i -> f.withOutputStream{ it << i }} 
} catch (all) { { //do nothing, keep cached script script } } apply from: "buildscript.gradle" "buildscript.gradle" }

So I keep a local copy, but if available, downloads from internet.