Is it possible to have the same package namespace as the app?

I'm trying to refactor my app so that it uses a package, and I'm trying to move a lot of the code from the app to the package but dont want to rename all files and namespaces.

What is the best way to achieve this?