So there's this app which is licensed under GPL-3.0 and there is a piece of code in that application that I like to use.

My app is not by any way a copy/modification of the this app. Since the two apps are completely different I don't feel like it's a derivative work...

But I heard that "if you include a library that is licensed GPL then you must license your own program GPL" and that's why I don't know if I know must license my app as GPL-3.0 or not

I read on GPL-3.0 but just got more confused...

Note: the code I want to use is 20 or so lines of code, I don't know if that helps...

I want to make my app and release it as MIT on GitHub can I???

1 Answer 1


tl;dr: you must release your code under the GPL.

What is a derivative work is defined by copyright law. Assuming the 20 lines of code are non-trivial1, then they are entitled to copyright protection in their own right, and therefore the GPL applies to them. That means the terms of the GPL apply and if you use them you must release your whole app under the GPL.

1. if they are trivial - e.g. a list of the integers 1 to 20 - then why are you copying it?

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.