Let's say I need a piece of functionality and there is a library on GitHub, licensed under Apache 2.0, that provides that funcionality.
There are a couple of use cases that can occur that I would prefer to just copy-paste a certain part of the library instead of the whole thing:
It is written for Eclipse, and I am using Android Studio and I don't want to go through the trouble to convert it to a gradle project, so I want to just copy the meat of the project and paste it into a new package/module in my project
The library provides more functionality than needed and I only need a part of it.
I want to heavily customize the library.
What is the general rule in these cases? Can I just copy the files I need? Should I mention the author in the code? Should I add a reference to the library in the final product?