Skip to content

Commit 486690d

Browse files
authored
Merge pull request #4 from rod-moraes/master
Ajustes para o build da aplicação e assinatura do app
2 parents 76b5c80 + 1962206 commit 486690d

File tree

6 files changed

+41
-12
lines changed

6 files changed

+41
-12
lines changed

src/MobileApp/android/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ GeneratedPluginRegistrant.java
99
# Remember to never publicly share your keystore.
1010
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
1111
key.properties
12+
keystore.jks

src/MobileApp/android/app/build.gradle

+15-3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ if (localPropertiesFile.exists()) {
55
localProperties.load(reader)
66
}
77
}
8+
def keystoreProperties = new Properties()
9+
def keystorePropertiesFile = rootProject.file('key.properties')
10+
if (keystorePropertiesFile.exists()) {
11+
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
12+
}
813

914
def flutterRoot = localProperties.getProperty('flutter.sdk')
1015
if (flutterRoot == null) {
@@ -42,15 +47,22 @@ android {
4247
minSdkVersion 21
4348
targetSdkVersion 33
4449
ndkVersion "25.1.8937393"
50+
multiDexEnabled true
4551
versionCode flutterVersionCode.toInteger()
4652
versionName flutterVersionName
4753
}
4854

55+
signingConfigs {
56+
release {
57+
keyAlias keystoreProperties['keyAlias']
58+
keyPassword keystoreProperties['keyPassword']
59+
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
60+
storePassword keystoreProperties['storePassword']
61+
}
62+
}
4963
buildTypes {
5064
release {
51-
// TODO: Add your own signing config for the release build.
52-
// Signing with the debug keys for now, so `flutter run --release` works.
53-
signingConfig signingConfigs.debug
65+
signingConfig signingConfigs.release
5466
}
5567
}
5668
}

src/MobileApp/android/app/src/main/AndroidManifest.xml

+16-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:tools="http://schemas.android.com/tools"
23
package="com.CSoft.ReachUp">
34
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
45
calls FlutterMain.startInitialization(this); in its onCreate method.
@@ -11,16 +12,28 @@
1112
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
1213
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
1314
<application
14-
android:name="com.CSoft.ReachUp"
15+
android:name="io.flutter.app.FlutterApplication"
1516
android:label="ReachUp"
16-
android:icon="@mipmap/ic_launcher">
17+
android:icon="@mipmap/ic_launcher"
18+
android:exported="true"
19+
tools:node="merge">
20+
<receiver android:name="org.altbeacon.beacon.startup.StartupBroadcastReceiver" android:exported="false"
21+
tools:node="merge">
22+
<intent-filter>
23+
<action android:name="android.intent.action.BOOT_COMPLETED" />
24+
<action android:name="android.intent.action.ACTION_POWER_CONNECTED" />
25+
<action android:name="android.intent.action.ACTION_POWER_DISCONNECTED" />
26+
</intent-filter>
27+
</receiver>
1728
<activity
1829
android:name=".MainActivity"
1930
android:launchMode="singleTop"
2031
android:theme="@style/LaunchTheme"
2132
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
2233
android:hardwareAccelerated="true"
23-
android:windowSoftInputMode="adjustResize">
34+
android:windowSoftInputMode="adjustResize"
35+
android:exported="true"
36+
tools:node="merge">
2437
<!-- Specifies an Android theme to apply to this Activity as soon as
2538
the Android process has started. This theme is visible to the user
2639
while the Flutter UI initializes. After that, this theme continues

src/MobileApp/android/build.gradle

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ buildscript {
22
ext.kotlin_version = '1.6.10'
33
repositories {
44
google()
5+
mavenCentral()
56
jcenter()
67
}
78
dependencies {
@@ -13,6 +14,7 @@ buildscript {
1314
allprojects {
1415
repositories {
1516
google()
17+
mavenCentral()
1618
jcenter()
1719
}
1820
}

src/MobileApp/lib/View/SignView/SignUp.view.dart

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
// @dart=2.9
2+
import 'dart:convert';
3+
4+
import 'package:ReachUp/Component/Database/Database.db.dart';
25
import 'package:ReachUp/Component/Dialog/CustomDialog.component.dart';
36
import 'package:ReachUp/Controller/Account.controller.dart';
47
import 'package:ReachUp/Controller/Category.controller.dart';
@@ -314,11 +317,9 @@ class _StepperBodyState extends State<StepperBody> {
314317
EasyLoading.show(status: "Carregando");
315318
accountController.signUp().then((value) {
316319
EasyLoading.dismiss();
317-
Globals.user = value;
318-
Database.insert(
319-
key: "user",
320-
value: jsonEncode(
321-
Globals.user.toJson()));
320+
Globals.user = value;
321+
Database.insert(
322+
key: "user", value: jsonEncode(Globals.user.toJson()));
322323
});
323324

324325
List<Category> categories = new List<Category>();

src/MobileApp/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Mobile application for indoor location, provides blind and visually
33

44
publish_to: 'none'
55

6-
version: 1.0.0+1
6+
version: 1.0.6+6
77

88
environment:
99
sdk: "2.12.0"

0 commit comments

Comments
 (0)