diff --git a/example/android/build.gradle b/example/android/build.gradle index 0822484..6ae7ddc 100755 --- 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() } diff --git a/example/android/settings.gradle b/example/android/settings.gradle index 115da6c..0360c9f 100755 --- 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"