Skip to content

Commit f3169b1

Browse files
SUPERCILEXsamtstern
authored andcommitted
Update dependencies and set FUI version (#1070)
1 parent b087b4f commit f3169b1

File tree

13 files changed

+42
-25
lines changed

13 files changed

+42
-25
lines changed

app/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ android {
99
minSdkVersion 16
1010
targetSdkVersion targetSdk
1111
versionCode 1
12-
versionName "1.0"
12+
versionName version
1313

1414
multiDexEnabled true
1515
vectorDrawables.useSupportLibrary = true
@@ -45,19 +45,19 @@ dependencies {
4545
implementation project(path: ':database')
4646
implementation project(path: ':storage')
4747

48-
implementation 'com.facebook.android:facebook-login:4.28.0'
48+
implementation 'com.facebook.android:facebook-login:4.29.0'
4949
// Needed to override Facebook
5050
implementation "com.android.support:cardview-v7:$supportLibraryVersion"
5151
implementation "com.android.support:customtabs:$supportLibraryVersion"
5252
implementation("com.twitter.sdk.android:twitter-core:3.1.1@aar") { transitive = true }
5353

54-
implementation 'com.github.bumptech.glide:glide:4.3.1'
55-
annotationProcessor 'com.github.bumptech.glide:compiler:4.3.1'
54+
implementation 'com.github.bumptech.glide:glide:4.4.0'
55+
annotationProcessor 'com.github.bumptech.glide:compiler:4.4.0'
5656

5757
// The following dependencies are not required to use the Firebase UI library.
5858
// They are used to make some aspects of the demo app implementation simpler for
5959
// demonstrative purposes, and you may find them useful in your own apps; YMMV.
60-
implementation 'pub.devrel:easypermissions:1.0.1'
60+
implementation 'pub.devrel:easypermissions:1.1.1'
6161
implementation 'com.jakewharton:butterknife:8.8.1'
6262
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
6363
debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.5.4'

app/src/main/java/com/firebase/uidemo/storage/ImageActivity.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,19 +155,19 @@ private void showDownloadUI() {
155155

156156
@Override
157157
public void onRequestPermissionsResult(int requestCode,
158-
String[] permissions,
159-
int[] grantResults) {
158+
@NonNull String[] permissions,
159+
@NonNull int[] grantResults) {
160160
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
161161
EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);
162162
}
163163

164164
@Override
165-
public void onPermissionsGranted(int requestCode, List<String> perms) {
165+
public void onPermissionsGranted(int requestCode, @NonNull List<String> perms) {
166166
// See #choosePhoto with @AfterPermissionGranted
167167
}
168168

169169
@Override
170-
public void onPermissionsDenied(int requestCode, List<String> perms) {
170+
public void onPermissionsDenied(int requestCode, @NonNull List<String> perms) {
171171
if (EasyPermissions.somePermissionPermanentlyDenied(this,
172172
Collections.singletonList(PERMS))) {
173173
new AppSettingsDialog.Builder(this).build().show();

auth/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ android {
88
minSdkVersion 16
99
targetSdkVersion targetSdk
1010
versionCode 1
11-
versionName "1.0"
11+
versionName version
1212

1313
vectorDrawables.useSupportLibrary = true
1414
resourcePrefix "fui_"
@@ -36,7 +36,7 @@ android {
3636
dependencies {
3737
implementation "com.android.support:design:$supportLibraryVersion"
3838
implementation "com.android.support:customtabs:$supportLibraryVersion"
39-
implementation 'com.android.support.constraint:constraint-layout:1.1.0-beta3'
39+
implementation 'com.android.support.constraint:constraint-layout:1.1.0-beta4'
4040

4141
implementation "android.arch.lifecycle:extensions:$architectureVersion"
4242
annotationProcessor "android.arch.lifecycle:compiler:$architectureVersion"
@@ -52,9 +52,9 @@ dependencies {
5252

5353
testImplementation 'junit:junit:4.12'
5454
//noinspection GradleDynamicVersion
55-
testImplementation 'org.mockito:mockito-core:2.12.+'
56-
testImplementation 'org.robolectric:robolectric:3.5.1'
57-
testImplementation 'com.facebook.android:facebook-login:4.28.0'
55+
testImplementation 'org.mockito:mockito-core:2.13.+'
56+
testImplementation 'org.robolectric:robolectric:3.6.1'
57+
testImplementation 'com.facebook.android:facebook-login:4.29.0'
5858
testImplementation("com.twitter.sdk.android:twitter-core:3.1.1@aar") { transitive = true }
5959

6060
lintChecks project(':lint')

auth/src/main/java/com/firebase/ui/auth/AuthUI.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,20 @@ public static AuthUI getInstance() {
184184
*/
185185
@NonNull
186186
public static AuthUI getInstance(@NonNull FirebaseApp app) {
187+
AuthUI authUi;
188+
synchronized (INSTANCES) {
189+
authUi = INSTANCES.get(app);
190+
if (authUi == null) {
191+
authUi = new AuthUI(app);
192+
authUi.mAuth.setFirebaseUIVersion(BuildConfig.VERSION_NAME);
193+
INSTANCES.put(app, authUi);
194+
}
195+
}
196+
return authUi;
197+
}
198+
199+
@RestrictTo(RestrictTo.Scope.TESTS)
200+
static AuthUI getTestInstance(FirebaseApp app) {
187201
AuthUI authUi;
188202
synchronized (INSTANCES) {
189203
authUi = INSTANCES.get(app);

auth/src/test/java/com/firebase/ui/auth/AuthUITest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public void setUp() {
4646
@Test
4747
public void testCreateStartIntent_shouldHaveEmailAsDefaultProvider() {
4848
FlowParameters flowParameters = AuthUI
49-
.getInstance(mFirebaseApp)
49+
.getTestInstance(mFirebaseApp)
5050
.createSignInIntentBuilder()
5151
.build()
5252
.getParcelableExtra(ExtraConstants.EXTRA_FLOW_PARAMS);
@@ -57,15 +57,16 @@ public void testCreateStartIntent_shouldHaveEmailAsDefaultProvider() {
5757
@Test(expected = IllegalArgumentException.class)
5858
public void testCreateStartIntent_shouldOnlyAllowOneInstanceOfAnIdp() {
5959
SignInIntentBuilder startIntent =
60-
AuthUI.getInstance(mFirebaseApp).createSignInIntentBuilder();
60+
AuthUI.getTestInstance(mFirebaseApp).createSignInIntentBuilder();
6161
startIntent.setAvailableProviders(
6262
Arrays.asList(new IdpConfig.Builder(AuthUI.EMAIL_PROVIDER).build(),
6363
new IdpConfig.Builder(AuthUI.EMAIL_PROVIDER).build()));
6464
}
6565

6666
@Test
6767
public void testCreatingStartIntent() {
68-
FlowParameters flowParameters = AuthUI.getInstance(mFirebaseApp).createSignInIntentBuilder()
68+
FlowParameters flowParameters = AuthUI.getTestInstance(mFirebaseApp)
69+
.createSignInIntentBuilder()
6970
.setAvailableProviders(
7071
Arrays.asList(new IdpConfig.Builder(AuthUI.EMAIL_PROVIDER).build(),
7172
new IdpConfig.Builder(AuthUI.GOOGLE_PROVIDER).build(),

common/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ android {
88
minSdkVersion minSdk
99
targetSdkVersion targetSdk
1010
versionCode 1
11-
versionName "1.0"
11+
versionName version
1212
}
1313
}
1414

constants.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ project.ext {
88
targetSdk = 27
99
minSdk = 14
1010

11-
firebaseVersion = '11.6.2'
11+
firebaseVersion = '11.8.0'
1212
supportLibraryVersion = '27.0.2'
1313
architectureVersion = '1.0.0'
1414
}

database/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ android {
99
minSdkVersion minSdk
1010
targetSdkVersion targetSdk
1111
versionCode 1
12-
versionName "1.0"
12+
versionName version
1313
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1414
}
1515
}

firestore/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ android {
99
minSdkVersion minSdk
1010
targetSdkVersion targetSdk
1111
versionCode 1
12-
versionName "1.0"
12+
versionName version
1313
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1414
}
1515
}

gradle/wrapper/gradle-wrapper.jar

-398 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)