@Test public void addsAnOsgiManifestToEachJar() { osgiPlugin.apply(project, new PluginRegistry(), null); Task task = project.getTasks().getByName(JavaPlugin.JAR_TASK_NAME); assertThat(task.property("osgi"), is(OsgiManifest.class)); task = project.getTasks().add("otherJar", Jar.class); assertThat(task.property("osgi"), is(OsgiManifest.class)); }
/** * Returns the {@link Image} identified by the given key, or <code>null</code> if it does not * exist. */ public static Image getImage(String key) { return OsgiPlugin.getDefault().getImageRegistry().get(key); }
static { try { ICON_BASE_URL = new URL(OsgiPlugin.getDefault().getBundle().getEntry("/"), ICON_PATH_PREFIX); } catch (MalformedURLException e) { } }
@Test public void appliesTheJavaPlugin() { osgiPlugin.apply(project, new PluginRegistry(), null); assertTrue(project.getAppliedPlugins().contains(JavaPlugin.class)); }