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

Update Android template instances - retake 2 (#13928)

parent 60c5fed1
...@@ -15,8 +15,8 @@ apply plugin: 'com.android.application' ...@@ -15,8 +15,8 @@ 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 25 compileSdkVersion 26
buildToolsVersion '25.0.3' buildToolsVersion '26.0.3'
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
...@@ -24,7 +24,7 @@ android { ...@@ -24,7 +24,7 @@ android {
defaultConfig { defaultConfig {
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 25 targetSdkVersion 26
versionCode 1 versionCode 1
versionName "0.0.1" versionName "0.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
...@@ -52,7 +52,7 @@ flutter { ...@@ -52,7 +52,7 @@ flutter {
} }
dependencies { dependencies {
androidTestCompile 'com.android.support:support-annotations:25.4.0' testImplementation 'junit:junit:4.12'
androidTestCompile 'com.android.support.test:runner:0.5' androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestCompile 'com.android.support.test:rules:0.5' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
} }
buildscript { buildscript {
repositories { repositories {
google()
jcenter() jcenter()
maven {
url "https://maven.google.com"
}
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:2.3.3' classpath 'com.android.tools.build:gradle:3.0.1'
} }
} }
allprojects { allprojects {
repositories { repositories {
google()
jcenter() jcenter()
maven {
url "https://maven.google.com"
}
} }
} }
rootProject.buildDir = '../build' rootProject.buildDir = '../build'
subprojects { subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}" project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app') project.evaluationDependsOn(':app')
} }
......
...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME ...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
...@@ -15,8 +15,8 @@ apply plugin: 'com.android.application' ...@@ -15,8 +15,8 @@ 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 25 compileSdkVersion 26
buildToolsVersion '25.0.3' buildToolsVersion '26.0.3'
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
...@@ -24,7 +24,7 @@ android { ...@@ -24,7 +24,7 @@ android {
defaultConfig { defaultConfig {
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 25 targetSdkVersion 26
versionCode 1 versionCode 1
versionName "0.0.1" versionName "0.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
...@@ -44,7 +44,7 @@ flutter { ...@@ -44,7 +44,7 @@ flutter {
} }
dependencies { dependencies {
androidTestCompile 'com.android.support:support-annotations:25.4.0' testImplementation 'junit:junit:4.12'
androidTestCompile 'com.android.support.test:runner:0.5' androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestCompile 'com.android.support.test:rules:0.5' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
} }
buildscript { buildscript {
repositories { repositories {
google()
jcenter() jcenter()
maven {
url "https://maven.google.com"
}
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:2.3.3' classpath 'com.android.tools.build:gradle:3.0.1'
} }
} }
allprojects { allprojects {
repositories { repositories {
google()
jcenter() jcenter()
maven {
url "https://maven.google.com"
}
} }
} }
rootProject.buildDir = '../build' rootProject.buildDir = '../build'
subprojects { subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}" project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app') project.evaluationDependsOn(':app')
} }
......
...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME ...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
...@@ -15,8 +15,8 @@ apply plugin: 'com.android.application' ...@@ -15,8 +15,8 @@ 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 25 compileSdkVersion 26
buildToolsVersion '25.0.3' buildToolsVersion '26.0.3'
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
...@@ -24,7 +24,7 @@ android { ...@@ -24,7 +24,7 @@ android {
defaultConfig { defaultConfig {
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 25 targetSdkVersion 26
versionCode 1 versionCode 1
versionName "0.0.1" versionName "0.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
...@@ -52,7 +52,7 @@ flutter { ...@@ -52,7 +52,7 @@ flutter {
} }
dependencies { dependencies {
androidTestCompile 'com.android.support:support-annotations:25.4.0' testImplementation 'junit:junit:4.12'
androidTestCompile 'com.android.support.test:runner:0.5' androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestCompile 'com.android.support.test:rules:0.5' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
} }
buildscript { buildscript {
repositories { repositories {
google()
jcenter() jcenter()
maven {
url "https://maven.google.com"
}
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:2.3.3' classpath 'com.android.tools.build:gradle:3.0.1'
} }
} }
allprojects { allprojects {
repositories { repositories {
google()
jcenter() jcenter()
maven {
url "https://maven.google.com"
}
} }
} }
rootProject.buildDir = '../build' rootProject.buildDir = '../build'
subprojects { subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}" project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app') project.evaluationDependsOn(':app')
} }
......
...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME ...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
...@@ -15,8 +15,8 @@ apply plugin: 'com.android.application' ...@@ -15,8 +15,8 @@ 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 25 compileSdkVersion 26
buildToolsVersion '25.0.3' buildToolsVersion '26.0.3'
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
...@@ -25,7 +25,7 @@ android { ...@@ -25,7 +25,7 @@ android {
defaultConfig { defaultConfig {
applicationId "io.flutter.externalui" applicationId "io.flutter.externalui"
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 25 targetSdkVersion 26
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
...@@ -43,7 +43,7 @@ flutter { ...@@ -43,7 +43,7 @@ flutter {
} }
dependencies { dependencies {
androidTestCompile 'com.android.support:support-annotations:25.4.0' testImplementation 'junit:junit:4.12'
androidTestCompile 'com.android.support.test:runner:0.5' androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestCompile 'com.android.support.test:rules:0.5' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
} }
buildscript { buildscript {
repositories { repositories {
google()
jcenter() jcenter()
maven {
url "https://maven.google.com"
}
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:2.3.3' classpath 'com.android.tools.build:gradle:3.0.1'
} }
} }
allprojects { allprojects {
repositories { repositories {
google()
jcenter() jcenter()
maven {
url "https://maven.google.com"
}
} }
} }
rootProject.buildDir = '../build' rootProject.buildDir = '../build'
subprojects { subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}" project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app') project.evaluationDependsOn(':app')
} }
......
...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME ...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
...@@ -15,8 +15,8 @@ apply plugin: 'com.android.application' ...@@ -15,8 +15,8 @@ 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 25 compileSdkVersion 26
buildToolsVersion '25.0.3' buildToolsVersion '26.0.3'
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
...@@ -25,7 +25,7 @@ android { ...@@ -25,7 +25,7 @@ android {
defaultConfig { defaultConfig {
applicationId "com.yourcompany.flavors" applicationId "com.yourcompany.flavors"
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 25 targetSdkVersion 26
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
...@@ -36,7 +36,7 @@ android { ...@@ -36,7 +36,7 @@ android {
signingConfig signingConfigs.debug signingConfig signingConfigs.debug
} }
} }
aaptOptions { aaptOptions {
// TODO(goderbauer): remove when https://github.com/flutter/flutter/issues/8986 is resolved. // TODO(goderbauer): remove when https://github.com/flutter/flutter/issues/8986 is resolved.
if(System.getenv("FLUTTER_CI_WIN")) { if(System.getenv("FLUTTER_CI_WIN")) {
...@@ -45,6 +45,8 @@ android { ...@@ -45,6 +45,8 @@ android {
} }
} }
flavorDimensions "mode"
productFlavors { productFlavors {
free {} free {}
paid {} paid {}
...@@ -56,7 +58,7 @@ flutter { ...@@ -56,7 +58,7 @@ flutter {
} }
dependencies { dependencies {
androidTestCompile 'com.android.support:support-annotations:25.4.0' testImplementation 'junit:junit:4.12'
androidTestCompile 'com.android.support.test:runner:0.5' androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestCompile 'com.android.support.test:rules:0.5' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
} }
buildscript { buildscript {
repositories { repositories {
google()
jcenter() jcenter()
maven {
url "https://maven.google.com"
}
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:2.3.3' classpath 'com.android.tools.build:gradle:3.0.1'
} }
} }
allprojects { allprojects {
repositories { repositories {
google()
jcenter() jcenter()
maven {
url "https://maven.google.com"
}
} }
} }
rootProject.buildDir = '../build' rootProject.buildDir = '../build'
subprojects { subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}" project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app') project.evaluationDependsOn(':app')
} }
......
...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME ...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
...@@ -15,8 +15,8 @@ apply plugin: 'com.android.application' ...@@ -15,8 +15,8 @@ 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 25 compileSdkVersion 26
buildToolsVersion '25.0.3' buildToolsVersion '26.0.3'
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
...@@ -24,7 +24,7 @@ android { ...@@ -24,7 +24,7 @@ android {
defaultConfig { defaultConfig {
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 25 targetSdkVersion 26
versionCode 1 versionCode 1
versionName "0.0.1" versionName "0.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
...@@ -52,7 +52,7 @@ flutter { ...@@ -52,7 +52,7 @@ flutter {
} }
dependencies { dependencies {
androidTestCompile 'com.android.support:support-annotations:25.4.0' testImplementation 'junit:junit:4.12'
androidTestCompile 'com.android.support.test:runner:0.5' androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestCompile 'com.android.support.test:rules:0.5' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
} }
buildscript { buildscript {
repositories { repositories {
google()
jcenter() jcenter()
maven {
url "https://maven.google.com"
}
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:2.3.3' classpath 'com.android.tools.build:gradle:3.0.1'
} }
} }
allprojects { allprojects {
repositories { repositories {
google()
jcenter() jcenter()
maven {
url "https://maven.google.com"
}
} }
} }
rootProject.buildDir = '../build' rootProject.buildDir = '../build'
subprojects { subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}" project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app') project.evaluationDependsOn(':app')
} }
......
...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME ...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
...@@ -15,8 +15,8 @@ apply plugin: 'com.android.application' ...@@ -15,8 +15,8 @@ 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 25 compileSdkVersion 26
buildToolsVersion '25.0.2' buildToolsVersion '26.0.3'
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
...@@ -24,7 +24,7 @@ android { ...@@ -24,7 +24,7 @@ android {
defaultConfig { defaultConfig {
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 25 targetSdkVersion 26
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
...@@ -44,7 +44,7 @@ flutter { ...@@ -44,7 +44,7 @@ flutter {
} }
dependencies { dependencies {
androidTestCompile 'com.android.support:support-annotations:25.4.0' testImplementation 'junit:junit:4.12'
androidTestCompile 'com.android.support.test:runner:0.5' androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestCompile 'com.android.support.test:rules:0.5' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
} }
buildscript { buildscript {
repositories { repositories {
google()
jcenter() jcenter()
maven {
url "https://maven.google.com"
}
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:2.3.3' classpath 'com.android.tools.build:gradle:3.0.1'
} }
} }
allprojects { allprojects {
repositories { repositories {
google()
jcenter() jcenter()
maven {
url "https://maven.google.com"
}
} }
} }
rootProject.buildDir = '../build' rootProject.buildDir = '../build'
subprojects { subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}" project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app') project.evaluationDependsOn(':app')
} }
......
...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME ...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
...@@ -15,8 +15,8 @@ apply plugin: 'com.android.application' ...@@ -15,8 +15,8 @@ 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 25 compileSdkVersion 26
buildToolsVersion '25.0.3' buildToolsVersion '26.0.3'
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
...@@ -26,7 +26,7 @@ android { ...@@ -26,7 +26,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 25 targetSdkVersion 26
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
} }
...@@ -45,7 +45,7 @@ flutter { ...@@ -45,7 +45,7 @@ flutter {
} }
dependencies { dependencies {
androidTestCompile 'com.android.support:support-annotations:25.4.0' testImplementation 'junit:junit:4.12'
androidTestCompile 'com.android.support.test:runner:0.5' androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestCompile 'com.android.support.test:rules:0.5' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
} }
buildscript { buildscript {
repositories { repositories {
google()
jcenter() jcenter()
maven {
url "https://maven.google.com"
}
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:2.3.3' classpath 'com.android.tools.build:gradle:3.0.1'
} }
} }
allprojects { allprojects {
repositories { repositories {
google()
jcenter() jcenter()
maven {
url "https://maven.google.com"
}
} }
} }
rootProject.buildDir = '../build' rootProject.buildDir = '../build'
subprojects { subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}" project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app') project.evaluationDependsOn(':app')
} }
......
...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME ...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
...@@ -15,8 +15,8 @@ apply plugin: 'com.android.application' ...@@ -15,8 +15,8 @@ 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 25 compileSdkVersion 26
buildToolsVersion '25.0.3' buildToolsVersion '26.0.3'
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
...@@ -25,7 +25,7 @@ android { ...@@ -25,7 +25,7 @@ android {
defaultConfig { defaultConfig {
applicationId "io.flutter.examples.catalog" applicationId "io.flutter.examples.catalog"
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 25 targetSdkVersion 26
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
...@@ -45,7 +45,7 @@ flutter { ...@@ -45,7 +45,7 @@ flutter {
} }
dependencies { dependencies {
androidTestCompile 'com.android.support:support-annotations:25.4.0' testImplementation 'junit:junit:4.12'
androidTestCompile 'com.android.support.test:runner:0.5' androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestCompile 'com.android.support.test:rules:0.5' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
} }
buildscript { buildscript {
repositories { repositories {
google()
jcenter() jcenter()
maven {
url "https://maven.google.com"
}
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:2.3.3' classpath 'com.android.tools.build:gradle:3.0.1'
} }
} }
allprojects { allprojects {
repositories { repositories {
google()
jcenter() jcenter()
maven {
url "https://maven.google.com"
}
} }
} }
rootProject.buildDir = '../build' rootProject.buildDir = '../build'
subprojects { subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}" project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app') project.evaluationDependsOn(':app')
} }
......
...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME ...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
...@@ -15,8 +15,8 @@ apply plugin: 'com.android.application' ...@@ -15,8 +15,8 @@ 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 25 compileSdkVersion 26
buildToolsVersion '25.0.3' buildToolsVersion '26.0.3'
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
...@@ -25,7 +25,7 @@ android { ...@@ -25,7 +25,7 @@ android {
defaultConfig { defaultConfig {
applicationId "io.flutter.examples.gallery" applicationId "io.flutter.examples.gallery"
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 25 targetSdkVersion 26
versionCode 1 versionCode 1
versionName "0.0.1" versionName "0.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
...@@ -53,9 +53,7 @@ flutter { ...@@ -53,9 +53,7 @@ flutter {
} }
dependencies { dependencies {
androidTestCompile 'com.android.support:support-annotations:25.4.0' testImplementation 'junit:junit:4.12'
androidTestCompile 'com.android.support.test:runner:0.5' androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestCompile 'com.android.support.test:rules:0.5' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
androidTestCompile 'org.hamcrest:hamcrest-library:1.3'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
} }
buildscript { buildscript {
repositories { repositories {
google()
jcenter() jcenter()
maven {
url "https://maven.google.com"
}
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:2.3.3' classpath 'com.android.tools.build:gradle:3.0.1'
} }
} }
allprojects { allprojects {
repositories { repositories {
google()
jcenter() jcenter()
maven {
url "https://maven.google.com"
}
} }
} }
rootProject.buildDir = '../build' rootProject.buildDir = '../build'
subprojects { subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}" project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app') project.evaluationDependsOn(':app')
} }
......
...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME ...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
...@@ -15,8 +15,8 @@ apply plugin: 'com.android.application' ...@@ -15,8 +15,8 @@ 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 25 compileSdkVersion 26
buildToolsVersion '25.0.3' buildToolsVersion '26.0.3'
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
...@@ -25,7 +25,7 @@ android { ...@@ -25,7 +25,7 @@ android {
defaultConfig { defaultConfig {
applicationId "io.flutter.examples.flutter_view" applicationId "io.flutter.examples.flutter_view"
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 25 targetSdkVersion 26
versionCode 1 versionCode 1
versionName "0.0.1" versionName "0.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
...@@ -45,9 +45,9 @@ flutter { ...@@ -45,9 +45,9 @@ flutter {
} }
dependencies { dependencies {
androidTestCompile 'com.android.support:support-annotations:25.4.0' testImplementation 'junit:junit:4.12'
androidTestCompile 'com.android.support.test:runner:0.5' androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestCompile 'com.android.support.test:rules:0.5' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
compile 'com.android.support:appcompat-v7:25.0.0' implementation 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:design:25.0.0' implementation 'com.android.support:design:26.1.0'
} }
...@@ -3,6 +3,7 @@ package com.example.view; ...@@ -3,6 +3,7 @@ package com.example.view;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.support.design.widget.FloatingActionButton; import android.support.design.widget.FloatingActionButton;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
import android.view.View; import android.view.View;
import android.widget.TextView; import android.widget.TextView;
...@@ -20,13 +21,13 @@ public class MainActivity extends AppCompatActivity { ...@@ -20,13 +21,13 @@ public class MainActivity extends AppCompatActivity {
private static final String CHANNEL = "increment"; private static final String CHANNEL = "increment";
private static final String EMPTY_MESSAGE = ""; private static final String EMPTY_MESSAGE = "";
private static final String PING = "ping"; private static final String PING = "ping";
private BasicMessageChannel messageChannel; private BasicMessageChannel<String> messageChannel;
private String[] getArgsFromIntent(Intent intent) { private String[] getArgsFromIntent(Intent intent) {
// Before adding more entries to this list, consider that arbitrary // Before adding more entries to this list, consider that arbitrary
// Android applications can generate intents with extra data and that // Android applications can generate intents with extra data and that
// there are many security-sensitive args in the binary. // there are many security-sensitive args in the binary.
ArrayList<String> args = new ArrayList<String>(); ArrayList<String> args = new ArrayList<>();
if (intent.getBooleanExtra("trace-startup", false)) { if (intent.getBooleanExtra("trace-startup", false)) {
args.add("--trace-startup"); args.add("--trace-startup");
} }
...@@ -52,9 +53,12 @@ public class MainActivity extends AppCompatActivity { ...@@ -52,9 +53,12 @@ public class MainActivity extends AppCompatActivity {
String[] args = getArgsFromIntent(getIntent()); String[] args = getArgsFromIntent(getIntent());
FlutterMain.ensureInitializationComplete(getApplicationContext(), args); FlutterMain.ensureInitializationComplete(getApplicationContext(), args);
setContentView(R.layout.flutter_view_layout); setContentView(R.layout.flutter_view_layout);
getSupportActionBar().hide(); ActionBar supportActionBar = getSupportActionBar();
if (supportActionBar != null) {
supportActionBar.hide();
}
flutterView = (FlutterView) findViewById(R.id.flutter_view); flutterView = findViewById(R.id.flutter_view);
flutterView.runFromBundle(FlutterMain.findAppBundlePath(getApplicationContext()), null); flutterView.runFromBundle(FlutterMain.findAppBundlePath(getApplicationContext()), null);
messageChannel = new BasicMessageChannel<>(flutterView, CHANNEL, StringCodec.INSTANCE); messageChannel = new BasicMessageChannel<>(flutterView, CHANNEL, StringCodec.INSTANCE);
...@@ -67,7 +71,7 @@ public class MainActivity extends AppCompatActivity { ...@@ -67,7 +71,7 @@ public class MainActivity extends AppCompatActivity {
} }
}); });
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.button); FloatingActionButton fab = findViewById(R.id.button);
fab.setOnClickListener(new View.OnClickListener() { fab.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
...@@ -82,7 +86,7 @@ public class MainActivity extends AppCompatActivity { ...@@ -82,7 +86,7 @@ public class MainActivity extends AppCompatActivity {
private void onFlutterIncrement() { private void onFlutterIncrement() {
counter++; counter++;
TextView textView = (TextView) findViewById(R.id.button_tap); TextView textView = findViewById(R.id.button_tap);
String value = "Flutter button tapped " + counter + (counter == 1 ? " time" : " times"); String value = "Flutter button tapped " + counter + (counter == 1 ? " time" : " times");
textView.setText(value); textView.setText(value);
} }
......
buildscript { buildscript {
repositories { repositories {
google()
jcenter() jcenter()
maven {
url "https://maven.google.com"
}
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:2.3.3' classpath 'com.android.tools.build:gradle:3.0.1'
} }
} }
allprojects { allprojects {
repositories { repositories {
google()
jcenter() jcenter()
maven {
url "https://maven.google.com"
}
} }
} }
rootProject.buildDir = '../build' rootProject.buildDir = '../build'
subprojects { subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}" project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app') project.evaluationDependsOn(':app')
} }
......
...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME ...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
...@@ -15,8 +15,8 @@ apply plugin: 'com.android.application' ...@@ -15,8 +15,8 @@ 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 25 compileSdkVersion 26
buildToolsVersion '25.0.3' buildToolsVersion '26.0.3'
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
...@@ -25,7 +25,7 @@ android { ...@@ -25,7 +25,7 @@ android {
defaultConfig { defaultConfig {
applicationId "io.flutter.examples.hello_world" applicationId "io.flutter.examples.hello_world"
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 25 targetSdkVersion 26
versionCode 1 versionCode 1
versionName "0.0.1" versionName "0.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
...@@ -45,7 +45,7 @@ flutter { ...@@ -45,7 +45,7 @@ flutter {
} }
dependencies { dependencies {
androidTestCompile 'com.android.support:support-annotations:25.4.0' testImplementation 'junit:junit:4.12'
androidTestCompile 'com.android.support.test:runner:0.5' androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestCompile 'com.android.support.test:rules:0.5' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
} }
buildscript { buildscript {
repositories { repositories {
google()
jcenter() jcenter()
maven {
url "https://maven.google.com"
}
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:2.3.3' classpath 'com.android.tools.build:gradle:3.0.1'
} }
} }
allprojects { allprojects {
repositories { repositories {
google()
jcenter() jcenter()
maven {
url "https://maven.google.com"
}
} }
} }
rootProject.buildDir = '../build' rootProject.buildDir = '../build'
subprojects { subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}" project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app') project.evaluationDependsOn(':app')
} }
......
...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME ...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
...@@ -15,8 +15,8 @@ apply plugin: 'com.android.application' ...@@ -15,8 +15,8 @@ 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 25 compileSdkVersion 26
buildToolsVersion '25.0.3' buildToolsVersion '26.0.3'
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
...@@ -25,7 +25,7 @@ android { ...@@ -25,7 +25,7 @@ android {
defaultConfig { defaultConfig {
applicationId "io.flutter.examples.layers" applicationId "io.flutter.examples.layers"
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 25 targetSdkVersion 26
versionCode 1 versionCode 1
versionName "0.0.1" versionName "0.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
...@@ -45,7 +45,7 @@ flutter { ...@@ -45,7 +45,7 @@ flutter {
} }
dependencies { dependencies {
androidTestCompile 'com.android.support:support-annotations:25.4.0' testImplementation 'junit:junit:4.12'
androidTestCompile 'com.android.support.test:runner:0.5' androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestCompile 'com.android.support.test:rules:0.5' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
} }
buildscript { buildscript {
repositories { repositories {
google()
jcenter() jcenter()
maven {
url "https://maven.google.com"
}
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:2.3.3' classpath 'com.android.tools.build:gradle:3.0.1'
} }
} }
allprojects { allprojects {
repositories { repositories {
google()
jcenter() jcenter()
maven {
url "https://maven.google.com"
}
} }
} }
rootProject.buildDir = '../build' rootProject.buildDir = '../build'
subprojects { subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}" project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app') project.evaluationDependsOn(':app')
} }
......
...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME ...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
...@@ -15,8 +15,8 @@ apply plugin: 'com.android.application' ...@@ -15,8 +15,8 @@ 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 25 compileSdkVersion 26
buildToolsVersion '25.0.3' buildToolsVersion '26.0.3'
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
...@@ -25,7 +25,7 @@ android { ...@@ -25,7 +25,7 @@ android {
defaultConfig { defaultConfig {
applicationId "io.flutter.examples.platform_channel" applicationId "io.flutter.examples.platform_channel"
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 25 targetSdkVersion 26
versionCode 1 versionCode 1
versionName "0.0.1" versionName "0.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
...@@ -45,7 +45,7 @@ flutter { ...@@ -45,7 +45,7 @@ flutter {
} }
dependencies { dependencies {
androidTestCompile 'com.android.support:support-annotations:25.4.0' testImplementation 'junit:junit:4.12'
androidTestCompile 'com.android.support.test:runner:0.5' androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestCompile 'com.android.support.test:rules:0.5' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
} }
...@@ -29,8 +29,7 @@ public class ExampleInstrumentedTest { ...@@ -29,8 +29,7 @@ public class ExampleInstrumentedTest {
final BitmapPoller poller = new BitmapPoller(5); final BitmapPoller poller = new BitmapPoller(5);
instr.runOnMainSync(new Runnable() { instr.runOnMainSync(new Runnable() {
public void run() { public void run() {
final FlutterView flutterView = (FlutterView) activityRule.getActivity() final FlutterView flutterView = activityRule.getActivity().getFlutterView();
.getFlutterView();
// Call onPostResume to start the engine's renderer even if the activity // Call onPostResume to start the engine's renderer even if the activity
// is paused in the test environment. // is paused in the test environment.
......
...@@ -88,17 +88,14 @@ public class MainActivity extends FlutterActivity { ...@@ -88,17 +88,14 @@ public class MainActivity extends FlutterActivity {
} }
private int getBatteryLevel() { private int getBatteryLevel() {
int batteryLevel = -1;
if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) {
BatteryManager batteryManager = (BatteryManager) getSystemService(BATTERY_SERVICE); BatteryManager batteryManager = (BatteryManager) getSystemService(BATTERY_SERVICE);
batteryLevel = batteryManager.getIntProperty(BatteryManager.BATTERY_PROPERTY_CAPACITY); return batteryManager.getIntProperty(BatteryManager.BATTERY_PROPERTY_CAPACITY);
} else { } else {
Intent intent = new ContextWrapper(getApplicationContext()). Intent intent = new ContextWrapper(getApplicationContext()).
registerReceiver(null, new IntentFilter(Intent.ACTION_BATTERY_CHANGED)); registerReceiver(null, new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
batteryLevel = (intent.getIntExtra(BatteryManager.EXTRA_LEVEL, -1) * 100) / return (intent.getIntExtra(BatteryManager.EXTRA_LEVEL, -1) * 100) /
intent.getIntExtra(BatteryManager.EXTRA_SCALE, -1); intent.getIntExtra(BatteryManager.EXTRA_SCALE, -1);
} }
return batteryLevel;
} }
} }
buildscript { buildscript {
repositories { repositories {
google()
jcenter() jcenter()
maven {
url "https://maven.google.com"
}
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:2.3.3' classpath 'com.android.tools.build:gradle:3.0.1'
} }
} }
allprojects { allprojects {
repositories { repositories {
google()
jcenter() jcenter()
maven {
url "https://maven.google.com"
}
} }
} }
rootProject.buildDir = '../build' rootProject.buildDir = '../build'
subprojects { subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}" project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app') project.evaluationDependsOn(':app')
} }
......
...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME ...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
...@@ -15,8 +15,8 @@ apply plugin: 'com.android.application' ...@@ -15,8 +15,8 @@ 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 25 compileSdkVersion 26
buildToolsVersion '25.0.3' buildToolsVersion '26.0.3'
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
...@@ -25,7 +25,7 @@ android { ...@@ -25,7 +25,7 @@ android {
defaultConfig { defaultConfig {
applicationId "io.flutter.examples.platform_view" applicationId "io.flutter.examples.platform_view"
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 25 targetSdkVersion 26
versionCode 1 versionCode 1
versionName "0.0.1" versionName "0.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
...@@ -45,9 +45,9 @@ flutter { ...@@ -45,9 +45,9 @@ flutter {
} }
dependencies { dependencies {
androidTestCompile 'com.android.support:support-annotations:25.4.0' testImplementation 'junit:junit:4.12'
androidTestCompile 'com.android.support.test:runner:0.5' androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestCompile 'com.android.support.test:rules:0.5' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
compile 'com.android.support:appcompat-v7:25.0.0' implementation 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:design:25.0.0' implementation 'com.android.support:design:26.1.0'
} }
...@@ -22,14 +22,14 @@ public class CountActivity extends AppCompatActivity { ...@@ -22,14 +22,14 @@ public class CountActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.android_full_screen_layout); setContentView(R.layout.android_full_screen_layout);
Toolbar myToolbar = (Toolbar) findViewById(R.id.my_toolbar); Toolbar myToolbar = findViewById(R.id.my_toolbar);
myToolbar.setTitle("Platform View"); myToolbar.setTitle("Platform View");
setSupportActionBar(myToolbar); setSupportActionBar(myToolbar);
counter = getIntent().getIntExtra(EXTRA_COUNTER, 0); counter = getIntent().getIntExtra(EXTRA_COUNTER, 0);
updateText(); updateText();
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab); FloatingActionButton fab = findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() { fab.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
...@@ -38,7 +38,7 @@ public class CountActivity extends AppCompatActivity { ...@@ -38,7 +38,7 @@ public class CountActivity extends AppCompatActivity {
} }
}); });
Button switchViewButton = (Button) findViewById(R.id.button); Button switchViewButton = findViewById(R.id.button);
switchViewButton.setOnClickListener(new View.OnClickListener() { switchViewButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
...@@ -48,7 +48,7 @@ public class CountActivity extends AppCompatActivity { ...@@ -48,7 +48,7 @@ public class CountActivity extends AppCompatActivity {
} }
private void updateText() { private void updateText() {
TextView textView = (TextView) findViewById(R.id.button_tap); TextView textView = findViewById(R.id.button_tap);
String value = "Button tapped " + counter + (counter == 1 ? " time" : " times"); String value = "Button tapped " + counter + (counter == 1 ? " time" : " times");
textView.setText(value); textView.setText(value);
} }
......
...@@ -32,7 +32,7 @@ public class MainActivity extends FlutterActivity { ...@@ -32,7 +32,7 @@ public class MainActivity extends FlutterActivity {
MainActivity.this.result = result; MainActivity.this.result = result;
int count = methodCall.arguments(); int count = methodCall.arguments();
if (methodCall.method.equals(METHOD_SWITCH_VIEW)) { if (methodCall.method.equals(METHOD_SWITCH_VIEW)) {
onlaunchFullScreen(count); onLaunchFullScreen(count);
} else { } else {
result.notImplemented(); result.notImplemented();
} }
...@@ -41,7 +41,7 @@ public class MainActivity extends FlutterActivity { ...@@ -41,7 +41,7 @@ public class MainActivity extends FlutterActivity {
); );
} }
private void onlaunchFullScreen(int count) { private void onLaunchFullScreen(int count) {
Intent fullScreenIntent = new Intent(this, CountActivity.class); Intent fullScreenIntent = new Intent(this, CountActivity.class);
fullScreenIntent.putExtra(CountActivity.EXTRA_COUNTER, count); fullScreenIntent.putExtra(CountActivity.EXTRA_COUNTER, count);
startActivityForResult(fullScreenIntent, COUNT_REQUEST); startActivityForResult(fullScreenIntent, COUNT_REQUEST);
......
buildscript { buildscript {
repositories { repositories {
google()
jcenter() jcenter()
maven {
url "https://maven.google.com"
}
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:2.3.3' classpath 'com.android.tools.build:gradle:3.0.1'
} }
} }
allprojects { allprojects {
repositories { repositories {
google()
jcenter() jcenter()
maven {
url "https://maven.google.com"
}
} }
} }
rootProject.buildDir = '../build' rootProject.buildDir = '../build'
subprojects { subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}" project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app') project.evaluationDependsOn(':app')
} }
......
...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME ...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
...@@ -15,8 +15,8 @@ apply plugin: 'com.android.application' ...@@ -15,8 +15,8 @@ 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 25 compileSdkVersion 26
buildToolsVersion '25.0.3' buildToolsVersion '26.0.3'
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
...@@ -25,7 +25,7 @@ android { ...@@ -25,7 +25,7 @@ android {
defaultConfig { defaultConfig {
applicationId "io.flutter.examples.stocks" applicationId "io.flutter.examples.stocks"
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 25 targetSdkVersion 26
versionCode 1 versionCode 1
versionName "0.0.1" versionName "0.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
...@@ -45,7 +45,7 @@ flutter { ...@@ -45,7 +45,7 @@ flutter {
} }
dependencies { dependencies {
androidTestCompile 'com.android.support:support-annotations:25.4.0' testImplementation 'junit:junit:4.12'
androidTestCompile 'com.android.support.test:runner:0.5' androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestCompile 'com.android.support.test:rules:0.5' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
} }
buildscript { buildscript {
repositories { repositories {
google()
jcenter() jcenter()
maven {
url "https://maven.google.com"
}
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:2.3.3' classpath 'com.android.tools.build:gradle:3.0.1'
} }
} }
allprojects { allprojects {
repositories { repositories {
google()
jcenter() jcenter()
maven {
url "https://maven.google.com"
}
} }
} }
rootProject.buildDir = '../build' rootProject.buildDir = '../build'
subprojects { subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}" project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app') project.evaluationDependsOn(':app')
} }
......
...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME ...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
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