I have contributed to a GPL library and I am using that library in my project as a module. Do I have to make my entire project open source or, as I have contributed to the library and the source code is available, is it fine not to make the project open source?

I read Using a GPL V3 library in a Android app published on Google Play, do I need to release the application's source code? but any advice will be helpful. I am not the main developer of the project, just a contributer in the project

  • 1
    If you can work out an alternative arrangement with the main developer then you might be able to, but otherwise no, you have to obey the license just like everyone else. Commented Aug 20, 2018 at 22:10
  • @curiousdannii that seems to me to be all that can really be said. If you wrote that as the answer, I'd upvote it.
    – MadHatter
    Commented Aug 21, 2018 at 5:43

1 Answer 1


This is a simple question of copyright. You have written some code - you can use that code however you wish, and you decided to contribute that to a GPL library. That doesn't change any of your rights to that specific bit of code, which you can still continue to use as you wish.

However, the same applies to other people as well - they have written code, and the only right you have to use their code is under the terms by which it is made available to you - or in this case, the GPL. "Contributing" to the library does not (cannot) change the terms under which other people contributed to that library. To take this to extremes, let's reverse the situation:

  1. You have written millions of lines of code in a library, and kindly decide to release it under the GPL.
  2. You accept a one line pull request from me to fix a minor typo in the comment.

Now I've "contributed" to the library, would you be happy for me to take your millions of lines of code and use them without having to comply with the terms of the GPL? No? Well, that's exactly what you're asking for here...

So to answer your specific question:

Do I have to make my entire project open source

Assuming you are using some code from the library other than the code you wrote, you are using code for which your only right to use them is under the GPL, you must comply with the terms of the GPL, which in non-technical terms means making the full source code available.

If you are using only code which you contributed to the library, then you still own the copyright to that code and can use it however you wish.

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.