2 ms·
The GPL doesn't "infect" any code. You can write code which clearly calls GPL licensed code and license it under a MIT license. The GPL comes into play when yo
by sparkie 1y ago
The GPL doesn't "infect" any code. You can write code which clearly calls GPL licensed code and license it under a MIT license.
The GPL comes into play when you distribute. If you distribute your MIT licensed code alongside the GPL licensed code, then the aggregate must necessarily be GPL licensed. This doesn't mean your code suddenly becomes GPL code and cannot continue to be licensed under MIT when not distributed as an aggregate. It is perfectly reasonable for someone to take the code, strip out the GPL licensed parts and replace them with MIT licensed alternatives, and license the whole thing as MIT.
Obviously for proprietary software this implies the aggregate must have its source code available in a GPL-compatible form.
But the point here is that you're separating the GPL work from your own code by means of a plugin system. If a plugin depends on GPL code, then the plugin itself must be distributed as GPL - but this does not infect the host program which loads the plugin.
That is, unless it can be reasonably argued that the host program is a derived work of the GPL licensed work. If the program basically does not function without dependency on the GPL licensed work then this might be a reasonable argument - but if the program runs fine, and is only augmented by a GPL licensed plugin, then it is not a derived work.