Skip to content

Commit

Permalink
chore: save sample app artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
maureenorea-clores authored Nov 29, 2023
1 parent b64f5b1 commit 3046172
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
18 changes: 17 additions & 1 deletion bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ workflows:
- content: |-
bundle install
bundle exec danger --dangerfile=config/danger/Dangerfile
- script@1:
title: Retrieve sample app Base64 key and save to file
inputs:
- content: |-
if [[ "$SAMPLE_APP_RELEASE_KEY_BASE64" != "" ]]; then
base64 -d <<< "$SAMPLE_APP_RELEASE_KEY_BASE64" > ./sdk-utils-sample-releasekey.keystore
fi
- script@1:
title: Assemble
inputs:
Expand All @@ -54,7 +61,16 @@ workflows:
- test_name: "${SDK_PATH}_release"
- base_path: "$SDK_PATH/build/test-results/testReleaseUnitTest/"
- search_pattern: "*"
- deploy-to-bitrise-io@2: {}
- deploy-to-bitrise-io@2:
is_always_run: false
inputs:
- is_enable_public_page: 'false'
- deploy_path: sample/build/outputs/apk/debug/sdk-utils-sample-debug.apk
- deploy-to-bitrise-io@2:
is_always_run: false
inputs:
- is_enable_public_page: 'false'
- deploy_path: sample/build/outputs/apk/release/sdk-utils-sample-release.apk
- cache-push@2:
inputs:
- cache_paths: |-
Expand Down
26 changes: 26 additions & 0 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
def property = { key ->
return System.getenv(key) ?: (project.hasProperty(key) ? project."$key" : "")
}

defaultConfig {
applicationId "com.rakuten.tech.mobile.sdkutils.sample"
versionCode 1
Expand All @@ -23,6 +27,28 @@ android {
jvmTarget = JavaVersion.toVersion(CONFIG.versions.java).toString()
}

applicationVariants.all { variant ->
variant.outputs.all { output ->
outputFileName = "sdk-utils-sample-${variant.name}.apk"
}
}

signingConfigs {
release {
storeFile file('../sdk-utils-sample-releasekey.keystore')
storePassword property("SAMPLE_APP_RELEASE_PASSWORD")
keyAlias property("SAMPLE_APP_RELEASE_ALIAS")
keyPassword property("SAMPLE_APP_RELEASE_PASSWORD")
}
}

buildTypes {
release {
minifyEnabled true
debuggable false
signingConfig signingConfigs.release
}
}
}

dependencies {
Expand Down

0 comments on commit 3046172

Please sign in to comment.