Skip to content

Commit bb23d3b

Browse files
committed
update UI to should build type of library and app module
1 parent 4b6cb81 commit bb23d3b

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

app/src/main/java/com/anotherdev/sample/firebase/auth/LoginActivity.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.anotherdev.sample.firebase.auth;
22

33
import android.content.Intent;
4+
import android.content.pm.ApplicationInfo;
45
import android.os.Bundle;
56
import android.util.Log;
67
import android.view.Menu;
@@ -83,9 +84,11 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
8384

8485
firebaseAuth = FirebaseAuthRest.getInstance(FirebaseApp.getInstance());
8586

86-
String libInfo = String.format("Library: %s %s",
87+
String libInfo = String.format("Library: %s %s\nBuildType: %s\nHash: %s",
8788
getString(com.anotherdev.firebase.auth.core.R.string.anotherdev_firebase_auth_rest_sdk_name),
88-
com.anotherdev.firebase.auth.core.BuildConfig.VERSION_NAME);
89+
com.anotherdev.firebase.auth.core.BuildConfig.VERSION_NAME,
90+
com.anotherdev.firebase.auth.core.BuildConfig.BUILD_TYPE,
91+
com.anotherdev.firebase.auth.core.BuildConfig.GIT_SHA);
8992
authLibraryTextView.setText(libInfo);
9093

9194
onDestroy.add(firebaseAuth.currentUser()
@@ -101,7 +104,11 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
101104
})
102105
.subscribe(Functions.emptyConsumer(), RxUtil.ON_ERROR_LOG_V3));
103106

104-
String appInfo = String.format("%s\n%s", getString(R.string.app_title), BuildConfig.VERSION_NAME);
107+
final boolean isDebugBuild = (getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;
108+
String appInfo = String.format("%s\n%s\nBuildType: %s",
109+
getString(R.string.app_title),
110+
BuildConfig.VERSION_NAME,
111+
isDebugBuild ? "debug" : "release");
105112
appInfoTextView.setText(appInfo);
106113

107114
googleSignInClient = GoogleSignIn.getClient(this,

0 commit comments

Comments
 (0)