Skip to content

Commit

Permalink
Allow jar distributions in excludes: remove it from excludes when mov…
Browse files Browse the repository at this point in the history
…ing it to dependencies internally
  • Loading branch information
steve-s committed Aug 7, 2023
1 parent 6ec8e53 commit 6c67063
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mx.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6c67063

Please sign in to comment.