akhikhl / wuff

Gradle plugin for automating assembly of OSGi/Eclipse bundles and applications
MIT License
153 stars 51 forks source link

How to define Eclipse version and mirror? #47

Open nalai opened 9 years ago

nalai commented 9 years ago

I understand that wuff uses unpuzzle to "mavenize" the eclipse dependencies. However, I cannot get it to change the Eclipse version. I copied the definition of eclipse 4.1 from the latest unpuzzle, but it does not evaluate this before build:

unpuzzle {
    selectedEclipseVersion = '4.4.1'

    def suffix_os = [ 'linux': 'linux-gtk', 'macosx': 'macosx-cocoa', 'windows': 'win32' ]
    def suffix_arch = [ 'x86_32': '', 'x86_64': '-x86_64' ]
    def fileExt_os = [ 'linux': 'tar.gz', 'macosx': 'tar.gz', 'windows': 'zip' ]
    def current_os = 'windows'
    def current_arch = 'x86_64'

    eclipseVersion('4.4.1') {
        eclipseMavenGroup = 'eclipse-luna-sr1'
        eclipseMirror = 'http://mirror.netcologne.de'
        eclipseArchiveMirror = 'http://archive.eclipse.org'
        sources {
            source "${eclipseMirror}/eclipse//technology/epp/downloads/release/luna/SR1/eclipse-jee-luna-SR1-${suffix_os[current_os]}${suffix_arch[current_arch]}.${fileExt_os[current_os]}"
            source "${eclipseMirror}/eclipse//eclipse/downloads/drops4/R-4.4.1-201409250400/eclipse-SDK-4.4.1-${suffix_os[current_os]}${suffix_arch[current_arch]}.${fileExt_os[current_os]}", sourcesOnly: true
            source "${eclipseMirror}/eclipse//eclipse/downloads/drops4/R-4.4.1-201409250400/eclipse-4.4.1-delta-pack.zip"
            languagePackTemplate '${eclipseMirror}/eclipse//technology/babel/babel_language_packs/R0.12.0/luna/BabelLanguagePack-eclipse-${language}_4.4.0.v20140623020002.zip'
        }
    }
}

Running gradle build will still use the 4.4 eclipse mirrors and locations. The 4.4 eclipse SDK at the current mirror does not exist. Does anyone have a good workaround or solution?

jksiezni commented 9 years ago

Hi, I've recently found a solution. Paste it to your build.gradle:

wuff {
  selectedEclipseVersion = '4.4.2'

  def suffix_os = [ 'linux': 'linux-gtk', 'macosx': 'macosx-cocoa', 'windows': 'win32' ]
  def suffix_arch = [ 'x86_32': '', 'x86_64': '-x86_64' ]
  def fileExt_os = [ 'linux': 'tar.gz', 'macosx': 'tar.gz', 'windows': 'zip' ]
  def current_os = 'linux'
  def current_arch = 'x86_64'

  eclipseVersion('4.4.2') {
    eclipseMavenGroup = 'eclipse-luna-sr2'
    eclipseMirror = 'http://mirror.netcologne.de'
    eclipseArchiveMirror = 'http://archive.eclipse.org'
    sources {
      source "$eclipseMirror/eclipse//technology/epp/downloads/release/luna/SR2/eclipse-jee-luna-SR2-${suffix_os[current_os]}${suffix_arch[current_arch]}.${fileExt_os[current_os]}"
      //source "$eclipseMirror/eclipse/eclipse/downloads/drops4/R-4.4.1-201409250400/eclipse-SDK-4.4.1-${suffix_os[current_os]}${suffix_arch[current_arch]}.${fileExt_os[current_os]}"
      //source "$eclipseMirror/eclipse/eclipse/downloads/drops4/R-4.4.1-201409250400/eclipse-4.4.1-delta-pack.zip"
      languagePackTemplate '${eclipseMirror}/eclipse//technology/babel/babel_language_packs/R0.12.0/luna/BabelLanguagePack-eclipse-${language}_4.4.1.v20140623020002.zip'
    }
  }
}
nalai commented 9 years ago

Thanks! I will try this out.

mcmil commented 9 years ago

Just for information: I think there is an open pull request with that update https://github.com/akhikhl/wuff/pull/48