I have a working app in Android Studio using classpath 'com.android.tools.build:gradle-experimental:0.4.0' and gradle 2.8.
As mentioned in google docs, to include your wearable app with your APK, you need to declare the wear app into the phone app gradle file as dependency something like this:
dependencies {
//other dependencies
//wearApp project(':Wear')
wearApp project(path: ':Wear', configuration: 'google')
}
But I get an error on the line where I include my wear app with the error message:
Gradle sync failed: Gradle DSL method not found: 'wearApp()'
This is because the experimental gradle plugin is not recognizing this command ( this is for standard gradle)...
The question is, What is the command for including Wear app with gradle-experimental:0.4.0 plugin ???
** update
Added this to gradle also:
android.buildTypes {
debug {
debuggable = true
embedMicroApp = true // this should enable the WEAR command, idk...
}
release {
minifyEnabled = false
proguardFiles.add(file('proguard-rules.txt'))
}
}