Skip to content

Commit 28eef99

Browse files
goderbauergspencergoog
authored andcommitted
Update templates to include google's maven repository (flutter#10842)
Going forward, Android support libraries are published on maven (instead of bundling them with the SDK). Many plugins depend on these. To avoid requiring plugin users to add the maven repository to their app this change adds the repository to the template for `flutter create`. This also bumps the support-annotations dependency to 25.4.0 (which also requires the new maven repository).
1 parent 72bd651 commit 28eef99

File tree

6 files changed

+16
-4
lines changed

6 files changed

+16
-4
lines changed

packages/flutter_tools/templates/create/android-java.tmpl/app/build.gradle.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ android {
2424

2525
defaultConfig {
2626
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
27-
27+
2828
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
2929
applicationId "{{androidIdentifier}}"
3030
}
@@ -43,7 +43,7 @@ flutter {
4343
}
4444

4545
dependencies {
46-
androidTestCompile 'com.android.support:support-annotations:25.0.0'
46+
androidTestCompile 'com.android.support:support-annotations:25.4.0'
4747
androidTestCompile 'com.android.support.test:runner:0.5'
4848
androidTestCompile 'com.android.support.test:rules:0.5'
4949
}

packages/flutter_tools/templates/create/android-java.tmpl/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ buildscript {
1111
allprojects {
1212
repositories {
1313
jcenter()
14+
maven {
15+
url "https://maven.google.com"
16+
}
1417
}
1518
}
1619

packages/flutter_tools/templates/create/android-kotlin.tmpl/app/build.gradle.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ android {
2929

3030
defaultConfig {
3131
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
32-
32+
3333
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
3434
applicationId "{{androidIdentifier}}"
3535
}
@@ -48,7 +48,7 @@ flutter {
4848
}
4949

5050
dependencies {
51-
androidTestCompile 'com.android.support:support-annotations:25.0.0'
51+
androidTestCompile 'com.android.support:support-annotations:25.4.0'
5252
androidTestCompile 'com.android.support.test:runner:0.5'
5353
androidTestCompile 'com.android.support.test:rules:0.5'
5454
compile 'org.jetbrains.kotlin:kotlin-stdlib-jre7:1.1.2-4'

packages/flutter_tools/templates/create/android-kotlin.tmpl/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ buildscript {
1212
allprojects {
1313
repositories {
1414
jcenter()
15+
maven {
16+
url "https://maven.google.com"
17+
}
1518
}
1619
}
1720

packages/flutter_tools/templates/plugin/android-java.tmpl/build.gradle.tmpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ buildscript {
1414
allprojects {
1515
repositories {
1616
jcenter()
17+
maven {
18+
url "https://maven.google.com"
19+
}
1720
}
1821
}
1922

packages/flutter_tools/templates/plugin/android-kotlin.tmpl/build.gradle.tmpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ buildscript {
1414
allprojects {
1515
repositories {
1616
jcenter()
17+
maven {
18+
url "https://maven.google.com"
19+
}
1720
}
1821
}
1922

0 commit comments

Comments
 (0)