diff --git a/example/android/build.gradle b/example/android/build.gradle index bc26b58..0a2199e 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -11,6 +11,12 @@ buildscript { allprojects { repositories { + // See https://github.com/flutter/flutter/wiki/Plugins-and-Packages-repository-structure#gradle-structure for more info. + def artifactRepoKey = 'ARTIFACT_HUB_REPOSITORY' + if (System.getenv().containsKey(artifactRepoKey)) { + println "Using artifact hub" + maven { url System.getenv(artifactRepoKey) } + } google() mavenCentral() } @@ -39,9 +45,9 @@ gradle.projectsEvaluated { // Workaround for several warnings when building // that the above turns into errors, coming from - // org.checkerframework.checker.nullness.qual and + // org.checkerframework.checker.nullness.qual and // com.google.errorprone.annotations: - // + // // warning: Cannot find annotation method 'value()' in type // 'EnsuresNonNull': class file for // org.checkerframework.checker.nullness.qual.EnsuresNonNull not found diff --git a/example/android/settings.gradle b/example/android/settings.gradle index 115da6c..0360c9f 100644 --- a/example/android/settings.gradle +++ b/example/android/settings.gradle @@ -13,3 +13,16 @@ plugins.each { name, path -> include ":$name" project(":$name").projectDir = pluginDirectory } + +// See https://github.com/flutter/flutter/wiki/Plugins-and-Packages-repository-structure#gradle-structure for more info. +buildscript { + repositories { + maven { + url "https://plugins.gradle.org/m2/" + } + } + dependencies { + classpath "gradle.plugin.com.google.cloud.artifactregistry:artifactregistry-gradle-plugin:2.2.1" + } +} +apply plugin: "com.google.cloud.artifactregistry.gradle-plugin"