feat: release to playstore configuration

This commit is contained in:
Supan Adit Pratama 2025-02-04 19:41:53 +07:00
parent 3f9a75ec73
commit f3d7ad2db0
2 changed files with 20 additions and 4 deletions

View File

@ -5,6 +5,12 @@ plugins {
id "dev.flutter.flutter-gradle-plugin"
}
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
namespace = "com.supanadit.geosmart"
compileSdk = flutter.compileSdkVersion
@ -30,11 +36,20 @@ android {
versionName = flutter.versionName
}
signingConfigs {
release {
keyAlias = keystoreProperties['keyAlias']
keyPassword = keystoreProperties['keyPassword']
storeFile = keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
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
}
}
}

View File

@ -37,6 +37,7 @@ class _MapPageState extends State<MapPage> {
}
});
});
Geolocator.getPositionStream().listen((Position position) {
if (isTracking && isGranted) {
BlocProvider.of<PositionBloc>(context).add(
@ -85,13 +86,15 @@ class _MapPageState extends State<MapPage> {
},
),
Container(
child: Image.asset("assets/images/logo.png"),
width: 70,
height: 70,
alignment: Alignment.topLeft,
margin: EdgeInsets.only(left: 10.0),
child: Image.asset("assets/images/logo.png"),
),
Container(
margin: EdgeInsets.only(bottom: 50.0),
alignment: Alignment.bottomCenter,
child: TextButton(
style: TextButton.styleFrom(
backgroundColor: (state is PositionTrackingStarted)
@ -119,8 +122,6 @@ class _MapPageState extends State<MapPage> {
style: TextStyle(color: Colors.white),
),
),
margin: EdgeInsets.only(bottom: 50.0),
alignment: Alignment.bottomCenter,
)
],
);