Unverified Commit 0a96f96c authored by Mikkel Nygaard Ravn's avatar Mikkel Nygaard Ravn Committed by GitHub

Update and simplify Android templates (#13970)

parent 86c6ce99
...@@ -15,8 +15,7 @@ apply plugin: 'com.android.application' ...@@ -15,8 +15,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android { android {
compileSdkVersion 26 compileSdkVersion 27
buildToolsVersion '26.0.3'
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
...@@ -24,7 +23,7 @@ android { ...@@ -24,7 +23,7 @@ android {
defaultConfig { defaultConfig {
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 26 targetSdkVersion 27
versionCode 1 versionCode 1
versionName "0.0.1" versionName "0.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
......
...@@ -15,8 +15,7 @@ apply plugin: 'com.android.application' ...@@ -15,8 +15,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android { android {
compileSdkVersion 26 compileSdkVersion 27
buildToolsVersion '26.0.3'
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
...@@ -24,7 +23,7 @@ android { ...@@ -24,7 +23,7 @@ android {
defaultConfig { defaultConfig {
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 26 targetSdkVersion 27
versionCode 1 versionCode 1
versionName "0.0.1" versionName "0.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
......
...@@ -15,8 +15,7 @@ apply plugin: 'com.android.application' ...@@ -15,8 +15,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android { android {
compileSdkVersion 26 compileSdkVersion 27
buildToolsVersion '26.0.3'
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
...@@ -24,7 +23,7 @@ android { ...@@ -24,7 +23,7 @@ android {
defaultConfig { defaultConfig {
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 26 targetSdkVersion 27
versionCode 1 versionCode 1
versionName "0.0.1" versionName "0.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
......
...@@ -15,8 +15,7 @@ apply plugin: 'com.android.application' ...@@ -15,8 +15,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android { android {
compileSdkVersion 26 compileSdkVersion 27
buildToolsVersion '26.0.3'
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
...@@ -25,7 +24,7 @@ android { ...@@ -25,7 +24,7 @@ android {
defaultConfig { defaultConfig {
applicationId "io.flutter.externalui" applicationId "io.flutter.externalui"
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 26 targetSdkVersion 27
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
......
...@@ -15,8 +15,7 @@ apply plugin: 'com.android.application' ...@@ -15,8 +15,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android { android {
compileSdkVersion 26 compileSdkVersion 27
buildToolsVersion '26.0.3'
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
...@@ -25,7 +24,7 @@ android { ...@@ -25,7 +24,7 @@ android {
defaultConfig { defaultConfig {
applicationId "com.yourcompany.flavors" applicationId "com.yourcompany.flavors"
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 26 targetSdkVersion 27
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
......
...@@ -15,8 +15,7 @@ apply plugin: 'com.android.application' ...@@ -15,8 +15,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android { android {
compileSdkVersion 26 compileSdkVersion 27
buildToolsVersion '26.0.3'
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
...@@ -24,7 +23,7 @@ android { ...@@ -24,7 +23,7 @@ android {
defaultConfig { defaultConfig {
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 26 targetSdkVersion 27
versionCode 1 versionCode 1
versionName "0.0.1" versionName "0.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
......
...@@ -15,8 +15,7 @@ apply plugin: 'com.android.application' ...@@ -15,8 +15,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android { android {
compileSdkVersion 26 compileSdkVersion 27
buildToolsVersion '26.0.3'
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
...@@ -24,7 +23,7 @@ android { ...@@ -24,7 +23,7 @@ android {
defaultConfig { defaultConfig {
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 26 targetSdkVersion 27
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
......
...@@ -15,8 +15,7 @@ apply plugin: 'com.android.application' ...@@ -15,8 +15,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android { android {
compileSdkVersion 26 compileSdkVersion 27
buildToolsVersion '26.0.3'
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
...@@ -26,7 +25,7 @@ android { ...@@ -26,7 +25,7 @@ android {
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
applicationId "io.flutter.examples.manual_tests" applicationId "io.flutter.examples.manual_tests"
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 26 targetSdkVersion 27
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
} }
......
...@@ -15,8 +15,7 @@ apply plugin: 'com.android.application' ...@@ -15,8 +15,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android { android {
compileSdkVersion 26 compileSdkVersion 27
buildToolsVersion '26.0.3'
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
...@@ -25,7 +24,7 @@ android { ...@@ -25,7 +24,7 @@ android {
defaultConfig { defaultConfig {
applicationId "io.flutter.examples.catalog" applicationId "io.flutter.examples.catalog"
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 26 targetSdkVersion 27
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
......
...@@ -15,8 +15,7 @@ apply plugin: 'com.android.application' ...@@ -15,8 +15,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android { android {
compileSdkVersion 26 compileSdkVersion 27
buildToolsVersion '26.0.3'
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
...@@ -25,7 +24,7 @@ android { ...@@ -25,7 +24,7 @@ android {
defaultConfig { defaultConfig {
applicationId "io.flutter.examples.gallery" applicationId "io.flutter.examples.gallery"
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 26 targetSdkVersion 27
versionCode 1 versionCode 1
versionName "0.0.1" versionName "0.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
......
...@@ -15,8 +15,7 @@ apply plugin: 'com.android.application' ...@@ -15,8 +15,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android { android {
compileSdkVersion 26 compileSdkVersion 27
buildToolsVersion '26.0.3'
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
...@@ -25,7 +24,7 @@ android { ...@@ -25,7 +24,7 @@ android {
defaultConfig { defaultConfig {
applicationId "io.flutter.examples.flutter_view" applicationId "io.flutter.examples.flutter_view"
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 26 targetSdkVersion 27
versionCode 1 versionCode 1
versionName "0.0.1" versionName "0.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
......
...@@ -15,8 +15,7 @@ apply plugin: 'com.android.application' ...@@ -15,8 +15,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android { android {
compileSdkVersion 26 compileSdkVersion 27
buildToolsVersion '26.0.3'
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
...@@ -25,7 +24,7 @@ android { ...@@ -25,7 +24,7 @@ android {
defaultConfig { defaultConfig {
applicationId "io.flutter.examples.hello_world" applicationId "io.flutter.examples.hello_world"
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 26 targetSdkVersion 27
versionCode 1 versionCode 1
versionName "0.0.1" versionName "0.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
......
...@@ -15,8 +15,7 @@ apply plugin: 'com.android.application' ...@@ -15,8 +15,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android { android {
compileSdkVersion 26 compileSdkVersion 27
buildToolsVersion '26.0.3'
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
...@@ -25,7 +24,7 @@ android { ...@@ -25,7 +24,7 @@ android {
defaultConfig { defaultConfig {
applicationId "io.flutter.examples.layers" applicationId "io.flutter.examples.layers"
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 26 targetSdkVersion 27
versionCode 1 versionCode 1
versionName "0.0.1" versionName "0.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
......
...@@ -15,8 +15,7 @@ apply plugin: 'com.android.application' ...@@ -15,8 +15,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android { android {
compileSdkVersion 26 compileSdkVersion 27
buildToolsVersion '26.0.3'
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
...@@ -25,7 +24,7 @@ android { ...@@ -25,7 +24,7 @@ android {
defaultConfig { defaultConfig {
applicationId "io.flutter.examples.platform_channel" applicationId "io.flutter.examples.platform_channel"
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 26 targetSdkVersion 27
versionCode 1 versionCode 1
versionName "0.0.1" versionName "0.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
......
...@@ -15,8 +15,7 @@ apply plugin: 'com.android.application' ...@@ -15,8 +15,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android { android {
compileSdkVersion 26 compileSdkVersion 27
buildToolsVersion '26.0.3'
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
...@@ -25,7 +24,7 @@ android { ...@@ -25,7 +24,7 @@ android {
defaultConfig { defaultConfig {
applicationId "io.flutter.examples.platform_view" applicationId "io.flutter.examples.platform_view"
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 26 targetSdkVersion 27
versionCode 1 versionCode 1
versionName "0.0.1" versionName "0.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
......
...@@ -15,8 +15,7 @@ apply plugin: 'com.android.application' ...@@ -15,8 +15,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android { android {
compileSdkVersion 26 compileSdkVersion 27
buildToolsVersion '26.0.3'
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
...@@ -25,7 +24,7 @@ android { ...@@ -25,7 +24,7 @@ android {
defaultConfig { defaultConfig {
applicationId "io.flutter.examples.stocks" applicationId "io.flutter.examples.stocks"
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 26 targetSdkVersion 27
versionCode 1 versionCode 1
versionName "0.0.1" versionName "0.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
......
...@@ -212,9 +212,6 @@ class CreateCommand extends FlutterCommand { ...@@ -212,9 +212,6 @@ class CreateCommand extends FlutterCommand {
generatedCount += _renderTemplate('create', appPath, templateContext); generatedCount += _renderTemplate('create', appPath, templateContext);
generatedCount += _injectGradleWrapper(appPath); generatedCount += _injectGradleWrapper(appPath);
if (appPath != dirPath) {
generatedCount += _injectGradleWrapper(dirPath);
}
if (argResults['with-driver-test']) { if (argResults['with-driver-test']) {
final String testPath = fs.path.join(appPath, 'test_driver'); final String testPath = fs.path.join(appPath, 'test_driver');
generatedCount += _renderTemplate('driver', testPath, templateContext); generatedCount += _renderTemplate('driver', testPath, templateContext);
......
...@@ -15,8 +15,7 @@ apply plugin: 'com.android.application' ...@@ -15,8 +15,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android { android {
compileSdkVersion 26 compileSdkVersion 27
buildToolsVersion '26.0.3'
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
...@@ -26,7 +25,7 @@ android { ...@@ -26,7 +25,7 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "{{androidIdentifier}}" applicationId "{{androidIdentifier}}"
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 26 targetSdkVersion 27
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
......
...@@ -16,8 +16,7 @@ apply plugin: 'kotlin-android' ...@@ -16,8 +16,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android { android {
compileSdkVersion 26 compileSdkVersion 27
buildToolsVersion '26.0.3'
sourceSets { sourceSets {
main.java.srcDirs += 'src/main/kotlin' main.java.srcDirs += 'src/main/kotlin'
...@@ -31,7 +30,7 @@ android { ...@@ -31,7 +30,7 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "{{androidIdentifier}}" applicationId "{{androidIdentifier}}"
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 26 targetSdkVersion 27
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
......
...@@ -22,14 +22,10 @@ rootProject.allprojects { ...@@ -22,14 +22,10 @@ rootProject.allprojects {
apply plugin: 'com.android.library' apply plugin: 'com.android.library'
android { android {
compileSdkVersion 26 compileSdkVersion 27
buildToolsVersion '26.0.3'
defaultConfig { defaultConfig {
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
} }
lintOptions { lintOptions {
......
...@@ -25,17 +25,13 @@ apply plugin: 'com.android.library' ...@@ -25,17 +25,13 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android' apply plugin: 'kotlin-android'
android { android {
compileSdkVersion 26 compileSdkVersion 27
buildToolsVersion '26.0.3'
sourceSets { sourceSets {
main.java.srcDirs += 'src/main/kotlin' main.java.srcDirs += 'src/main/kotlin'
} }
defaultConfig { defaultConfig {
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
} }
lintOptions { lintOptions {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment