use of org.gradle.api.internal.plugins.osgi.OsgiHelper in project gradle by gradle.
the class OsgiPluginConvention method createDefaultOsgiManifest.
private OsgiManifest createDefaultOsgiManifest() {
OsgiManifest osgiManifest = project.getServices().get(Instantiator.class).newInstance(DefaultOsgiManifest.class, project.getFileResolver());
ConventionMapping mapping = ((IConventionAware) osgiManifest).getConventionMapping();
final OsgiHelper osgiHelper = new OsgiHelper();
mapping.map("version", new Callable<Object>() {
public Object call() throws Exception {
return osgiHelper.getVersion(project.getVersion().toString());
}
});
mapping.map("name", new Callable<Object>() {
public Object call() throws Exception {
return project.getConvention().getPlugin(BasePluginConvention.class).getArchivesBaseName();
}
});
mapping.map("symbolicName", new Callable<Object>() {
public Object call() throws Exception {
return osgiHelper.getBundleSymbolicName(project);
}
});
return osgiManifest;
}
Aggregations