Moved samplegen plugin import statement to individual sample's build.gradle file, for emit* compatibility

Change-Id: I9c957e2edc06100889f643af9e11760cfb6630b4
diff --git a/build.gradle b/build.gradle
index c7e6753..2dd7189 100644
--- a/build.gradle
+++ b/build.gradle
@@ -14,9 +14,6 @@
 * limitations under the License.
 */
 
-// The SampleGenPlugin source is in the buildSrc directory.
-import com.example.android.samples.build.SampleGenPlugin
-apply plugin: SampleGenPlugin
 
 // Add a preflight task that depends on the "refresh" task that gets
 // added by the SampleGenPlugin.
diff --git a/templates/create/build.gradle.ftl b/templates/create/build.gradle.ftl
index e9b54ab..b6bce18 100644
--- a/templates/create/build.gradle.ftl
+++ b/templates/create/build.gradle.ftl
@@ -16,9 +16,12 @@
 -->
 
 // BEGIN_EXCLUDE
-apply from: "${meta.build}/build.gradle"
+import com.example.android.samples.build.SampleGenPlugin
+apply plugin: SampleGenPlugin
+
 samplegen {
   pathToBuild "${meta.build}"
   pathToSamplesCommon "${meta.common}"
 }
+apply from: "${meta.build}/build.gradle"
 // END_EXCLUDE