Skip to content

Commit a7a2572

Browse files
committed
android ios fasltane process complete
1 parent 8f02385 commit a7a2572

File tree

25 files changed

+761
-62
lines changed

25 files changed

+761
-62
lines changed

android/Gemfile

Lines changed: 6 additions & 0 deletions
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)

android/Gemfile.lock

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
CFPropertyList (3.0.2)
5+
addressable (2.7.0)
6+
public_suffix (>= 2.0.2, < 5.0)
7+
atomos (0.1.3)
8+
aws-eventstream (1.1.0)
9+
aws-partitions (1.363.0)
10+
aws-sdk-core (3.105.0)
11+
aws-eventstream (~> 1, >= 1.0.2)
12+
aws-partitions (~> 1, >= 1.239.0)
13+
aws-sigv4 (~> 1.1)
14+
jmespath (~> 1.0)
15+
aws-sdk-kms (1.37.0)
16+
aws-sdk-core (~> 3, >= 3.99.0)
17+
aws-sigv4 (~> 1.1)
18+
aws-sdk-s3 (1.79.1)
19+
aws-sdk-core (~> 3, >= 3.104.3)
20+
aws-sdk-kms (~> 1)
21+
aws-sigv4 (~> 1.1)
22+
aws-sigv4 (1.2.2)
23+
aws-eventstream (~> 1, >= 1.0.2)
24+
babosa (1.0.3)
25+
claide (1.0.3)
26+
colored (1.2)
27+
colored2 (3.1.2)
28+
commander-fastlane (4.4.6)
29+
highline (~> 1.7.2)
30+
declarative (0.0.20)
31+
declarative-option (0.1.0)
32+
digest-crc (0.6.1)
33+
rake (~> 13.0)
34+
domain_name (0.5.20190701)
35+
unf (>= 0.0.5, < 1.0.0)
36+
dotenv (2.7.6)
37+
emoji_regex (3.0.0)
38+
excon (0.76.0)
39+
faraday (1.0.1)
40+
multipart-post (>= 1.2, < 3)
41+
faraday-cookie_jar (0.0.6)
42+
faraday (>= 0.7.4)
43+
http-cookie (~> 1.0.0)
44+
faraday_middleware (1.0.0)
45+
faraday (~> 1.0)
46+
fastimage (2.2.0)
47+
fastlane (2.157.2)
48+
CFPropertyList (>= 2.3, < 4.0.0)
49+
addressable (>= 2.3, < 3.0.0)
50+
aws-sdk-s3 (~> 1.0)
51+
babosa (>= 1.0.3, < 2.0.0)
52+
bundler (>= 1.12.0, < 3.0.0)
53+
colored
54+
commander-fastlane (>= 4.4.6, < 5.0.0)
55+
dotenv (>= 2.1.1, < 3.0.0)
56+
emoji_regex (>= 0.1, < 4.0)
57+
excon (>= 0.71.0, < 1.0.0)
58+
faraday (~> 1.0)
59+
faraday-cookie_jar (~> 0.0.6)
60+
faraday_middleware (~> 1.0)
61+
fastimage (>= 2.1.0, < 3.0.0)
62+
gh_inspector (>= 1.1.2, < 2.0.0)
63+
google-api-client (>= 0.37.0, < 0.39.0)
64+
google-cloud-storage (>= 1.15.0, < 2.0.0)
65+
highline (>= 1.7.2, < 2.0.0)
66+
json (< 3.0.0)
67+
jwt (>= 2.1.0, < 3)
68+
mini_magick (>= 4.9.4, < 5.0.0)
69+
multipart-post (~> 2.0.0)
70+
plist (>= 3.1.0, < 4.0.0)
71+
rubyzip (>= 2.0.0, < 3.0.0)
72+
security (= 0.1.3)
73+
simctl (~> 1.6.3)
74+
slack-notifier (>= 2.0.0, < 3.0.0)
75+
terminal-notifier (>= 2.0.0, < 3.0.0)
76+
terminal-table (>= 1.4.5, < 2.0.0)
77+
tty-screen (>= 0.6.3, < 1.0.0)
78+
tty-spinner (>= 0.8.0, < 1.0.0)
79+
word_wrap (~> 1.0.0)
80+
xcodeproj (>= 1.13.0, < 2.0.0)
81+
xcpretty (~> 0.3.0)
82+
xcpretty-travis-formatter (>= 0.0.3)
83+
fastlane-plugin-properties (1.1.2)
84+
java-properties
85+
gh_inspector (1.1.3)
86+
google-api-client (0.38.0)
87+
addressable (~> 2.5, >= 2.5.1)
88+
googleauth (~> 0.9)
89+
httpclient (>= 2.8.1, < 3.0)
90+
mini_mime (~> 1.0)
91+
representable (~> 3.0)
92+
retriable (>= 2.0, < 4.0)
93+
signet (~> 0.12)
94+
google-cloud-core (1.5.0)
95+
google-cloud-env (~> 1.0)
96+
google-cloud-errors (~> 1.0)
97+
google-cloud-env (1.3.3)
98+
faraday (>= 0.17.3, < 2.0)
99+
google-cloud-errors (1.0.1)
100+
google-cloud-storage (1.28.0)
101+
addressable (~> 2.5)
102+
digest-crc (~> 0.4)
103+
google-api-client (~> 0.33)
104+
google-cloud-core (~> 1.2)
105+
googleauth (~> 0.9)
106+
mini_mime (~> 1.0)
107+
googleauth (0.13.1)
108+
faraday (>= 0.17.3, < 2.0)
109+
jwt (>= 1.4, < 3.0)
110+
memoist (~> 0.16)
111+
multi_json (~> 1.11)
112+
os (>= 0.9, < 2.0)
113+
signet (~> 0.14)
114+
highline (1.7.10)
115+
http-cookie (1.0.3)
116+
domain_name (~> 0.5)
117+
httpclient (2.8.3)
118+
java-properties (0.2.1)
119+
jmespath (1.4.0)
120+
json (2.3.1)
121+
jwt (2.2.2)
122+
memoist (0.16.2)
123+
mini_magick (4.10.1)
124+
mini_mime (1.0.2)
125+
multi_json (1.15.0)
126+
multipart-post (2.0.0)
127+
nanaimo (0.3.0)
128+
naturally (2.2.0)
129+
os (1.1.1)
130+
plist (3.5.0)
131+
public_suffix (4.0.5)
132+
rake (13.0.1)
133+
representable (3.0.4)
134+
declarative (< 0.1.0)
135+
declarative-option (< 0.2.0)
136+
uber (< 0.2.0)
137+
retriable (3.1.2)
138+
rouge (2.0.7)
139+
rubyzip (2.3.0)
140+
security (0.1.3)
141+
signet (0.14.0)
142+
addressable (~> 2.3)
143+
faraday (>= 0.17.3, < 2.0)
144+
jwt (>= 1.5, < 3.0)
145+
multi_json (~> 1.10)
146+
simctl (1.6.8)
147+
CFPropertyList
148+
naturally
149+
slack-notifier (2.3.2)
150+
terminal-notifier (2.0.0)
151+
terminal-table (1.8.0)
152+
unicode-display_width (~> 1.1, >= 1.1.1)
153+
tty-cursor (0.7.1)
154+
tty-screen (0.8.1)
155+
tty-spinner (0.9.3)
156+
tty-cursor (~> 0.7)
157+
uber (0.1.0)
158+
unf (0.1.4)
159+
unf_ext
160+
unf_ext (0.0.7.7)
161+
unicode-display_width (1.7.0)
162+
word_wrap (1.0.0)
163+
xcodeproj (1.18.0)
164+
CFPropertyList (>= 2.3.3, < 4.0)
165+
atomos (~> 0.1.3)
166+
claide (>= 1.0.2, < 2.0)
167+
colored2 (~> 3.1)
168+
nanaimo (~> 0.3.0)
169+
xcpretty (0.3.0)
170+
rouge (~> 2.0.7)
171+
xcpretty-travis-formatter (1.0.0)
172+
xcpretty (~> 0.2, >= 0.0.7)
173+
174+
PLATFORMS
175+
ruby
176+
177+
DEPENDENCIES
178+
fastlane
179+
fastlane-plugin-properties
180+
181+
BUNDLED WITH
182+
2.1.4

android/app/build.gradle

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ apply plugin: 'com.android.application'
2525
apply plugin: 'kotlin-android'
2626
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2727

28+
def keystoreProperties = new Properties()
29+
def keystorePropertiesFile = rootProject.file('key.properties')
30+
if (keystorePropertiesFile.exists()) {
31+
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
32+
}
33+
2834
android {
2935
compileSdkVersion 28
3036

@@ -38,18 +44,25 @@ android {
3844

3945
defaultConfig {
4046
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
41-
applicationId "com.example.fluttermvvmtemplate"
47+
applicationId "com.hwa.fluttermvvmtemplate"
4248
minSdkVersion 16
43-
targetSdkVersion 28
49+
targetSdkVersion 29
4450
versionCode flutterVersionCode.toInteger()
4551
versionName flutterVersionName
4652
}
4753

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

android/app/src/debug/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.example.fluttermvvmtemplate">
2+
package="com.hwa.fluttermvvmtemplate">
33
<!-- Flutter needs it to communicate with the running application
44
to allow setting breakpoints, to provide hot reload, etc.
55
-->

android/app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.example.fluttermvvmtemplate">
2+
package="com.hwa.fluttermvvmtemplate">
33
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
44
calls FlutterMain.startInitialization(this); in its onCreate method.
55
In most cases you can leave this as-is, but you if you want to provide
@@ -10,7 +10,7 @@
1010
android:label="fluttermvvmtemplate"
1111
android:icon="@mipmap/ic_launcher">
1212
<activity
13-
android:name=".MainActivity"
13+
android:name="com.hwa.fluttermvvmtemplate.MainActivity"
1414
android:launchMode="singleTop"
1515
android:theme="@style/LaunchTheme"
1616
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"

android/app/src/main/kotlin/com/example/fluttermvvmtemplate/MainActivity.kt renamed to android/app/src/main/kotlin/com/hwa/fluttermvvmtemplate/MainActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.example.fluttermvvmtemplate
1+
package com.hwa.fluttermvvmtemplate
22

33
import io.flutter.embedding.android.FlutterActivity
44

android/app/src/profile/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.example.fluttermvvmtemplate">
2+
package="com.hwa.fluttermvvmtemplate">
33
<!-- Flutter needs it to communicate with the running application
44
to allow setting breakpoints, to provide hot reload, etc.
55
-->

android/fastlane/Appfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
json_key_file("secret/api-5970835861059463279-389763-87711522f0cb.json") # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one
2+
package_name("com.hwa.fluttermvvmtemplate") # e.g. com.krausefx.app

android/fastlane/Fastfile

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# This file contains the fastlane.tools configuration
2+
# You can find the documentation at https://docs.fastlane.tools
3+
#
4+
# For a list of all available actions, check out
5+
#
6+
# https://docs.fastlane.tools/actions
7+
#
8+
# For a list of all available plugins, check out
9+
#
10+
# https://docs.fastlane.tools/plugins/available-plugins
11+
#
12+
13+
# Uncomment the line if you want fastlane to automatically update itself
14+
# update_fastlane
15+
16+
default_platform(:android)
17+
18+
ENV_PATH = "../asset/app/.env"
19+
ANDROID_VERSION_NAME = "androidVersionName"
20+
APP_BUNDLE_PATH = "../build/app/outputs/bundle/release/app-release.aab"
21+
INTERNAL = "internal"
22+
23+
platform :android do
24+
desc "Deploy to internal test application"
25+
lane :internal do |options|
26+
versionNumberArrayLength = google_play_track_version_codes(track:INTERNAL)
27+
versionNumber = (versionNumberArrayLength.length > 0 ? versionNumberArrayLength[0] : 0).to_i + 1
28+
incerementVersion version: options[:version]
29+
setVersionNumber versionNumber: options[:versionNumber]
30+
versionName = getVersionName()
31+
flutter_build(versionName,versionNumber)
32+
buildStore(INTERNAL)
33+
end
34+
35+
private_lane :setVersionNumber do |options|
36+
if options[:versionNumber] != nil
37+
set_properties_value(
38+
key: ANDROID_VERSION_NAME,
39+
path: ENV_PATH,
40+
value: options[:versionNumber]
41+
)
42+
end
43+
end
44+
45+
def buildStore(track)
46+
upload_to_play_store(
47+
track: track,
48+
aab: APP_BUNDLE_PATH
49+
)
50+
end
51+
52+
private_lane :incerementVersion do |options|
53+
if options[:version] != nil
54+
increment_version_name_in_properties_file(
55+
key: ANDROID_VERSION_NAME,
56+
path: ENV_PATH,
57+
update_type: options[:version]
58+
)
59+
end
60+
end
61+
62+
def getVersionName
63+
return get_properties_value(
64+
key: ANDROID_VERSION_NAME,
65+
path: ENV_PATH
66+
)
67+
end
68+
69+
def flutter_build(versionName,number)
70+
71+
Dir.chdir '../../' do
72+
sh('flutter', 'packages', 'get')
73+
sh('flutter', 'clean')
74+
sh(
75+
"flutter build appbundle --build-name=#{
76+
versionName
77+
} --build-number=#{number.to_s}"
78+
)
79+
end
80+
end
81+
82+
end

android/fastlane/Pluginfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Autogenerated by fastlane
2+
#
3+
# Ensure this file is checked in to source control!
4+
5+
gem 'fastlane-plugin-properties'

0 commit comments

Comments
 (0)