-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from tonkeeper/dev
Dev
- Loading branch information
Showing
7 changed files
with
170 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
object Signing { | ||
|
||
object Debug { | ||
const val storeFile = "debug.keystore" | ||
const val storePassword = "android" | ||
const val keyAlias = "androiddebugkey" | ||
const val keyPassword = "android" | ||
|
||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
app_identifier('com.ton_keeper') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
# This file contains the fastlane.tools configuration | ||
# You can find the documentation at https://docs.fastlane.tools | ||
# | ||
# For a list of all available actions, check out | ||
# | ||
# https://docs.fastlane.tools/actions | ||
# | ||
# For a list of all available plugins, check out | ||
# | ||
# https://docs.fastlane.tools/plugins/available-plugins | ||
# | ||
|
||
# Uncomment the line if you want fastlane to automatically update itself | ||
# update_fastlane | ||
|
||
|
||
platform :android do | ||
desc "Fetches the latest version code from the Play Console and increments it by 1" | ||
lane :fetch_and_increment_build_number do | ||
app_identifier = CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier) | ||
|
||
internal_version_codes = google_play_track_version_codes( | ||
package_name: app_identifier, | ||
track: "internal", | ||
json_key_data: ENV["ANDROID_PUBLISHER_CREDENTIALS"] | ||
) | ||
|
||
production_version_codes = google_play_track_version_codes( | ||
package_name: app_identifier, | ||
json_key_data: ENV["ANDROID_PUBLISHER_CREDENTIALS"] | ||
) | ||
|
||
max = internal_version_codes[0] > production_version_codes[0] ? internal_version_codes[0] : production_version_codes[0] | ||
updated_version_code = max + 1 | ||
|
||
increment_version_code( | ||
gradle_file_path: "./apps/wallet/instance/main/build.gradle.kts", | ||
version_code: updated_version_code | ||
) | ||
|
||
sh("echo VERSION_CODE=#{updated_version_code} >> $GITHUB_ENV") | ||
end | ||
|
||
desc "Start android baselineprofile" | ||
lane :baseline do | ||
gradle( | ||
tasks: [":baselineprofile:main:generateBaselineProfile"] | ||
) | ||
end | ||
|
||
desc "Build the android aab for release" | ||
lane :build_release do | ||
gradle( | ||
task: ":apps:wallet:instance:main:bundle", | ||
build_type: "Release", | ||
properties: { | ||
"android.injected.signing.store.file" => ENV["KEYSTORE_FILE"], | ||
"android.injected.signing.store.password" => ENV["KEYSTORE_PASSWORD"], | ||
"android.injected.signing.key.alias" => ENV["KEY_ALIAS"], | ||
"android.injected.signing.key.password" => ENV["KEY_PASSWORD"], | ||
} | ||
) | ||
|
||
puts "Debug" | ||
puts Actions.lane_context[SharedValues::GRADLE_AAB_OUTPUT_PATH] | ||
puts Actions.lane_context[SharedValues::GRADLE_ALL_AAB_OUTPUT_PATHS] | ||
puts Actions.lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH] | ||
puts Actions.lane_context[SharedValues::GRADLE_ALL_APK_OUTPUT_PATHS] | ||
|
||
sh("echo AAB_OUTPUT_PATH=#{Actions.lane_context[SharedValues::GRADLE_AAB_OUTPUT_PATH]} >> $GITHUB_ENV") | ||
end | ||
|
||
desc "Build the android apk" | ||
lane :assemble_release do | ||
gradle( | ||
task: ":apps:wallet:instance:main:assemble", | ||
build_type: "Release", | ||
properties: { | ||
"android.injected.signing.store.file" => ENV["KEYSTORE_FILE"], | ||
"android.injected.signing.store.password" => ENV["KEYSTORE_PASSWORD"], | ||
"android.injected.signing.key.alias" => ENV["KEY_ALIAS"], | ||
"android.injected.signing.key.password" => ENV["KEY_PASSWORD"], | ||
} | ||
) | ||
|
||
puts "Debug" | ||
puts Actions.lane_context[SharedValues::GRADLE_AAB_OUTPUT_PATH] | ||
puts Actions.lane_context[SharedValues::GRADLE_ALL_AAB_OUTPUT_PATHS] | ||
puts Actions.lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH] | ||
puts Actions.lane_context[SharedValues::GRADLE_ALL_APK_OUTPUT_PATHS] | ||
|
||
sh("echo APK_OUTPUT_PATH=#{Actions.lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH]} >> $GITHUB_ENV") | ||
end | ||
|
||
desc "Upload to GooglePlay" | ||
lane :upload_release do | ||
aab_path = lane_context[SharedValues::GRADLE_AAB_OUTPUT_PATH] | ||
app_identifier = CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier) | ||
|
||
upload_to_play_store( | ||
track: "internal", | ||
json_key_data: ENV["ANDROID_PUBLISHER_CREDENTIALS"], | ||
aab: aab_path, | ||
package_name: app_identifier, | ||
) | ||
end | ||
|
||
desc "Build and upload to GooglePlay" | ||
lane :beta do | ||
fetch_and_increment_build_number | ||
build_release | ||
upload_release | ||
|
||
assemble_release | ||
end | ||
end | ||
|