I want to change an old Android app that is under GPLv3. I will do some refactoring of existing code, add some new functionalities and publish it as commercial app.

What part of code I must publish as public? Only those parts that was in original project?

Can I add new files (java classes, resources, etc.) under other licence and don't publish them even if whole project didn't compile & work without new files?

  • 10
    What you are suggesting is the entire purpose the GPL was created to prevent! Jan 28, 2017 at 23:57

2 Answers 2


Your new app clearly builds on the old GPL code. Without the old GPL code you would have needed more resources to deliver the same app quality. You have extended the old code and you must also publish everything, the unmodified old code and everything you have changed or added under the same GPL license.

You must also acknowledge your app is a GPL project. This is just the way how GPL works.


I wouldn't change a word in Student T's excellent and efficient answer, save that to note that you are only obligated to publish (and, moreover, freely-relicense) your changes if you give or sell copies of your modified software to other people. That is, you incur licence obligations not when you modify the original code, but when you convey copies to others.

In case you want to know why you will then be obligated to publish your changes along with the original code, it's because you will have conveyed modified copies of the original GPLv3 work. GPLv3 s0 says

To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.

and that given, GPLv3 s5 says that when Conveying Modified Source Versions,

You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged.

  • Are there other requirements... e.g. changes documentation? etc? Jan 29, 2017 at 11:57
  • Oh look, a pedagogical comment :-) . As I know you know well, there are indeed other obligations imposed by the GPL; but the OP doesn't ask about those, and in any case, (s)he can follow the link to the licence to find them out.
    – MadHatter
    Jan 29, 2017 at 12:01
  • Good point, my bad. Jan 29, 2017 at 13:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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