The simplest way is to make MyProject a multi project with the Logger project as a subproject.
settings.gradle in MyProject directory:
include ":logger"
project(":logger").projectDir = file("../logger")
In the build.gradle of MyProject you can now reference this lib as a project:
dependencies {
compile 'com.android.support:gridlayout-v7:18.0.0'
compile 'com.android.support:appcompat-v7:18.0.0'
compile project(":logger")
}