Skip to content

Commit 2e286c6

Browse files
committed
Change how contexts are merged
1 parent 69f5878 commit 2e286c6

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

server/src/main/java/com/defold/extender/ExtenderUtil.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -566,21 +566,25 @@ private static class PruneMapping {
566566
new PruneMapping("engineJsLibs", "includeJsLibs", "excludeJsLibs"),
567567
new PruneMapping("objectFiles", "includeObjectFiles", "excludeObjectFiles"),
568568
new PruneMapping("dynamicLibs", "includeDynamicLibs", "excludeDynamicLibs"),
569-
new PruneMapping("symbols", "includeSymbols", "excludeSymbols")
569+
new PruneMapping("symbols", "includeSymbols", "excludeSymbols"),
570+
new PruneMapping("jars", "includeJars", "excludeJars"),
571+
new PruneMapping("frameworks", "includeFrameworks", "excludeFrameworks")
570572
);
571573

572574
// Copies the original context, and appends the extra context's elements, if the keys and types are valid
573575
static public Map<String, Object> mergeContexts(Map<String, Object> a, Map<String, Object> b) throws ExtenderException {
574576
Map<String, Object> context = mergeMaps(a, b);
575577

576578
for (PruneMapping mapping : MAPPINGS) {
579+
context.remove(mapping.includeName);
580+
context.remove(mapping.excludeName);
577581
List<String> srcList = ExtenderUtil.getStringList(context, mapping.targetName);
578582
if (srcList.isEmpty())
579583
continue;
580584
context.put(mapping.targetName,
581585
ExtenderUtil.pruneItems(srcList,
582-
ExtenderUtil.getStringList(context, mapping.includeName),
583-
ExtenderUtil.getStringList(context, mapping.excludeName)) );
586+
ExtenderUtil.getStringList(b, mapping.includeName),
587+
ExtenderUtil.getStringList(b, mapping.excludeName)) );
584588
}
585589
return context;
586590
}

0 commit comments

Comments
 (0)