Skip to content

Commit

Permalink
[google_sign_in_web] Add a no-op Android implementation (flutter#2410)
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Klimushyn authored Dec 12, 2019
1 parent 6cce7b6 commit c503911
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/google_sign_in/google_sign_in_web/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.8.2+1

* Add a non-op Android implementation to avoid a flaky Gradle issue.

## 0.8.2

* Require Flutter SDK 1.12.13+hotfix.4 or greater.
Expand Down
33 changes: 33 additions & 0 deletions packages/google_sign_in/google_sign_in_web/android/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
group 'io.flutter.plugins.google_sign_in_web'
version '1.0'

buildscript {
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
}
}

rootProject.allprojects {
repositories {
google()
jcenter()
}
}

apply plugin: 'com.android.library'

android {
compileSdkVersion 28

defaultConfig {
minSdkVersion 16
}
lintOptions {
disable 'InvalidPackage'
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name = 'google_sign_in_web'
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.flutter.plugins.google_sign_in_web">
</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package io.flutter.plugins.google_sign_in_web;

import io.flutter.embedding.engine.plugins.FlutterPlugin;
import io.flutter.plugin.common.PluginRegistry.Registrar;

/** GoogleSignInWebPlugin */
public class GoogleSignInWebPlugin implements FlutterPlugin {
@Override
public void onAttachedToEngine(FlutterPluginBinding flutterPluginBinding) {}

// This static function is optional and equivalent to onAttachedToEngine. It supports the old
// pre-Flutter-1.12 Android projects. You are encouraged to continue supporting
// plugin registration via this function while apps migrate to use the new Android APIs
// post-flutter-1.12 via https://flutter.dev/go/android-project-migration.
//
// It is encouraged to share logic between onAttachedToEngine and registerWith to keep
// them functionally equivalent. Only one of onAttachedToEngine or registerWith will be called
// depending on the user's project. onAttachedToEngine or registerWith must both be defined
// in the same class.
public static void registerWith(Registrar registrar) {}

@Override
public void onDetachedFromEngine(FlutterPluginBinding binding) {}
}
2 changes: 1 addition & 1 deletion packages/google_sign_in/google_sign_in_web/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: google_sign_in_web
description: Flutter plugin for Google Sign-In, a secure authentication system
for signing in with a Google account on Android, iOS and Web.
homepage: https://github.com/flutter/plugins/tree/master/packages/google_sign_in/google_sign_in_web
version: 0.8.2
version: 0.8.2+1

flutter:
plugin:
Expand Down

0 comments on commit c503911

Please sign in to comment.