If you want to reuse some of the logic from Project1, you must create the Project3-lib library project. Move your reusable code into this new project and let Project1 and Project2 depend on it.
Here's how you can do it:
settings.gradle
include ':Project3-lib', ':Project1', ':Project2'
In Project1 and Project2 you add your new lib project
dependencies { compile project(':Project3-lib') }
In the top level file gradle.build (so you do not need it in all project build files)
buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.5.6' } }
In the new Project3-lib project, you should use the android-library plugin, not the Android plugin.
apply plugin: 'android-library'
source share