Marzouk
Marzouk

Reputation: 2714

How to work with multiple android projects that tends to one apk

I working on using the clean architecture for android applications.

I used MVP design pattern and I want to separate each layer in a separate project that at least tend to one application.

For now I have a Data layer, Domain layer, Presentation layer.

I need to create project for each one: Presentation uses Domain and Domain uses Data.

This would be very easy in .Net by adding a reference for the needed project in the other one.

I don't know how to do this in Android?

Also, i searched a lot before i asked here and i found some not clean answers.

This example having the separation that i want? so how can i achive some thing like that?

Upvotes: 0

Views: 75

Answers (1)

Ant Kennedy
Ant Kennedy

Reputation: 1240

You can do exactly the same in gradle as you can with .Net by creating a multi project build - https://docs.gradle.org/current/userguide/multi_project_builds.html

have a look at this blog post for a worked example - http://www.petrikainulainen.net/programming/gradle/getting-started-with-gradle-creating-a-multi-project-build/

Upvotes: 1

Related Questions