Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NEWS-32 Dodanie logowania i rejestracji firebasowej #28

Merged
merged 6 commits into from
Dec 30, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ android {
}

signingConfigs {
debug {
storeFile = file("keystore/debug.keystore")
keyAlias = "androiddebugkey"
storePassword = "android"
keyPassword = "android"
}

release {
storeFile file(System.getenv("HOME") + "/keystores/allthenews.keystore")
storePassword System.getenv("BITRISEIO_ANDROID_KEYSTORE_PASSWORD")
Expand All @@ -60,6 +67,10 @@ android {
}

buildTypes {
debug {
signingConfig signingConfigs.debug
}

release {
signingConfig signingConfigs.release.storeFile.exists() ? signingConfigs.release : signingConfigs.debug
}
Expand Down
Binary file added android/app/keystore/debug.keystore
Binary file not shown.
8 changes: 4 additions & 4 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
buildscript {
ext.kotlin_version = '1.3.72'
ext.kotlin_version = '1.4.10'
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
classpath 'com.android.tools.build:gradle:4.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.3'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.2.0'
classpath 'com.google.gms:google-services:4.3.4'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.3.0'
}
}

Expand Down
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
1 change: 1 addition & 0 deletions ios/Flutter/.last_build_id
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
49215d7737e9d4635d0039c9528c91cb
2 changes: 2 additions & 0 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
source 'https://github.com/CocoaPods/Specs.git'

project 'Runner', {
'Debug' => :debug,
Expand All @@ -28,6 +29,7 @@ require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelpe
flutter_ios_podfile_setup

target 'Runner' do
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '6.33.0'
use_frameworks!
use_modular_headers!

Expand Down
25 changes: 25 additions & 0 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
1782AB4A24DF171900D9C0DC /* Use firebase script */,
FAC50C196DE7D446BA1C8728 /* [CP] Embed Pods Frameworks */,
0DF145B76CACB7767574A6B0 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -247,6 +248,24 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
0DF145B76CACB7767574A6B0 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh",
"${PODS_ROOT}/FirebaseFirestore/FirebaseFirestore/Resources/gRPCCertificates-Cpp.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates-Cpp.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
1782AB4A24DF171900D9C0DC /* Use firebase script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -341,25 +360,31 @@
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
"${PODS_ROOT}/../Flutter/Flutter.framework",
"${BUILT_PRODUCTS_DIR}/GTMSessionFetcher/GTMSessionFetcher.framework",
"${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework",
"${BUILT_PRODUCTS_DIR}/PromisesObjC/FBLPromises.framework",
"${BUILT_PRODUCTS_DIR}/flutter_secure_storage/flutter_secure_storage.framework",
"${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework",
"${BUILT_PRODUCTS_DIR}/package_info/package_info.framework",
"${BUILT_PRODUCTS_DIR}/path_provider/path_provider.framework",
"${BUILT_PRODUCTS_DIR}/shared_preferences/shared_preferences.framework",
"${BUILT_PRODUCTS_DIR}/sqlite3/sqlite3.framework",
"${BUILT_PRODUCTS_DIR}/sqlite3_flutter_libs/sqlite3_flutter_libs.framework",
"${BUILT_PRODUCTS_DIR}/webview_flutter/webview_flutter.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GTMSessionFetcher.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleUtilities.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBLPromises.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_secure_storage.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/package_info.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/sqlite3.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/sqlite3_flutter_libs.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/webview_flutter.framework",
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
21 changes: 20 additions & 1 deletion lib/generated/intl/messages_en.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,41 @@ class MessageLookup extends MessageLookupByLibrary {
final messages = _notInlinedMessages(_notInlinedMessages);
static _notInlinedMessages(_) => <String, Function> {
"aboutApp" : MessageLookupByLibrary.simpleMessage("About"),
"apiConnectionException" : MessageLookupByLibrary.simpleMessage("No internet connection"),
"apiInvalidUrlException" : MessageLookupByLibrary.simpleMessage("Resource not found"),
"apiServerException" : MessageLookupByLibrary.simpleMessage("Internal server error"),
"apiUnauthorizedException" : MessageLookupByLibrary.simpleMessage("Authorization error"),
"apiUnknownException" : MessageLookupByLibrary.simpleMessage("Unknown error"),
"appInfoFeatureDescription" : MessageLookupByLibrary.simpleMessage("The latest news from the world"),
"appInfoTechnicalDescription" : MessageLookupByLibrary.simpleMessage("Application fully written in Flutter"),
"createAccount" : MessageLookupByLibrary.simpleMessage("Create account"),
"darkMode" : MessageLookupByLibrary.simpleMessage("Dark mode"),
"email" : MessageLookupByLibrary.simpleMessage("E-mail"),
"emailed" : MessageLookupByLibrary.simpleMessage("E-mailed"),
"emptyFieldError" : MessageLookupByLibrary.simpleMessage("This field cannot be empty"),
"firebaseEmailAlreadyInUseError" : MessageLookupByLibrary.simpleMessage("E-mail address already in use"),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ogólnie unikałbym przedrostka firebase w nazwach stringsów - przecież one nie wiedzą, że to błąd z firebase :D no i przy choćby prostej zmianie np. walidacji lokalnej e-maila regexem nie trzeba będzie zmieniać klucza komunikatu błędu :)

"firebaseInitializationError" : MessageLookupByLibrary.simpleMessage("Firebase initialization failed, restart the application"),
"firebaseInvalidEmailError" : MessageLookupByLibrary.simpleMessage("Wrong e-mail format"),
"firebaseInvalidPasswordError" : MessageLookupByLibrary.simpleMessage("Password is invalid for the given email"),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tam gdzie email, można pozmieniać na e-mail, widzę, że chyba tak i tak jest teraz poprawnie, ale powiedzmy, że gwoli spójności dałbym wszędzie e-mail

"firebaseOperationNotAllowedError" : MessageLookupByLibrary.simpleMessage("E-mail/password accounts are not enabled for the project"),
"firebaseTooManyRequests" : MessageLookupByLibrary.simpleMessage("We have blocked all requests from this device due to unusual activity. Try again later."),
"firebaseUserDisabledError" : MessageLookupByLibrary.simpleMessage("User corresponding to the given email has been disabled"),
"firebaseUserNotFoundError" : MessageLookupByLibrary.simpleMessage("There is no user corresponding to the given email"),
"firebaseWeakPasswordError" : MessageLookupByLibrary.simpleMessage("The password is too weak"),
"login" : MessageLookupByLibrary.simpleMessage("Login"),
"loginTitle" : MessageLookupByLibrary.simpleMessage("Login"),
"logout" : MessageLookupByLibrary.simpleMessage("Logout"),
"mostEmailed" : MessageLookupByLibrary.simpleMessage("Most Emailed"),
"mostShared" : MessageLookupByLibrary.simpleMessage("Most Shared"),
"mostViewed" : MessageLookupByLibrary.simpleMessage("Most Viewed"),
"name" : MessageLookupByLibrary.simpleMessage("Name"),
"newest" : MessageLookupByLibrary.simpleMessage("Newest"),
"next" : MessageLookupByLibrary.simpleMessage("Next"),
"noInternetException" : MessageLookupByLibrary.simpleMessage("No internet connection"),
"password" : MessageLookupByLibrary.simpleMessage("Password"),
"popular" : MessageLookupByLibrary.simpleMessage("Popular"),
"profile" : MessageLookupByLibrary.simpleMessage("Profile"),
"register" : MessageLookupByLibrary.simpleMessage("Register"),
"registrationTitle" : MessageLookupByLibrary.simpleMessage("Registration"),
"retry" : MessageLookupByLibrary.simpleMessage("Retry"),
"settings" : MessageLookupByLibrary.simpleMessage("Settings"),
"shared" : MessageLookupByLibrary.simpleMessage("Shared"),
Expand Down
18 changes: 17 additions & 1 deletion lib/generated/intl/messages_pl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,38 @@ class MessageLookup extends MessageLookupByLibrary {
final messages = _notInlinedMessages(_notInlinedMessages);
static _notInlinedMessages(_) => <String, Function> {
"aboutApp" : MessageLookupByLibrary.simpleMessage("O aplikacji"),
"apiConnectionException" : MessageLookupByLibrary.simpleMessage("Brak połączenia sieciowego"),
"apiInvalidUrlException" : MessageLookupByLibrary.simpleMessage("Nie znaleziono danych"),
"apiServerException" : MessageLookupByLibrary.simpleMessage("Błąd na serwerze"),
"apiUnauthorizedException" : MessageLookupByLibrary.simpleMessage("Błąd autoryzacyjny"),
"apiUnknownException" : MessageLookupByLibrary.simpleMessage("Nieznany błąd"),
"appInfoFeatureDescription" : MessageLookupByLibrary.simpleMessage("Najnowsze informacje z całego świata"),
"appInfoTechnicalDescription" : MessageLookupByLibrary.simpleMessage("Aplikacja w całości napisana we Flutterze"),
"createAccount" : MessageLookupByLibrary.simpleMessage("Utwórz konto"),
"darkMode" : MessageLookupByLibrary.simpleMessage("Tryb ciemny"),
"email" : MessageLookupByLibrary.simpleMessage("E-mail"),
"emailed" : MessageLookupByLibrary.simpleMessage("Wysyłane e-mailem"),
"emptyFieldError" : MessageLookupByLibrary.simpleMessage("To pole nie może być puste"),
"firebaseInitializationError" : MessageLookupByLibrary.simpleMessage("Nieudana inicjalizacja firebase, zrestartuj aplikację"),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mało user friendly - Błąd inicjalizacji. Zrestartuj aplikację - może nie jest to copywriter lvl master, ale nie ma w komunikacie firebase :D

"firebaseInvalidEmailError" : MessageLookupByLibrary.simpleMessage("Zły format e-maila"),
"firebaseInvalidPasswordError" : MessageLookupByLibrary.simpleMessage("Hasło do podanego e-maila jest niepoprawne"),
"firebaseTooManyRequests" : MessageLookupByLibrary.simpleMessage("Zbyt dużo nieudanych prób. Spróbuj ponownie później."),
"firebaseUserDisabledError" : MessageLookupByLibrary.simpleMessage("Użytkownik powiązany z podanym e-mailem został zablokowany"),
"firebaseUserNotFoundError" : MessageLookupByLibrary.simpleMessage("Użytkownik o podanym e-mailu nie istnieje"),
"login" : MessageLookupByLibrary.simpleMessage("Zaloguj"),
"loginTitle" : MessageLookupByLibrary.simpleMessage("Logowanie"),
"logout" : MessageLookupByLibrary.simpleMessage("Wyloguj"),
"mostEmailed" : MessageLookupByLibrary.simpleMessage("Najczęściej mailowane"),
"mostShared" : MessageLookupByLibrary.simpleMessage("Najczęściej udostępniane"),
"mostViewed" : MessageLookupByLibrary.simpleMessage("Najczęściej oglądane"),
"name" : MessageLookupByLibrary.simpleMessage("Imię"),
"newest" : MessageLookupByLibrary.simpleMessage("Najnowsze"),
"next" : MessageLookupByLibrary.simpleMessage("Dalej"),
"noInternetException" : MessageLookupByLibrary.simpleMessage("Brak połączenia sieciowego"),
"password" : MessageLookupByLibrary.simpleMessage("Hasło"),
"popular" : MessageLookupByLibrary.simpleMessage("Popularne"),
"profile" : MessageLookupByLibrary.simpleMessage("Profil"),
"register" : MessageLookupByLibrary.simpleMessage("Zarejestruj"),
"registrationTitle" : MessageLookupByLibrary.simpleMessage("Rejestracja"),
"retry" : MessageLookupByLibrary.simpleMessage("Ponów"),
"settings" : MessageLookupByLibrary.simpleMessage("Ustawienia"),
"shared" : MessageLookupByLibrary.simpleMessage("Udostępniane"),
Expand Down
Loading