If I use a library that I wrote and licensed under the MIT License in another open source project, do I need to include the library's license file?

softwareengineering.stackexchange https://softwareengineering.stackexchange.com/questions/310903

  •  12-12-2020
  •  | 
  •  

Question

Consider the following situation:

I am working on project foo, and write some code that I think will have a generalized use in the future. I separate this code into a small library, and release it separately under MIT. Do I now need to credit the library in foo, even though the code was written in foo first? Assume foo is also licensed under MIT.

Was it helpful?

Solution

Do I now need to credit the library in foo

No. You do not need to credit the library.

Why?

Because you stated:

and [I] write some code that I think will have a generalized use in the future

Because you wrote the code and presumably own the copyright to said code, you're free to do what you'd like with your own code.

Said a different way, the copyright owner is allowed to determine the license in which the code is released, if at all. Effectively, you're re-licensing your code for the other project.


Also note the assumption behind that statement - namely, that you own the copyright to the code. Which you do since it's your code unless you've explicitly assigned those rights to the project itself. It's not uncommon for projects to require contributors to assign copyright to the project, but you'd know that ahead of time because it's an explicit agreement that you have to agree to.

Licensed under: CC-BY-SA with attribution
scroll top