Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ android {
versionName = "v4.1.1"

multiDexEnabled = true
base.archivesName.set("${defaultConfig.versionName}(${defaultConfig.versionCode})")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bring back this


testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

Expand Down Expand Up @@ -123,10 +124,13 @@ android {
applicationId = "ltd.grunt.brainwallet.screengrab"
versionNameSuffix = "-screengrab"
resValue("string", "app_name", "Brainwallet (screengrab)")
buildConfigField("String[]", "SCREENGRAB_PAPERKEY",
"new String[] {${localProperties.getProperty("SCREENGRAB_PAPERKEY", "")
.split(" ")
.joinToString { "\"$it\"" }}}")
buildConfigField("String[]", "SCREENGRAB_PAPERKEY",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just reformat code

"new String[] {${
localProperties.getProperty("SCREENGRAB_PAPERKEY", "")
.split(" ")
.joinToString { "\"$it\"" }
}}"
)

externalNativeBuild {
cmake {
Expand Down Expand Up @@ -256,4 +260,4 @@ tasks.register<JavaExec>("ktlintFormat") {
"**.kts",
"!**/build/**",
)
}
}
27 changes: 23 additions & 4 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,30 @@ platform :android do
gradle(
tasks: ['clean', 'assembleScreengrabDebug', 'assembleScreengrabAndroidTest']
)
build_dir = "#{ENV['PWD']}/app/build/"
UI.message "Build directory: #{build_dir}"

# Check if APK files exist
app_apk = "#{build_dir}/outputs/apk/screengrab/debug/*screengrab-debug.apk"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will find the apk using suffix here

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it

test_apk = "#{build_dir}/outputs/apk/androidTest/screengrab/debug/*screengrab-debug-androidTest.apk"

app_apks = Dir.glob(app_apk)
test_apks = Dir.glob(test_apk)
if app_apks.empty?
UI.user_error!("App APK file not found. Please check the build output directory.")
end

if test_apks.empty?
UI.user_error!("Test APK file not found. Please check the build output directory.")
end
app_apk = app_apks.first
test_apk = test_apks.first

screengrab(
clear_previous_screenshots: true,
app_package_name: 'ltd.grunt.brainwallet.screengrab',
app_apk_path: "app/build/outputs/apk/screengrab/debug/app-screengrab-debug.apk",
tests_apk_path: "app/build/outputs/apk/androidTest/screengrab/debug/app-screengrab-debug-androidTest.apk"
clear_previous_screenshots: true,
app_package_name: 'ltd.grunt.brainwallet.screengrab',
app_apk_path: app_apk,
tests_apk_path: test_apk
)
end

Expand Down