From 6c670639ff3abae7d095004ec05835f432986250 Mon Sep 17 00:00:00 2001 From: stepan Date: Mon, 7 Aug 2023 12:19:37 +0200 Subject: [PATCH] Allow jar distributions in excludes: remove it from excludes when moving it to dependencies internally --- mx.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mx.py b/mx.py index e732a6bd..76e640db 100755 --- a/mx.py +++ b/mx.py @@ -5407,13 +5407,17 @@ def resolveDeps(self): self._resolveDepsHelper(overlaps) self.resolved_overlaps = overlaps self.overlaps = original_overlaps + to_remove = [] for l in self.excludedLibs: if l.isJARDistribution(): warn('"exclude" attribute contains a jar distribution: ' + l.name + '. Adding it to dependencies. Please move the distribution from "exclude" to "distDependencies".', context=self) self.deps += [l] + to_remove += [l] elif not l.isBaseLibrary(): abort('"exclude" attribute can only contain libraries: ' + l.name, context=self) + for l in to_remove: + self.excludedLibs.remove(l) licenseId = self.theLicense if self.theLicense else self.suite.defaultLicense # pylint: disable=access-member-before-definition if licenseId: self.theLicense = get_license(licenseId, context=self)