newly created apps / plugins should use latest gradle dependencies (#22790)

This commit is contained in:
Sebastian Roth
2018-10-19 03:56:18 +08:00
committed by Stanislav Baranov
parent 086cfcb133
commit 751c083f7d
49 changed files with 56 additions and 56 deletions

View File

@@ -8,7 +8,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.android.tools.build:gradle:3.2.1'
}
}

View File

@@ -2,14 +2,14 @@ group '{{androidIdentifier}}'
version '1.0-SNAPSHOT'
buildscript {
ext.kotlin_version = '1.2.30'
ext.kotlin_version = '1.2.71'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.android.tools.build:gradle:3.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
@@ -40,5 +40,5 @@ android {
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}

View File

@@ -1,22 +1,22 @@
package {{androidIdentifier}}
import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel
import io.flutter.plugin.common.MethodChannel.MethodCallHandler
import io.flutter.plugin.common.MethodChannel.Result
import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.PluginRegistry.Registrar
class {{pluginClass}}(): MethodCallHandler {
class {{pluginClass}}: MethodCallHandler {
companion object {
@JvmStatic
fun registerWith(registrar: Registrar): Unit {
fun registerWith(registrar: Registrar) {
val channel = MethodChannel(registrar.messenger(), "{{projectName}}")
channel.setMethodCallHandler({{pluginClass}}())
}
}
override fun onMethodCall(call: MethodCall, result: Result): Unit {
if (call.method.equals("getPlatformVersion")) {
override fun onMethodCall(call: MethodCall, result: Result) {
if (call.method == "getPlatformVersion") {
result.success("Android ${android.os.Build.VERSION.RELEASE}")
} else {
result.notImplemented()