Skip to content

Commit

Permalink
Test commit 9
Browse files Browse the repository at this point in the history
  • Loading branch information
mahmoud-elmorabea committed Oct 24, 2024
1 parent 0329b74 commit e1b27e8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-sample-app-for-sdk-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
with:
lane: 'android build_sample_app_for_sdk_release'
subdirectory: "samples/java_layout"
options: '{ "sdk_version": "4.3.0", "build_time": "2024-10-24T14:46:10+03:00" }'
options: '{ "sdk_version": "4.3.0" }'
env:
ANDROID_SIGNING_ALIAS: ${{ secrets.ANDROID_SIGNING_ALIAS }}
ANDROID_SIGNING_KEY_PASSWORD: ${{ secrets.ANDROID_SIGNING_KEY_PASSWORD }}
Expand Down
20 changes: 6 additions & 14 deletions samples/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,25 +60,17 @@ platform :android do
end

lane :build_sample_app_for_sdk_release do |values|

path_to_root_directory_sample_app = File.expand_path('../', Dir.pwd) # We are currently in `samples/N/fastlane/` and we need the directory name `samples/N``
name_of_sample_app_module = File.basename(path_to_root_directory_sample_app) # just get the name of the directory I am in now. `samples/N`

# Apps use `build.gradle` or `build.kts`. This wildcard lookup is used to get the absolute path to one of these files present
path_to_app_gradle_file = File.expand_path(Dir.glob("../build.*").first, Dir.pwd)

build_time = Time.parse(values[:build_time])

new_app_version = values[:sdk_version]
new_build_number = build_time.to_i.to_s
new_build_number = get_new_build_version()
build_notes = get_build_notes()
test_groups = 'public'
app_package_name = CredentialsManager::AppfileConfig.try_fetch_value(:package_name)

UI.important(find_firebase_app_id(app_identifier: app_package_name))
app_package_name = 'io.customer.android.sample.java_layout'

# Modify the source code with the new app version and build number before we compile the iOS app. This is a good idea to do to make installing builds on a test device easier.
# The iOS OS might give errors when trying to install a build of an app if the app is already installed on the device. Having unique build number or app version can avoid those errors.
# Modify the source code with the new app version and build number before we compile the Android app. This is a good idea to do to make installing builds on a test device easier.
# The Android OS might give errors when trying to install a build of an app if the app is already installed on the device. Having unique build number or app version can avoid those errors.
android_set_version_name(
version_name: new_app_version,
gradle_file: path_to_app_gradle_file
Expand All @@ -89,7 +81,7 @@ platform :android do
)

build_android_app(
task: ":samples:#{name_of_sample_app_module}:assemble",
task: ":samples:java_layout:assemble",
build_type: 'Release',
gradle_path: '../../gradlew' # path to root directory of the SDK. Where gradlew is located
)
Expand All @@ -103,7 +95,7 @@ platform :android do
)

firebase_app_distribution(
app: find_firebase_app_id(app_identifier: app_package_name), # Firebase app id is required. Get it from google-services.json file
app: find_firebase_app_id(app_identifier: app_package_name),
service_credentials_file: service_credentials_file_path,
groups: test_groups,
release_notes: build_notes
Expand Down

0 comments on commit e1b27e8

Please sign in to comment.