bndtools / bnd

Bnd/Bndtools. Tooling to build OSGi bundles including Eclipse, Maven, and Gradle plugins.
https://bndtools.org
Other
528 stars 306 forks source link

Gradle example run a task between classes an jar #2055

Closed JohneDoe closed 7 years ago

JohneDoe commented 7 years ago

Hi,

after some hours with gradle i could not find out how to start a task between the classes and jar tasks on each subproject.

Could you give an example? this didnt work!

buildscript {
  repositories {
    maven {
      url 'https://bndtools.ci.cloudbees.com/job/bnd.master/lastSuccessfulBuild/artifact/dist/bundles'
    }
  }
  dependencies {
    classpath 'biz.aQute.bnd:biz.aQute.bnd.gradle:+'
  }
}
apply plugin: 'biz.aQute.bnd.workspace'

subprojects {

  if (plugins.hasPlugin('biz.aQute.bnd')) {
        task doIt {
            println 'done'
        }   

        jar.doFirst {
            tasks.doIt.execute()
        }
    }
}
bjhargrave commented 7 years ago

Usage questions should be asked in the bndtools-users mail list. See https://github.com/bndtools/bnd#feedback.