Support library gradle improvements

* Define java source compatibility on all build files to avoid
issues that might be caused by compiling with Java8
* Apply the library plugin using the cannonical name
* Define a currentSdkVersion variable instead of embedded string.
We can later load this from a file so that you can checkout
an older branch of support lib and compile it on master and
it won't use master's API by mistake.
This also helps with Android Studio integration.

Bug: 26714403

Change-Id: I0e9f2770b397b761155ac8d4a40fa5fb001264e1
diff --git a/v17/preference-leanback/build.gradle b/v17/preference-leanback/build.gradle
index 0ddcdd2..c72f23c 100644
--- a/v17/preference-leanback/build.gradle
+++ b/v17/preference-leanback/build.gradle
@@ -16,7 +16,7 @@
 
 
 
-apply plugin: 'android-library'
+apply plugin: 'com.android.library'
 
 archivesBaseName = 'preference-leanback-v17'
 
@@ -30,7 +30,7 @@
 }
 
 android {
-    compileSdkVersion 'current'
+    compileSdkVersion project.ext.currentSdk
 
     sourceSets {
         main.manifest.srcFile 'AndroidManifest.xml'