jacoco & gradle

72 views
Skip to first unread message

Bryan Hunt

unread,
Sep 16, 2015, 11:51:24 AM9/16/15
to bndtool...@googlegroups.com
Does anyone have an example of a bndtools gradle build using jacoco?

Bryan

Carsten Gräf

unread,
Sep 17, 2015, 5:25:16 AM9/17/15
to bndtools-users
It's a bit huge and there's a lot of files, but you could check this repository:

  https://github.com/evandor/skysail-framework

and specifically this bundle:

  https://github.com/evandor/skysail-framework/tree/master/skysail.server.app.todos, with its build.gradle file.

gradle build should do the trick.

Hope that helps,
Carsten

BJ Hargrave

unread,
Sep 17, 2015, 6:24:26 AM9/17/15
to bndtool...@googlegroups.com
Yes, I tried that build.gradle file in a project in the bnd build and it worked fine. So it is easy to add jacoco to a bnd gradle build.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 

BJ



Bryan Hunt

unread,
Sep 17, 2015, 12:10:46 PM9/17/15
to bndtool...@googlegroups.com
Thanks for the pointer to that project.  I got it working just as you had.  I also got it working by changing the top level build.gradle as follows:

/* Configure the subprojects */
subprojects {
  apply plugin: "jacoco"

  repositories {
      mavenCentral()
  }

  jacoco {
      toolVersion = "0.7.1.201405082137"
  }

  def bndProject = bndWorkspace.getProject(name)
  if (bndProject != null) {
    plugins.apply 'biz.aQute.bnd'
  }
}

I believe this may be a bit easier since jacoco will then be enabled for all bundles.  Am I missing something?  Still learning gradle.

Bryan

Ferry Huberts

unread,
Sep 21, 2015, 12:42:35 PM9/21/15
to bndtool...@googlegroups.com
Yes, my plugin integrates gradle, jacoco and findbugs using the official
bnd gradle plugin.

2.4.x: https://marketplace.eclipse.org/content/bndtools-plugins-pelagic-0
master: https://marketplace.eclipse.org/content/bndtools-plugins-pelagic

3.x: (coming soon)
Reply all
Reply to author
Forward
0 new messages