Skip to content

Commit 0358336

Browse files
authored
Merge pull request #2334 from airqo-platform/staging
move to production
2 parents 8d6d99c + 75ddcd8 commit 0358336

14 files changed

+421
-26
lines changed

.github/workflows/deploy-android-to-play-store.yml

+10-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
if: inputs.android == true
1616
defaults:
1717
run:
18-
working-directory: mobile
18+
working-directory: mobile-v3
1919
steps:
2020
- name: Checkout
2121
uses: "actions/checkout@v4"
@@ -64,8 +64,8 @@ jobs:
6464
- name: Setup Fastlane
6565
uses: ruby/[email protected]
6666
with:
67-
ruby-version: "2.6"
68-
working-directory: mobile/android
67+
ruby-version: "3.1.0"
68+
working-directory: mobile-v3/android
6969

7070
- name: Install bundle
7171
run: |
@@ -78,6 +78,13 @@ jobs:
7878
cd android/
7979
echo $MOBILE_ANDROID_PLAYSTORE_SA > play-store-service-account.json
8080
bundle exec fastlane supply init
81+
mkdir -p fastlane/metadata/android/en-US/changelogs
82+
touch fastlane/metadata/android/en-US/changelogs/default.txt
83+
84+
if [ ! -f fastlane/release_notes.txt ]; then
85+
echo "App release version 3.0.2" > fastlane/release_notes.txt
86+
fi
87+
8188
cat fastlane/release_notes.txt > fastlane/metadata/android/en-US/changelogs/default.txt
8289
bundle exec fastlane android play_store
8390
env:

k8s/platform/values-prod.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ replicaCount: 1
22
image:
33
repository: eu.gcr.io/airqo-250220/airqo-next-platform
44
pullPolicy: Always
5-
tag: prod-a7bacd2e-1733921923
5+
tag: prod-8d6d99cc-1733972271
66
imagePullSecrets: []
77
nameOverride: ''
88
fullnameOverride: ''

k8s/platform/values-stage.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ replicaCount: 1
22
image:
33
repository: eu.gcr.io/airqo-250220/airqo-stage-next-platform
44
pullPolicy: Always
5-
tag: stage-08e71134-1733921733
5+
tag: stage-63c27b02-1733972199
66
imagePullSecrets: []
77
nameOverride: ''
88
fullnameOverride: ''

mobile-v3/.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,7 @@ app.*.map.json
7070
.env
7171
.env.*
7272
*.env
73+
74+
/android/google-services.json
75+
/android/play-store-service-account.json
76+
/android/fastlane/metadata

mobile-v3/android/Gemfile

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
source "https://rubygems.org"
2+
3+
gem "fastlane"
4+
5+
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
6+
eval_gemfile(plugins_path) if File.exist?(plugins_path)

mobile-v3/android/Gemfile.lock

+229
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,229 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
CFPropertyList (3.0.7)
5+
base64
6+
nkf
7+
rexml
8+
addressable (2.8.7)
9+
public_suffix (>= 2.0.2, < 7.0)
10+
artifactory (3.0.17)
11+
atomos (0.1.3)
12+
aws-eventstream (1.3.0)
13+
aws-partitions (1.1022.0)
14+
aws-sdk-core (3.214.0)
15+
aws-eventstream (~> 1, >= 1.3.0)
16+
aws-partitions (~> 1, >= 1.992.0)
17+
aws-sigv4 (~> 1.9)
18+
jmespath (~> 1, >= 1.6.1)
19+
aws-sdk-kms (1.96.0)
20+
aws-sdk-core (~> 3, >= 3.210.0)
21+
aws-sigv4 (~> 1.5)
22+
aws-sdk-s3 (1.176.1)
23+
aws-sdk-core (~> 3, >= 3.210.0)
24+
aws-sdk-kms (~> 1)
25+
aws-sigv4 (~> 1.5)
26+
aws-sigv4 (1.10.1)
27+
aws-eventstream (~> 1, >= 1.0.2)
28+
babosa (1.0.4)
29+
base64 (0.2.0)
30+
claide (1.1.0)
31+
colored (1.2)
32+
colored2 (3.1.2)
33+
commander (4.6.0)
34+
highline (~> 2.0.0)
35+
declarative (0.0.20)
36+
digest-crc (0.6.5)
37+
rake (>= 12.0.0, < 14.0.0)
38+
domain_name (0.6.20240107)
39+
dotenv (2.8.1)
40+
emoji_regex (3.2.3)
41+
excon (0.112.0)
42+
faraday (1.10.4)
43+
faraday-em_http (~> 1.0)
44+
faraday-em_synchrony (~> 1.0)
45+
faraday-excon (~> 1.1)
46+
faraday-httpclient (~> 1.0)
47+
faraday-multipart (~> 1.0)
48+
faraday-net_http (~> 1.0)
49+
faraday-net_http_persistent (~> 1.0)
50+
faraday-patron (~> 1.0)
51+
faraday-rack (~> 1.0)
52+
faraday-retry (~> 1.0)
53+
ruby2_keywords (>= 0.0.4)
54+
faraday-cookie_jar (0.0.7)
55+
faraday (>= 0.8.0)
56+
http-cookie (~> 1.0.0)
57+
faraday-em_http (1.0.0)
58+
faraday-em_synchrony (1.0.0)
59+
faraday-excon (1.1.0)
60+
faraday-httpclient (1.0.1)
61+
faraday-multipart (1.0.4)
62+
multipart-post (~> 2)
63+
faraday-net_http (1.0.2)
64+
faraday-net_http_persistent (1.2.0)
65+
faraday-patron (1.0.0)
66+
faraday-rack (1.0.0)
67+
faraday-retry (1.0.3)
68+
faraday_middleware (1.2.1)
69+
faraday (~> 1.0)
70+
fastimage (2.3.1)
71+
fastlane (2.226.0)
72+
CFPropertyList (>= 2.3, < 4.0.0)
73+
addressable (>= 2.8, < 3.0.0)
74+
artifactory (~> 3.0)
75+
aws-sdk-s3 (~> 1.0)
76+
babosa (>= 1.0.3, < 2.0.0)
77+
bundler (>= 1.12.0, < 3.0.0)
78+
colored (~> 1.2)
79+
commander (~> 4.6)
80+
dotenv (>= 2.1.1, < 3.0.0)
81+
emoji_regex (>= 0.1, < 4.0)
82+
excon (>= 0.71.0, < 1.0.0)
83+
faraday (~> 1.0)
84+
faraday-cookie_jar (~> 0.0.6)
85+
faraday_middleware (~> 1.0)
86+
fastimage (>= 2.1.0, < 3.0.0)
87+
fastlane-sirp (>= 1.0.0)
88+
gh_inspector (>= 1.1.2, < 2.0.0)
89+
google-apis-androidpublisher_v3 (~> 0.3)
90+
google-apis-playcustomapp_v1 (~> 0.1)
91+
google-cloud-env (>= 1.6.0, < 2.0.0)
92+
google-cloud-storage (~> 1.31)
93+
highline (~> 2.0)
94+
http-cookie (~> 1.0.5)
95+
json (< 3.0.0)
96+
jwt (>= 2.1.0, < 3)
97+
mini_magick (>= 4.9.4, < 5.0.0)
98+
multipart-post (>= 2.0.0, < 3.0.0)
99+
naturally (~> 2.2)
100+
optparse (>= 0.1.1, < 1.0.0)
101+
plist (>= 3.1.0, < 4.0.0)
102+
rubyzip (>= 2.0.0, < 3.0.0)
103+
security (= 0.1.5)
104+
simctl (~> 1.6.3)
105+
terminal-notifier (>= 2.0.0, < 3.0.0)
106+
terminal-table (~> 3)
107+
tty-screen (>= 0.6.3, < 1.0.0)
108+
tty-spinner (>= 0.8.0, < 1.0.0)
109+
word_wrap (~> 1.0.0)
110+
xcodeproj (>= 1.13.0, < 2.0.0)
111+
xcpretty (~> 0.4.0)
112+
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
113+
fastlane-plugin-firebase_app_distribution (0.9.1)
114+
google-apis-firebaseappdistribution_v1 (~> 0.3.0)
115+
google-apis-firebaseappdistribution_v1alpha (~> 0.2.0)
116+
fastlane-sirp (1.0.0)
117+
sysrandom (~> 1.0)
118+
gh_inspector (1.1.3)
119+
google-apis-androidpublisher_v3 (0.54.0)
120+
google-apis-core (>= 0.11.0, < 2.a)
121+
google-apis-core (0.11.3)
122+
addressable (~> 2.5, >= 2.5.1)
123+
googleauth (>= 0.16.2, < 2.a)
124+
httpclient (>= 2.8.1, < 3.a)
125+
mini_mime (~> 1.0)
126+
representable (~> 3.0)
127+
retriable (>= 2.0, < 4.a)
128+
rexml
129+
google-apis-firebaseappdistribution_v1 (0.3.0)
130+
google-apis-core (>= 0.11.0, < 2.a)
131+
google-apis-firebaseappdistribution_v1alpha (0.2.0)
132+
google-apis-core (>= 0.11.0, < 2.a)
133+
google-apis-iamcredentials_v1 (0.17.0)
134+
google-apis-core (>= 0.11.0, < 2.a)
135+
google-apis-playcustomapp_v1 (0.13.0)
136+
google-apis-core (>= 0.11.0, < 2.a)
137+
google-apis-storage_v1 (0.31.0)
138+
google-apis-core (>= 0.11.0, < 2.a)
139+
google-cloud-core (1.7.1)
140+
google-cloud-env (>= 1.0, < 3.a)
141+
google-cloud-errors (~> 1.0)
142+
google-cloud-env (1.6.0)
143+
faraday (>= 0.17.3, < 3.0)
144+
google-cloud-errors (1.4.0)
145+
google-cloud-storage (1.47.0)
146+
addressable (~> 2.8)
147+
digest-crc (~> 0.4)
148+
google-apis-iamcredentials_v1 (~> 0.1)
149+
google-apis-storage_v1 (~> 0.31.0)
150+
google-cloud-core (~> 1.6)
151+
googleauth (>= 0.16.2, < 2.a)
152+
mini_mime (~> 1.0)
153+
googleauth (1.8.1)
154+
faraday (>= 0.17.3, < 3.a)
155+
jwt (>= 1.4, < 3.0)
156+
multi_json (~> 1.11)
157+
os (>= 0.9, < 2.0)
158+
signet (>= 0.16, < 2.a)
159+
highline (2.0.3)
160+
http-cookie (1.0.8)
161+
domain_name (~> 0.5)
162+
httpclient (2.8.3)
163+
jmespath (1.6.2)
164+
json (2.9.0)
165+
jwt (2.9.3)
166+
base64
167+
mini_magick (4.13.2)
168+
mini_mime (1.1.5)
169+
multi_json (1.15.0)
170+
multipart-post (2.4.1)
171+
nanaimo (0.4.0)
172+
naturally (2.2.1)
173+
nkf (0.2.0)
174+
optparse (0.6.0)
175+
os (1.1.4)
176+
plist (3.7.1)
177+
public_suffix (6.0.1)
178+
rake (13.2.1)
179+
representable (3.2.0)
180+
declarative (< 0.1.0)
181+
trailblazer-option (>= 0.1.1, < 0.2.0)
182+
uber (< 0.2.0)
183+
retriable (3.1.2)
184+
rexml (3.3.9)
185+
rouge (3.28.0)
186+
ruby2_keywords (0.0.5)
187+
rubyzip (2.3.2)
188+
security (0.1.5)
189+
signet (0.19.0)
190+
addressable (~> 2.8)
191+
faraday (>= 0.17.5, < 3.a)
192+
jwt (>= 1.5, < 3.0)
193+
multi_json (~> 1.10)
194+
simctl (1.6.10)
195+
CFPropertyList
196+
naturally
197+
sysrandom (1.0.5)
198+
terminal-notifier (2.0.0)
199+
terminal-table (3.0.2)
200+
unicode-display_width (>= 1.1.1, < 3)
201+
trailblazer-option (0.1.2)
202+
tty-cursor (0.7.1)
203+
tty-screen (0.8.2)
204+
tty-spinner (0.9.3)
205+
tty-cursor (~> 0.7)
206+
uber (0.1.0)
207+
unicode-display_width (2.6.0)
208+
word_wrap (1.0.0)
209+
xcodeproj (1.27.0)
210+
CFPropertyList (>= 2.3.3, < 4.0)
211+
atomos (~> 0.1.3)
212+
claide (>= 1.0.2, < 2.0)
213+
colored2 (~> 3.1)
214+
nanaimo (~> 0.4.0)
215+
rexml (>= 3.3.6, < 4.0)
216+
xcpretty (0.4.0)
217+
rouge (~> 3.28.0)
218+
xcpretty-travis-formatter (1.0.1)
219+
xcpretty (~> 0.2, >= 0.0.7)
220+
221+
PLATFORMS
222+
x64-mingw-ucrt
223+
224+
DEPENDENCIES
225+
fastlane
226+
fastlane-plugin-firebase_app_distribution
227+
228+
BUNDLED WITH
229+
2.5.22

mobile-v3/android/app/build.gradle

+50-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@ secrets {
2222
ignoreList.add("sdk.*") // Ignore all keys matching the regexp "sdk.*"
2323
}
2424

25+
26+
def appProperties = new Properties()
27+
def appPropertiesFile = rootProject.file('key.properties')
28+
if (appPropertiesFile.exists()) {
29+
appPropertiesFile.withReader('UTF-8') { reader ->
30+
appProperties.load(reader)
31+
}
32+
}
33+
2534
def localProperties = new Properties()
2635
def localPropertiesFile = rootProject.file('local.properties')
2736
if (localPropertiesFile.exists()) {
@@ -30,6 +39,16 @@ if (localPropertiesFile.exists()) {
3039
}
3140
}
3241

42+
def googleMapApiKey = appProperties.getProperty('google.maps.key')
43+
if (googleMapApiKey == null) {
44+
throw new GradleException("Google Maps Key not found. Define google.maps.key in the key.properties file.")
45+
}
46+
47+
def googleMapApiKeyDev = appProperties.getProperty('google.maps.key.dev')
48+
if (googleMapApiKeyDev == null) {
49+
throw new GradleException("Google Maps Key not found. Define google.maps.key_dev in the key.properties file.")
50+
}
51+
3352
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
3453
if (flutterVersionCode == null) {
3554
flutterVersionCode = '1'
@@ -40,6 +59,12 @@ if (flutterVersionName == null) {
4059
flutterVersionName = '1.0'
4160
}
4261

62+
def releaseKeystoreProperties = new Properties()
63+
def releaseKeystorePropertiesFile = rootProject.file('prod-key.properties')
64+
if (releaseKeystorePropertiesFile.exists()) {
65+
releaseKeystoreProperties.load(new FileInputStream(releaseKeystorePropertiesFile))
66+
}
67+
4368
android {
4469
namespace "com.airqo.app"
4570
compileSdk 34
@@ -69,11 +94,35 @@ android {
6994
versionName flutterVersionName
7095
}
7196

97+
flavorDimensions "airqo"
98+
productFlavors {
99+
airqo {
100+
dimension "airqo"
101+
manifestPlaceholders = [googleMapsKey:googleMapApiKey]
102+
}
103+
104+
airqodev {
105+
dimension "airqo"
106+
applicationIdSuffix ".dev"
107+
manifestPlaceholders = [googleMapsKey:googleMapApiKeyDev]
108+
}
109+
110+
}
111+
112+
signingConfigs {
113+
release {
114+
keyAlias releaseKeystoreProperties['keyAlias']
115+
keyPassword releaseKeystoreProperties['keyPassword']
116+
storeFile releaseKeystoreProperties['storeFile'] ? file(releaseKeystoreProperties['storeFile']) : null
117+
storePassword releaseKeystoreProperties['storePassword']
118+
}
119+
}
120+
72121
buildTypes {
73122
release {
74123
// TODO: Add your own signing config for the release build.
75124
// Signing with the debug keys for now, so `flutter run --release` works.
76-
signingConfig signingConfigs.debug
125+
signingConfig signingConfigs.release
77126
}
78127
}
79128
}

mobile-v3/android/fastlane/Appfile

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
json_key_file("play-store-service-account.json") # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one
2+
package_name("com.airqo.app") # e.g. com.krausefx.app

0 commit comments

Comments
 (0)