UPDATE AGAINST DUPLICATE QUESTION:
I don't want to use multidex. There should be a solution without it, because the classes used by ":app" don't need this huge library bundle.
I'm currently working on a network project: application server and android client application. I've finished a pre-alpha version of the server and now I want to start coding the android client application.
My idea: I want to include the server git repository as a git submodule in my android project folder so gradle can use it as a dependency for my ':app' project.
BUT: The server repo uses jersey restful classes. So if I include the server gradle project as a dependency, the android build fails with the popular "Unable to execute dex: method ID not in [0, 0xffff]: 65536" error: DEX 65k Problem.
Well, my android client project don't use any class which needs jersey dependencies. There are only a few classes which includes parsing and handling methods for the data given by the server. I've included them in the server repo, so you always have the correct client classes for the actual server structure. If I create a second repo for client classes, they may not synced everytime.
How can I solve this? I thought about splitting the server repo in two gradle modules but the same git repo.
Any ideas??
PS: The 65k Problem: I always include classes in the android client project which have only java-own dependencies. Do the 65k means "available" or "used" methods?