Liferay 7 has its own dependencies, the code differs in logic comparatively to Liferay 6. And if you try to do this, it will be a kind of customization, which may turn out to be more expensive and more complex. Therefore, it is better to migrate. If you spend time on migration, then in the future, you will reduce development time, and investment in migration will pay off.