If you make something that is to be used by something with a restrictive license (but not actually included in your work) can your work still have any license?

This question asks about restrictive licensed software being included in a GPL project. It got me thinking, any code you create is your own and you can license it anyway you want, correct? It doesn't matter if your code is intended to be used with something else with an incompatible license. For example Junit's license isn't GPL compatible, but if you make code to be used by Junit, it still can be licensed anyway you want. Is this correct?

1 Answer 1


This kind of discussion arises with plugins too: can I license a plugin under the GPL if it's designed to work with something GPL-incompatible, even including close source?

IMO what matters is distribution, so I'd have no problem with such a situation as long as they two components are distributed separately.

There are benefits to open sourcing the code even in such a situation. It would allow others to contribute improvements to the code. It would allow the plugin to be ported for another app, perhaps one that is FLOSS licensed. And it would allow parts of the code to be extracted and used in other apps.

  • What do you mean by distribution? You mean as long as a user receives products with incompatible licenses separately (not bundled together or from the same source) the user wouldn't be in violation by using them together? Jun 16, 2016 at 7:05
  • FLOSS licenses don't cover use at all (except to say that use is unrestricted) - they cover sharing and distribution. If the two products are obtained by the end user from two different places then I think it would be completely fine. If they get it from one source but with two downloads, then it's more complicated, and I'm not sure if such a situation would be legally clear. The licenses try to be clear, but there's still a lot of interpretation involved. Jun 16, 2016 at 7:09
  • If you license your plugin under something like the GPL though, while you are free to do so, a proprietary program might not be able to integrate your plugin if doing so would make it effectively "one program" (that's a point of the GPL open to interpretation, but it would probably make some proprietary developers stay away from your code)
    – Tim Malone
    Jun 16, 2016 at 7:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.