Skip to content

Commit 6e686a0

Browse files
dereklakinbrianegan
authored andcommitted
Upgrade to AndroidX (#127)
* Upgrade counter example to AndroidX * Upgrade to AndroidX. Still requires update to rxdart dependency.
1 parent 1e21e2d commit 6e686a0

File tree

7 files changed

+28
-16
lines changed

7 files changed

+28
-16
lines changed

example/counter/android/app/build.gradle

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ apply plugin: 'com.android.application'
1515
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
1616

1717
android {
18-
compileSdkVersion 25
19-
buildToolsVersion '25.0.3'
18+
compileSdkVersion 28
2019

2120
lintOptions {
2221
disable 'InvalidPackage'
@@ -26,10 +25,10 @@ android {
2625
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
2726
applicationId "com.yourcompany.example"
2827
minSdkVersion 16
29-
targetSdkVersion 25
28+
targetSdkVersion 28
3029
versionCode 1
3130
versionName "1.0"
32-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
31+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
3332
}
3433

3534
buildTypes {
@@ -46,7 +45,7 @@ flutter {
4645
}
4746

4847
dependencies {
49-
androidTestCompile 'com.android.support:support-annotations:25.4.0'
50-
androidTestCompile 'com.android.support.test:runner:0.5'
51-
androidTestCompile 'com.android.support.test:rules:0.5'
48+
androidTestCompile 'androidx.annotation:annotation:1.0.0'
49+
androidTestCompile 'androidx.test:runner:1.1.0'
50+
androidTestCompile 'androidx.test:rules:1.1.0'
5251
}

example/counter/android/build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ buildscript {
44
maven {
55
url "https://maven.google.com"
66
}
7+
google()
78
}
89

910
dependencies {
10-
classpath 'com.android.tools.build:gradle:3.2.1'
11+
classpath 'com.android.tools.build:gradle:3.4.0'
1112
}
1213
}
1314

@@ -17,6 +18,7 @@ allprojects {
1718
maven {
1819
url "https://maven.google.com"
1920
}
21+
google()
2022
}
2123
}
2224

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
android.enableJetifier=true
2+
android.useAndroidX=true
13
org.gradle.jvmargs=-Xmx1536M
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Fri Jun 23 08:50:38 CEST 2017
1+
#Sat Apr 27 13:13:56 BST 2019
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip

example/github_search/android/app/build.gradle

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,14 @@ apply plugin: 'com.android.application'
1515
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
1616

1717
android {
18-
compileSdkVersion 25
19-
buildToolsVersion '24.0.1'
18+
compileSdkVersion 28
2019

2120
lintOptions {
2221
disable 'InvalidPackage'
2322
}
2423

2524
defaultConfig {
26-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
25+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2726
}
2827

2928
buildTypes {
@@ -40,7 +39,7 @@ flutter {
4039
}
4140

4241
dependencies {
43-
androidTestCompile 'com.android.support:support-annotations:25.0.0'
44-
androidTestCompile 'com.android.support.test:runner:0.5'
45-
androidTestCompile 'com.android.support.test:rules:0.5'
42+
androidTestCompile 'androidx.annotation:annotation:1.0.0'
43+
androidTestCompile 'androidx.test:runner:1.1.0'
44+
androidTestCompile 'androidx.test:rules:1.1.0'
4645
}

example/github_search/android/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ buildscript {
44
maven {
55
url "https://maven.google.com"
66
}
7+
maven {
8+
url 'https://maven.google.com/'
9+
name 'Google'
10+
}
711
}
812

913
dependencies {
@@ -17,6 +21,10 @@ allprojects {
1721
maven {
1822
url "https://maven.google.com"
1923
}
24+
maven {
25+
url 'https://maven.google.com/'
26+
name 'Google'
27+
}
2028
}
2129
}
2230

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
android.enableJetifier=true
2+
android.useAndroidX=true
13
org.gradle.jvmargs=-Xmx1536M

0 commit comments

Comments
 (0)