Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

Commit

Permalink
Finalize first release for PlayStore
Browse files Browse the repository at this point in the history
  • Loading branch information
benoitletondor committed Jun 3, 2018
1 parent 8ec2194 commit b2bbbc5
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 21 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ ios/.generated/
packages
.flutter-plugins
/android/app/google-services.json
/android/key
/ios/Runner/GoogleService-Info.plist
/lib/private.dart
32 changes: 22 additions & 10 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

def keystorePropertiesFile = rootProject.file("key/key.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))

android {
compileSdkVersion 27

Expand All @@ -27,21 +31,27 @@ android {
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.benoitletondor.beermeup"
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "1.0"
versionCode 2
versionName "1.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}

signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}

buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
signingConfig signingConfigs.release
}
}
}
Expand All @@ -51,10 +61,12 @@ flutter {
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
}

apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.gms.google-services'
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
buildscript {
ext.kotlin_version = '1.2.10'
ext.kotlin_version = '1.2.41'
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.android.tools.build:gradle:3.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:3.1.2'
}
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-4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
10 changes: 6 additions & 4 deletions lib/common/widget/erroroccurredwidget.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import 'package:flutter/material.dart';
import 'package:meta/meta.dart';

import 'package:beer_me_up/common/widget/materialflatbutton.dart';
import 'package:beer_me_up/localization/localization.dart';

class ErrorOccurredWidget extends StatelessWidget {

Expand All @@ -21,9 +23,9 @@ class ErrorOccurredWidget extends StatelessWidget {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
const Text(
"An error occurred",
style: TextStyle(
Text(
Localization.of(context).errorOccurred,
style: const TextStyle(
fontWeight: FontWeight.bold,
fontFamily: "Google Sans",
fontSize: 18.0,
Expand All @@ -43,7 +45,7 @@ class ErrorOccurredWidget extends StatelessWidget {
MaterialFlatButton.primary(
context: context,
onPressed: onRetry,
text: "Retry",
text: Localization.of(context).retry,
)
],
),
Expand Down
2 changes: 2 additions & 0 deletions lib/localization/localization.dart
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ abstract class Localization {
String get history;
String get times;
String get loadMore;
String get errorOccurred;
String get retry;
}

class BeerMeUpLocalizationsDelegate extends LocalizationsDelegate<Localization> {
Expand Down
2 changes: 2 additions & 0 deletions lib/localization/onboardinglocalization_en.dart
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,6 @@ class LocalizationEN implements Localization {
@override String get history => "History";
@override String get times => "times";
@override String get loadMore => "Load more";
@override String get errorOccurred => "An error occurred";
@override String get retry => "Retry";
}
4 changes: 3 additions & 1 deletion lib/localization/onboardinglocalization_fr.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class LocalizationFR implements Localization {
@override String get onboardingSecondThirdExplainSecond => "ton historique complet";
@override String get onboardingSecondThirdExplainThird => ", avec des ";
@override String get onboardingSecondThirdExplainFourth => "stats";
@override String get onboardingSecondThirdExplainFifth => ", à propos de toutes les bières que tu as bu";
@override String get onboardingSecondThirdExplainFifth => ", de toutes les bières que tu as bu";
@override String get onboardingSecondSubText => "C'est aussi simple que ça !";
@override String get onboardingSecondCTA => "C'est partit";

Expand Down Expand Up @@ -98,4 +98,6 @@ class LocalizationFR implements Localization {
@override String get history => "Historique";
@override String get times => "fois";
@override String get loadMore => "Charger plus";
@override String get errorOccurred => "Une erreur est survenue";
@override String get retry => "Réessayer";
}
1 change: 1 addition & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class BeerMeUpApp extends StatelessWidget {
const Locale('en'),
const Locale('fr'),
],
debugShowCheckedModeBanner: false,
);
}
}
Expand Down
4 changes: 2 additions & 2 deletions lib/page/home/profile/model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ class ProfileData {
checkInsList.sort((a, b) => b.drankQuantity.compareTo(a.drankQuantity));

return ProfileData(
checkInsData.length >= 3,
checkIns.isNotEmpty,
checkInsData.length >= 2,
checkIns.length >= 2,
totalPoints > 0,
favouriteBeer,
favouriteCategory,
Expand Down
7 changes: 6 additions & 1 deletion lib/service/userdataservice.dart
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,12 @@ class _UserDataServiceImpl implements UserDataService {
@override
Future<int> getTotalUserPoints() async {
final userDoc = await _userDoc.reference.get();
return userDoc["points"] as int;
final points = userDoc["points"];
if( points == null ) {
return 0;
}

return points as int;
}

@override
Expand Down

0 comments on commit b2bbbc5

Please sign in to comment.