-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit '3c7196f74c896770961329ca936a57506fddc773' into feature/…
…MOB-257-weekly-dates
- Loading branch information
Showing
165 changed files
with
133,779 additions
and
66,389 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,21 +1,50 @@ | ||
# Background | ||
<div align="center"> | ||
<img src='https://github.com/dydxprotocol/v4-native-android/blob/develop/meta/icon_512.png' alt='icon' style="width:180px;height:180px;"> /> | ||
</div> | ||
<h1 align="center">v4-native-android</h1> | ||
|
||
This is the native Android app for dYdX | ||
<div align="center"> | ||
<a href='https://github.com/dydxprotocol/v4-native-android/blob/main/LICENSE'> | ||
<img src='https://img.shields.io/badge/License-AGPL_v3-blue.svg' alt='License' /> | ||
</a> | ||
</div> | ||
|
||
# Quick Setup | ||
This is the native Android app for dYdX v4. | ||
|
||
> cd scripts | ||
# Quick Setup | ||
|
||
> ./bootstrap.sh | ||
```zsh | ||
cd scripts | ||
./bootstrap.sh | ||
``` | ||
|
||
This will set up Android Studio project along with all dependencies. | ||
|
||
# Main Repo | ||
|
||
```zsh | ||
git clone [email protected]:dydxprotocol/v4-native-android.git | ||
``` | ||
|
||
# Repo Dependencies | ||
|
||
### v4-abacus and cartera-android | ||
|
||
This project requires the latest packages from v4-abacus and cartera-android. | ||
|
||
To access v4-abacus and cartera-android, create a personal access token on Github and add it to the repo [link](https://docs.github.com/en/[email protected]/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). Create a classic token that has read permission to packages. | ||
|
||
Add your github user name and token as shell env vars: | ||
```zsh | ||
export github_username=[GITHUB_USERNAME] | ||
export github_token=[GITHUB_TOKEN] | ||
``` | ||
|
||
<img width="807" alt="281211719-e0af477e-f84c-466f-93ac-32d0236bb84b" src="https://github.com/dydxprotocol/v4-native-android/assets/102453770/46b7b613-b194-4f5f-8b5a-aadff548f234"> | ||
|
||
|
||
### v4-localization and v4-web | ||
|
||
This project requires v4-localization | ||
|
||
https://github.com/dydxprotocol/v4-localization | ||
|
@@ -35,13 +64,16 @@ Add the `secrets/` folder to the `v4-native-android/scripts` folder. | |
|
||
Copy the content of `secrets.zip` to `v4-native-android/scripts/secrets` and run | ||
|
||
```zsh | ||
cd v4-native-android/scripts | ||
./set_secrets.sh | ||
``` | ||
|
||
This will apply the secrets to the source code. | ||
|
||
# Build Android App | ||
|
||
```zsh | ||
cd v4-native-android | ||
./gradlew build | ||
./gradlew :v4:app:installDebug | ||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Tue Jan 30 10:45:32 PST 2024 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
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,216 @@ | ||
--- | ||
format_version: '11' | ||
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git | ||
project_type: android | ||
workflows: | ||
_buildApp: | ||
description: Build Android app (v4) | ||
steps: | ||
- set-java-version@1: | ||
inputs: | ||
- set_java_version: '17' | ||
- git-clone@8: {} | ||
- script@1: | ||
inputs: | ||
- content: |- | ||
#!/usr/bin/env bash | ||
# fail if any commands fails | ||
set -e | ||
# make pipelines' return status equal the last command to exit with a non-zero status, or zero if all commands exit successfully | ||
set -o pipefail | ||
# debug log | ||
set -x | ||
# write your script here | ||
echo "Pulling Configs!" | ||
cd .. | ||
git clone [email protected]:dydxprotocol/v4-localization.git | ||
git clone [email protected]:dydxprotocol/v4-web.git | ||
# or run a script from your repository, like: | ||
# bash ./path/to/script.sh | ||
# not just bash, e.g.: | ||
# ruby ./path/to/script.rb | ||
title: Script (Pulling Configs) | ||
- script@1: | ||
title: Script (Set Secrets) | ||
inputs: | ||
- content: |- | ||
#!/usr/bin/env bash | ||
# fail if any commands fails | ||
set -e | ||
# make pipelines' return status equal the last command to exit with a non-zero status, or zero if all commands exit successfully | ||
set -o pipefail | ||
# debug log | ||
set -x | ||
# Check if required environment variables are set | ||
if [ -z "$google_services_debug" ]; then | ||
echo "Error: google_services_debug environment variable not set." | ||
exit 1 | ||
fi | ||
if [ -z "$google_services_release" ]; then | ||
echo "Error: google_services_release environment variable not set." | ||
exit 1 | ||
fi | ||
if [ -z "$strings_xml" ]; then | ||
echo "Error: strings_xml environment variable not set." | ||
exit 1 | ||
fi | ||
FOLDER=v4/app/src/debug | ||
# if folder doesn't exist, create it | ||
if [ ! -d "$FOLDER" ]; then | ||
mkdir -p $FOLDER | ||
fi | ||
echo "$google_services_debug" > v4/app/src/debug/google-services.json | ||
FOLDER=v4/app/src/release | ||
# if folder doesn't exist, create it | ||
if [ ! -d "$FOLDER" ]; then | ||
mkdir -p $FOLDER | ||
fi | ||
echo "$google_services_release" > v4/app/src/release/google-services.json | ||
FOLDER=v4/common/src/main/res/values/ | ||
# if folder doesn't exist, create it | ||
if [ ! -d "$FOLDER" ]; then | ||
mkdir -p $FOLDER | ||
fi | ||
echo "$strings_xml" > v4/common/src/main/res/values/strings.xml | ||
- cache-pull@2: {} | ||
- install-missing-android-tools@3: | ||
inputs: | ||
- gradlew_path: "$PROJECT_LOCATION/gradlew" | ||
- change-android-applicationid@1: | ||
inputs: | ||
- build_gradle_path: "$BITRISE_SOURCE_DIR/v4/app/build.gradle" | ||
- new_application_id: "$APPLICATION_ID" | ||
- android-unit-test@1: | ||
inputs: | ||
- project_location: "$PROJECT_LOCATION" | ||
- module: "$MODULE" | ||
- variant: "$VARIANT" | ||
- change-android-versioncode-and-versionname@1: | ||
inputs: | ||
- build_gradle_path: "$BITRISE_SOURCE_DIR/v4/app/build.gradle" | ||
- android-build@1: | ||
inputs: | ||
- project_location: "$PROJECT_LOCATION" | ||
- module: "$MODULE" | ||
- app_path_pattern: |- | ||
*/v4/app/build/outputs/apk/*.apk | ||
*/v4/app/build/outputs/bundle/*.aab | ||
- variant: "$VARIANT" | ||
- cache-push@2: {} | ||
_withSsh: | ||
description: Set up Auth and Env Vars | ||
steps: | ||
- activate-ssh-key@4: {} | ||
- script@1: | ||
inputs: | ||
- content: | | ||
#!/usr/bin/env bash | ||
# fail if any commands fails | ||
set -e | ||
# debug log | ||
set -x | ||
envman add --key=DYDX_DATE_MM_DD --value="$(date +"%m-%d")" | ||
envs: | ||
- ABACUS_GIT_REPO_URL: [email protected]:dydxprotocol/abacus.git | ||
opts: | ||
is_expand: false | ||
build: | ||
description: 'Run CI / release build. Triggers based on build/* branches. Artifacts | ||
are discarded. | ||
' | ||
envs: | ||
- VARIANT: release | ||
opts: | ||
is_expand: false | ||
before_run: | ||
- _withSsh | ||
- _buildApp | ||
primary: | ||
description: | | ||
Run on every PR. | ||
Next steps: | ||
- Check out [Getting started with Android apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-android-apps.html). | ||
steps: | ||
- deploy-to-bitrise-io@2: {} | ||
envs: | ||
- VARIANT: release | ||
opts: | ||
is_expand: false | ||
before_run: | ||
- _withSsh | ||
- _buildApp | ||
release: | ||
description: 'Official Release Workflow (protected by PR) | ||
' | ||
envs: | ||
- VARIANT: release | ||
opts: | ||
is_expand: false | ||
before_run: | ||
- build | ||
steps: | ||
- sign-apk@1: | ||
inputs: | ||
- output_name: dydx_${ANDROID_VERSION_NAME}_${BITRISE_TRIGGERED_WORKFLOW_TITLE}_${BITRISE_BUILD_NUMBER} | ||
- use_apk_signer: 'true' | ||
- deploy-to-bitrise-io@2: {} | ||
- google-play-deploy@3: | ||
inputs: | ||
- package_name: "$APPLICATION_ID" | ||
- track: internal | ||
- status: draft | ||
- service_account_json_key_path: "$BITRISEIO_Google_Play_service_account_json_URL" | ||
title: Google Play Deploy (internal) | ||
- git-tag@1: | ||
inputs: | ||
- tag_message: |- | ||
$BITRISE_PUBLIC_INSTALL_PAGE_URL_MAP | ||
$BITRISE_PERMANENT_DOWNLOAD_URL_MAP | ||
- tag: v${ANDROID_VERSION_NAME}(${BITRISE_BUILD_NUMBER}) | ||
meta: | ||
bitrise.io: | ||
stack: linux-docker-android-20.04 | ||
machine_type_id: standard | ||
app: | ||
envs: | ||
- PROJECT_LOCATION: "." | ||
opts: | ||
is_expand: false | ||
- opts: | ||
is_expand: false | ||
MODULE: v4:app | ||
- opts: | ||
is_expand: false | ||
MODULE_PATH: v4/app | ||
- opts: | ||
is_expand: false | ||
APPLICATION_ID: exchange.dydx.trading | ||
trigger_map: | ||
- push_branch: releases/* | ||
workflow: release | ||
- push_branch: build/* | ||
workflow: build | ||
- push_branch: main | ||
workflow: release | ||
- pull_request_target_branch: develop | ||
workflow: primary |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.