akhikhl / wuff

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

Allow more fine grained control over automatically added dependencies #28

Open tschulte opened 10 years ago

tschulte commented 10 years ago

Currently I am trying to get a JavaFX-based RCP application to run. See https://github.com/tschulte/contacts-griffon.

This project is a copy of the contacts demo of e(fx)clipse and I just added the gradle build file. As you can see, I needed to do a lot of stuff to at least get it running, though it still does not run completely.

I had to exclude a lot of dependencies (trial and error), that are automatically added by Wuff:

configurations {
    compileOnly
    all {
        exclude module: 'org.apache.batik.css'
        exclude module: 'org.apache.batik.util'
        exclude module: 'org.apache.batik.util.gui'
        exclude module: 'org.eclipse.ant.core'
        exclude module: 'org.eclipse.core.filesystem.linux.x86_64'
        exclude module: 'org.eclipse.core.net'
        exclude module: 'org.eclipse.core.net.linux.x86_64'
        exclude module: 'org.eclipse.core.runtime.compatibility.registry'
        exclude module: 'org.eclipse.core.variables'
        exclude module: 'org.eclipse.e4.ui.bindings'
        exclude module: 'org.eclipse.e4.ui.css.core'
        exclude module: 'org.eclipse.e4.ui.css.swt'
        exclude module: 'org.eclipse.e4.ui.css.swt.theme'
        exclude module: 'org.eclipse.e4.ui.widgets'
        exclude module: 'org.eclipse.e4.ui.workbench3'
        exclude module: 'org.eclipse.e4.ui.workbench.addons.swt'
        exclude module: 'org.eclipse.e4.ui.workbench.renderers.swt'
        exclude module: 'org.eclipse.e4.ui.workbench.swt'
        exclude module: 'org.eclipse.equinox.bidi'
        exclude module: 'org.eclipse.equinox.launcher.gtk.linux.x86_64'
        exclude module: 'org.eclipse.equinox.security'
        exclude module: 'org.eclipse.help'
        exclude module: 'org.eclipse.jface'
        exclude module: 'org.eclipse.jface.databinding'
        exclude module: 'org.eclipse.osgi.compatibility.state'
        exclude module: 'org.eclipse.swt'
        exclude module: 'org.eclipse.swt.gtk.linux.x86_64'
        exclude module: 'org.eclipse.ui'
        exclude module: 'org.eclipse.ui.views'
        exclude module: 'org.eclipse.ui.workbench'
        exclude module: 'org.w3c.css.sac'
        exclude module: 'org.w3c.dom.events'
        exclude module: 'org.w3c.dom.smil'
        exclude module: 'org.w3c.dom.svg'
    }
}

This should not be necessary.

mcmil commented 10 years ago

I think at the moment you can manually define dependencies, like such:

subprojects {
    dependencies {
        compile "$eclipseMavenGroup:com.ibm.icu:+"
        compile "$eclipseMavenGroup:javax.annotation:+"
        compile "$eclipseMavenGroup:org.eclipse.core.contenttype:+"
        compile "$eclipseMavenGroup:org.eclipse.core.databinding:+"
        compile "$eclipseMavenGroup:org.eclipse.core.databinding.beans:+"
...

There is a lot of them, but it pretty much does the job. Maybe there is a way to define some kind of BOM like feature (or Features from Eclipse RCP) to ease the dependency management.

aalmiray commented 10 years ago

Keep an eye on https://github.com/spring-gradle-plugins/dependency-management-plugin as it brings BOM like capabilities to gradle builds. Perhaps wuff can reuse the code or depend on this plugin.