From 2f979914e492a64b4a2f9d20fe0d8c535476ccb4 Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Tue, 20 Jun 2017 12:43:23 -0700 Subject: [PATCH] Update templates to include google's maven repository (#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). --- .../templates/create/android-java.tmpl/app/build.gradle.tmpl | 4 ++-- .../templates/create/android-java.tmpl/build.gradle | 3 +++ .../create/android-kotlin.tmpl/app/build.gradle.tmpl | 4 ++-- .../templates/create/android-kotlin.tmpl/build.gradle | 3 +++ .../templates/plugin/android-java.tmpl/build.gradle.tmpl | 3 +++ .../templates/plugin/android-kotlin.tmpl/build.gradle.tmpl | 3 +++ 6 files changed, 16 insertions(+), 4 deletions(-) diff --git a/packages/flutter_tools/templates/create/android-java.tmpl/app/build.gradle.tmpl b/packages/flutter_tools/templates/create/android-java.tmpl/app/build.gradle.tmpl index a527499bad..35b0cba109 100644 --- a/packages/flutter_tools/templates/create/android-java.tmpl/app/build.gradle.tmpl +++ b/packages/flutter_tools/templates/create/android-java.tmpl/app/build.gradle.tmpl @@ -24,7 +24,7 @@ android { defaultConfig { testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" - + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "{{androidIdentifier}}" } @@ -43,7 +43,7 @@ flutter { } dependencies { - androidTestCompile 'com.android.support:support-annotations:25.0.0' + androidTestCompile 'com.android.support:support-annotations:25.4.0' androidTestCompile 'com.android.support.test:runner:0.5' androidTestCompile 'com.android.support.test:rules:0.5' } diff --git a/packages/flutter_tools/templates/create/android-java.tmpl/build.gradle b/packages/flutter_tools/templates/create/android-java.tmpl/build.gradle index ee5325df80..f5004b9071 100644 --- a/packages/flutter_tools/templates/create/android-java.tmpl/build.gradle +++ b/packages/flutter_tools/templates/create/android-java.tmpl/build.gradle @@ -11,6 +11,9 @@ buildscript { allprojects { repositories { jcenter() + maven { + url "https://maven.google.com" + } } } diff --git a/packages/flutter_tools/templates/create/android-kotlin.tmpl/app/build.gradle.tmpl b/packages/flutter_tools/templates/create/android-kotlin.tmpl/app/build.gradle.tmpl index 47e62ba6e3..1b96050f03 100644 --- a/packages/flutter_tools/templates/create/android-kotlin.tmpl/app/build.gradle.tmpl +++ b/packages/flutter_tools/templates/create/android-kotlin.tmpl/app/build.gradle.tmpl @@ -29,7 +29,7 @@ android { defaultConfig { testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" - + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "{{androidIdentifier}}" } @@ -48,7 +48,7 @@ flutter { } dependencies { - androidTestCompile 'com.android.support:support-annotations:25.0.0' + androidTestCompile 'com.android.support:support-annotations:25.4.0' androidTestCompile 'com.android.support.test:runner:0.5' androidTestCompile 'com.android.support.test:rules:0.5' compile 'org.jetbrains.kotlin:kotlin-stdlib-jre7:1.1.2-4' diff --git a/packages/flutter_tools/templates/create/android-kotlin.tmpl/build.gradle b/packages/flutter_tools/templates/create/android-kotlin.tmpl/build.gradle index 6a2fb13cd1..b22b7b7dba 100644 --- a/packages/flutter_tools/templates/create/android-kotlin.tmpl/build.gradle +++ b/packages/flutter_tools/templates/create/android-kotlin.tmpl/build.gradle @@ -12,6 +12,9 @@ buildscript { allprojects { repositories { jcenter() + maven { + url "https://maven.google.com" + } } } diff --git a/packages/flutter_tools/templates/plugin/android-java.tmpl/build.gradle.tmpl b/packages/flutter_tools/templates/plugin/android-java.tmpl/build.gradle.tmpl index 19c0d3496a..a67e4e9402 100644 --- a/packages/flutter_tools/templates/plugin/android-java.tmpl/build.gradle.tmpl +++ b/packages/flutter_tools/templates/plugin/android-java.tmpl/build.gradle.tmpl @@ -14,6 +14,9 @@ buildscript { allprojects { repositories { jcenter() + maven { + url "https://maven.google.com" + } } } diff --git a/packages/flutter_tools/templates/plugin/android-kotlin.tmpl/build.gradle.tmpl b/packages/flutter_tools/templates/plugin/android-kotlin.tmpl/build.gradle.tmpl index c3001b3698..9d3eecd8a0 100644 --- a/packages/flutter_tools/templates/plugin/android-kotlin.tmpl/build.gradle.tmpl +++ b/packages/flutter_tools/templates/plugin/android-kotlin.tmpl/build.gradle.tmpl @@ -14,6 +14,9 @@ buildscript { allprojects { repositories { jcenter() + maven { + url "https://maven.google.com" + } } }