From ab9ac18f49a90e23ee7a10e5a2460f15c76974a0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Beno=C3=AEt=20Harrault?= <benoit@harrault.fr>
Date: Mon, 15 Mar 2021 14:32:40 +0100
Subject: [PATCH] Fix apk output filename

---
 .gitlab-ci.yml           | 3 +--
 android/app/build.gradle | 6 +++---
 pubspec.yaml             | 2 +-
 3 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9a89813..a2e30ad 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -34,10 +34,9 @@ android:build:
     - echo keyPassword=$ANDROID_KEY_PASSWORD >> android/key.properties
     # build flutter app
     - flutter build apk
-    - mv build/app/outputs/apk/release/app-release.apk build/app/outputs/apk/release/app-hangman-release.apk
   artifacts:
     paths:
-    - build/app/outputs/apk/release/app-hangman-release.apk
+    - build/app/outputs/apk/release
     expire_in: 1 week
   interruptible: true
 
diff --git a/android/app/build.gradle b/android/app/build.gradle
index d934145..5449d7c 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -13,12 +13,12 @@ if (flutterRoot == null) {
 
 def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
 if (flutterVersionCode == null) {
-    flutterVersionCode = '6'
+    flutterVersionCode = '1'
 }
 
 def flutterVersionName = localProperties.getProperty('flutter.versionName')
 if (flutterVersionName == null) {
-    flutterVersionName = '1.5'
+    flutterVersionName = '1.0'
 }
 
 apply plugin: 'com.android.application'
@@ -38,12 +38,12 @@ android {
     }
 
     defaultConfig {
-        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
         applicationId "org.benoitharrault.hangman"
         minSdkVersion 21
         targetSdkVersion 29
         versionCode flutterVersionCode.toInteger()
         versionName flutterVersionName
+        archivesBaseName = "$applicationId-v$versionName+$versionCode"
     }
 
     signingConfigs {
diff --git a/pubspec.yaml b/pubspec.yaml
index e1a88c3..4983a15 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -3,7 +3,7 @@ description: Hangman game, have fun with words and letters!
 
 publish_to: 'none' # Remove this line if you wish to publish to pub.dev
 
-version: 1.1.2
+version: 1.1.3+1
 
 environment:
   sdk: ">=2.7.0 <3.0.0"
-- 
GitLab