Skip to content

Commit

Permalink
Merge pull request #5263 from bjhargrave/decoration-phase2
Browse files Browse the repository at this point in the history
Decoration phase2
  • Loading branch information
bjhargrave authored May 24, 2022
2 parents 8396d9d + f3aead2 commit 0764a10
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
3 changes: 1 addition & 2 deletions biz.aQute.bndlib/src/aQute/bnd/build/Project.java
Original file line number Diff line number Diff line change
Expand Up @@ -619,8 +619,7 @@ public List<Container> getBundles(Strategy strategyx, String spec, String source
Parameters bundles = parseHeader(spec);
if (source != null) {
Instructions decorator = new Instructions(mergeProperties(source + "+"));
// TODO change the decorated call to remove the second arg.
decorator.decorate(bundles, true);
decorator.decorate(bundles);
decorator = new Instructions(mergeProperties(source + "++"));
decorator.decorate(bundles, true);
}
Expand Down
12 changes: 4 additions & 8 deletions biz.aQute.bndlib/src/aQute/bnd/osgi/Builder.java
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,7 @@ public boolean hasSources() {
@Override
protected Jar getExtra() throws Exception {
Parameters conditionals = getMergedParameters(CONDITIONAL_PACKAGE);
// TODO change the decorated call to remove the second arg.
conditionals.putAll(decorated(CONDITIONALPACKAGE, true));
conditionals.putAll(decorated(CONDITIONALPACKAGE));
if (conditionals.isEmpty())
return null;
logger.debug("do Conditional Package {}", conditionals);
Expand Down Expand Up @@ -629,11 +628,9 @@ private void doExpand(Jar dot) throws Exception {
}

Parameters private_package = getParameters(PRIVATE_PACKAGE);
// TODO change the decorated call to remove the second arg.
Parameters privatepackage = decorated(PRIVATEPACKAGE, true);
Parameters privatepackage = decorated(PRIVATEPACKAGE);
Parameters testpackage = new Parameters();
// TODO change the decorated call to remove the second arg.
Parameters includepackage = decorated(INCLUDEPACKAGE, true);
Parameters includepackage = decorated(INCLUDEPACKAGE);

if (buildInstrs.undertest()) {
String h = mergeProperties(Constants.TESTPACKAGES, "test;presence:=optional");
Expand Down Expand Up @@ -905,8 +902,7 @@ private Instruction matches(Instructions instructions, String pack, Set<Instruct
private void doIncludeResources(Jar jar) throws Exception {
Parameters includes = parseHeader(getProperty("Bundle-Includes"));
if (includes.isEmpty()) {
// TODO change the decorated call to remove the second arg.
includes = decorated(Constants.INCLUDERESOURCE, true);
includes = decorated(Constants.INCLUDERESOURCE);
includes.putAll(getMergedParameters(Constants.INCLUDE_RESOURCE));
} else {
warning("Please use -includeresource instead of Bundle-Includes");
Expand Down
2 changes: 1 addition & 1 deletion cnf/build.bnd
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Bundle-Version: ${base.version}.${tstamp}-SNAPSHOT
"org.osgi.namespace.*";~version=latest;~maven-scope=provided,\
"org.osgi.service.*.annotations";~version=latest;~maven-scope=provided

-conditionalpackage+: \
-conditionalpackage++: \
=!aQute.lib.exceptions.*

-testpath+: \
Expand Down

0 comments on commit 0764a10

Please sign in to comment.