Refactor basebuild / allow apps without Application module

 Refactor basebuild template into "base-build" and "base-application",
 so that base-build does not force creation of a _MODULE_/Application
 directory:

- Rename templates/basebuild to templates/base-build
- Create templates/base-application
- Move templates/base-build/_MODULE_ to
  templates/base-application/_MODULE_
- Update <template> directives in dependent samples

Update Wear template so that it doesn't force creation of a
_MODULE_/Application directory:

 - Remove templates/Wear/_MODULE_

Bug: 18353265
Change-Id: Ie35cc651c49bd7e3f22a6044c352a9acbd17ecf2
diff --git a/media/MediaBrowserService/template-params.xml b/media/MediaBrowserService/template-params.xml
index 8f9b2e6..9c8a11c 100644
--- a/media/MediaBrowserService/template-params.xml
+++ b/media/MediaBrowserService/template-params.xml
@@ -38,7 +38,8 @@
     </strings>
 
     <!-- The basic templates have already been enabled. Uncomment more as desired. -->
-    <template src="basebuild" />
+    <template src="base-build" />
+    <template src="base-application" />
     <metadata>
     <status>PUBLISHED</status>
     <categories>Media</categories>
diff --git a/notification/MessagingService/template-params.xml b/notification/MessagingService/template-params.xml
index e83c845..9a68d74 100644
--- a/notification/MessagingService/template-params.xml
+++ b/notification/MessagingService/template-params.xml
@@ -32,7 +32,8 @@
         </intro>
     </strings>
 
-    <template src="basebuild" />
+    <template src="base-build" />
+    <template src="base-application" />
     <metadata>
         <status>PUBLISHED</status>
         <categories>UI, Notification</categories>
diff --git a/wearable/wear/Flashlight/Application/.gitignore b/wearable/wear/Flashlight/Application/.gitignore
deleted file mode 100644
index 6eb878d..0000000
--- a/wearable/wear/Flashlight/Application/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2013 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-src/template/
-src/common/
-build.gradle
diff --git a/wearable/wear/Flashlight/Application/proguard-project.txt b/wearable/wear/Flashlight/Application/proguard-project.txt
deleted file mode 100644
index 0d8f171..0000000
--- a/wearable/wear/Flashlight/Application/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
- To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/wearable/wear/Flashlight/Application/src/main/AndroidManifest.xml b/wearable/wear/Flashlight/Application/src/main/AndroidManifest.xml
deleted file mode 100644
index 925d11b..0000000
--- a/wearable/wear/Flashlight/Application/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2014 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.wearable.flashlight">
-
-    <uses-sdk android:minSdkVersion="18"
-              android:targetSdkVersion="21" />
-
-    <application android:allowBackup="true"
-        android:icon="@drawable/ic_launcher"
-        android:label="@string/app_name">
-    </application>
-
-</manifest>
-
diff --git a/wearable/wear/Flashlight/Application/src/main/res/drawable-hdpi/ic_launcher.png b/wearable/wear/Flashlight/Application/src/main/res/drawable-hdpi/ic_launcher.png
deleted file mode 100755
index 589f229..0000000
--- a/wearable/wear/Flashlight/Application/src/main/res/drawable-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/wearable/wear/Flashlight/Application/src/main/res/drawable-mdpi/ic_launcher.png b/wearable/wear/Flashlight/Application/src/main/res/drawable-mdpi/ic_launcher.png
deleted file mode 100755
index 77dd571..0000000
--- a/wearable/wear/Flashlight/Application/src/main/res/drawable-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/wearable/wear/Flashlight/Application/src/main/res/drawable-xhdpi/ic_launcher.png b/wearable/wear/Flashlight/Application/src/main/res/drawable-xhdpi/ic_launcher.png
deleted file mode 100755
index fe34ebe..0000000
--- a/wearable/wear/Flashlight/Application/src/main/res/drawable-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/wearable/wear/Flashlight/Application/src/main/res/drawable-xxhdpi/ic_launcher.png b/wearable/wear/Flashlight/Application/src/main/res/drawable-xxhdpi/ic_launcher.png
deleted file mode 100755
index ab80bcd..0000000
--- a/wearable/wear/Flashlight/Application/src/main/res/drawable-xxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/wearable/wear/Flashlight/settings.gradle b/wearable/wear/Flashlight/settings.gradle
index 19d00ac..1d97d30 100644
--- a/wearable/wear/Flashlight/settings.gradle
+++ b/wearable/wear/Flashlight/settings.gradle
@@ -1 +1 @@
-include ':Application', ':Wearable'
+include ':Wearable'
diff --git a/wearable/wear/Flashlight/template-params.xml b/wearable/wear/Flashlight/template-params.xml
index ca47208..d70083a 100644
--- a/wearable/wear/Flashlight/template-params.xml
+++ b/wearable/wear/Flashlight/template-params.xml
@@ -37,8 +37,6 @@
         </intro>
     </strings>
 
-    <template src="base"/>
+    <template src="base-build" />
     <template src="Wear"/>
-    <common src="logger"/>
-    <common src="activities"/>
 </sample>