Skip to content
This repository was archived by the owner on Apr 18, 2025. It is now read-only.

Commit 26e330b

Browse files
authored
Merge pull request #34 from portto/release/0.5.0
Release 0.5.0
2 parents 97984bd + 7f1d91f commit 26e330b

43 files changed

Lines changed: 674 additions & 288 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/config.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/actions/setup/action.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Setup
2+
3+
description: Setup
4+
5+
inputs:
6+
google_services:
7+
description: 'Google Services file'
8+
required: true
9+
10+
runs:
11+
using: "composite"
12+
steps:
13+
- uses: actions/setup-java@v3
14+
with:
15+
distribution: 'zulu'
16+
java-version: 17
17+
- uses: actions/cache@v3
18+
with:
19+
path: |
20+
~/.gradle/caches
21+
~/.gradle/wrapper
22+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
23+
24+
- name: Check Gradle wrapper
25+
uses: gradle/wrapper-validation-action@v1
26+
27+
- name: Put Google Services file
28+
env:
29+
GOOGLE_SERVICES: ${{ inputs.google_services }}
30+
run: echo "$GOOGLE_SERVICES" | base64 -d > app/google-services.json
31+
shell: bash

.github/pull_request_template.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
## Ticket
2+
<!-- Please provide the link associated with the PR -->
3+
4+
## Changes
5+
<!-- Please list the main changes within the PR -->
6+
7+
## Screenshots
8+
<!-- Please attach the screenshots if applicable -->

.github/workflows/ci.yml

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
name: CI
2+
3+
on: push
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: true
8+
9+
jobs:
10+
lint:
11+
name: Lint
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 10
14+
steps:
15+
- uses: actions/checkout@v3
16+
17+
- name: Setup
18+
uses: ./.github/actions/setup
19+
with:
20+
google_services: ${{ secrets.GOOGLE_SERVICES }}
21+
22+
- name: Run lint
23+
run: ./gradlew lint
24+
25+
test:
26+
name: Test
27+
runs-on: ubuntu-latest
28+
timeout-minutes: 10
29+
steps:
30+
- uses: actions/checkout@v3
31+
32+
- name: Setup
33+
uses: ./.github/actions/setup
34+
with:
35+
google_services: ${{ secrets.GOOGLE_SERVICES }}
36+
37+
- name: Run test
38+
run: ./gradlew test
39+
40+
build:
41+
name: Build
42+
runs-on: ubuntu-latest
43+
timeout-minutes: 10
44+
needs: [ lint, test ]
45+
steps:
46+
- uses: actions/checkout@v3
47+
48+
- name: Setup
49+
uses: ./.github/actions/setup
50+
with:
51+
google_services: ${{ secrets.GOOGLE_SERVICES }}
52+
53+
- name: Build release
54+
run: ./gradlew clean assembleRelease --stacktrace
55+
56+
distribute:
57+
if: startsWith(github.ref_name, 'release/')
58+
name: Distribute
59+
runs-on: ubuntu-latest
60+
timeout-minutes: 10
61+
needs: build
62+
steps:
63+
- uses: actions/checkout@v3
64+
65+
- name: Setup
66+
uses: ./.github/actions/setup
67+
with:
68+
google_services: ${{ secrets.GOOGLE_SERVICES }}
69+
70+
- name: Put files
71+
env:
72+
KEYSTORE: ${{ secrets.KEYSTORE }}
73+
SIGNING: ${{ secrets.SIGNING }}
74+
APP_DISTRIBUTION: ${{ secrets.APP_DISTRIBUTION }}
75+
run: |
76+
echo "Adding files"
77+
TMP_SECRETS_PATH=secrets
78+
mkdir ${TMP_SECRETS_PATH}
79+
echo $KEYSTORE | base64 -d > "${TMP_SECRETS_PATH}"/portto.jjs
80+
echo $SIGNING | base64 -d > "${TMP_SECRETS_PATH}"/signing.properties
81+
echo $APP_DISTRIBUTION | base64 -d > "${TMP_SECRETS_PATH}"/app-distribution.json
82+
echo "All files Added ✅"
83+
84+
- name: Fill Infura id
85+
run: sed -i 's/INFURA_ID.*/INFURA_ID = \"${{ secrets.INFURA_ID }}\"/' app/src/main/java/com/portto/valuedapp/Config.kt
86+
87+
- name: Distribute sample app
88+
run: bash ./scripts/distribute.sh
89+
90+
publish:
91+
if: github.ref_name == 'main'
92+
name: Publish
93+
runs-on: ubuntu-latest
94+
timeout-minutes: 10
95+
needs: build
96+
steps:
97+
- uses: actions/checkout@v3
98+
99+
- name: Setup
100+
uses: ./.github/actions/setup
101+
with:
102+
google_services: ${{ secrets.GOOGLE_SERVICES }}
103+
104+
- name: Publish library
105+
env:
106+
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY }}
107+
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_PASSWORD }}
108+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
109+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
110+
run: bash ./scripts/publish.sh
111+
112+
- name: Get version
113+
run: |
114+
echo "version=$(grep "versionName" dependencies.gradle | awk -F: '{print $2}' | tr -d ' '\',)" >> $GITHUB_ENV
115+
116+
- name: Create and push tag
117+
run: |
118+
git config user.name "GitHub Actions"
119+
git config user.email noreply@github.com
120+
git tag -a ${{ env.version }} -m "Release v${{ env.version }}"
121+
git push origin ${{ env.version }}
122+
123+
- name: Create release
124+
uses: softprops/action-gh-release@v1
125+
with:
126+
name: v${{ env.version }}
127+
tag_name: ${{ env.version }}
128+
draft: false
129+
prerelease: false
130+
131+
- name: Create pull request (main -> develop)
132+
run: >
133+
gh pr create
134+
--base develop
135+
--head main
136+
--title '[${{ env.version }}] Merge main into develop'
137+
--body 'Created by Github Actions'
138+
--reviewer Doge-is-Dope,kihonyoo,imjacklai
139+
env:
140+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Asana
2+
on:
3+
pull_request:
4+
types: [opened, reopened]
5+
6+
jobs:
7+
create-asana-attachment-job:
8+
runs-on: ubuntu-latest
9+
name: Create pull request attachments on Asana tasks
10+
steps:
11+
- name: Create pull request attachments
12+
uses: Asana/create-app-attachment-github-action@latest
13+
id: postAttachment
14+
with:
15+
asana-secret: ${{ secrets.ASANA_SECRET }}
16+
- name: Log output status
17+
run: echo "Status is ${{ steps.postAttachment.outputs.status }}"

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
# BloctoSDK
22

33
![Maven Central](https://img.shields.io/maven-central/v/com.portto.sdk/core)
4-
![CircleCI](https://img.shields.io/circleci/build/gh/portto/blocto-android-sdk/main)
4+
![Github Action](https://github.com/portto/blocto-android-sdk/actions/workflows/ci.yml/badge.svg)
55
![GitHub](https://img.shields.io/github/license/portto/blocto-android-sdk)
66

77
Integrate Blocto service into your dApp on Android.
88

99
Currently support
1010

11-
* Solana
1211
* Ethereum
12+
* Arbitrum
13+
* Optimism
1314
* BNB Chain
1415
* Polygon
1516
* Avalanche
17+
* Solana
1618
* More blockchains are coming soon
1719

1820
> For Flow, it's recommended to use [fcl](https://github.com/portto/fcl-android). Check the [documents](https://docs.blocto.app/blocto-sdk/android-sdk/flow) for more info.

app/build.gradle

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ android {
1818
targetSdk versions.compileSdk
1919
versionCode 1
2020
versionName "1.0.0"
21+
versionNameSuffix "-" + getDate()
2122
}
2223

2324
def signingFilePath = "secrets/signing.properties"
@@ -67,6 +68,10 @@ android {
6768
}
6869
}
6970

71+
static def getDate() {
72+
return new Date().format('yyyyMMddHHmm')
73+
}
74+
7075
dependencies {
7176
implementation project(':evm')
7277
implementation project(':solana')
@@ -92,9 +97,9 @@ dependencies {
9297
exclude module: 'bcprov-jdk15on'
9398
}
9499

95-
implementation("com.nftco:flow-jvm-sdk:0.7.1") {
100+
implementation("com.nftco:flow-jvm-sdk:0.7.3") {
96101
exclude module: 'bcprov-jdk15on'
97102
}
98-
implementation("io.grpc:grpc-okhttp:1.47.0")
103+
implementation("io.grpc:grpc-okhttp:1.50.2")
99104
implementation platform("com.google.firebase:firebase-bom:29.3.1")
100105
}

app/src/main/java/com/portto/valuedapp/Config.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ object Config {
44
const val INFURA_ID = ""
55

66
// Your Blocto App ID
7-
const val APP_ID_MAINNET = "49618b1e-461b-4134-8f52-4307dd542a88"
8-
const val APP_ID_TESTNET = "57f397df-263c-4e97-b61f-15b67b9ce285"
7+
const val APP_ID_MAINNET = "0896e44c-20fd-443b-b664-d305b52fe8e8"
8+
const val APP_ID_TESTNET = "0896e44c-20fd-443b-b664-d305b52fe8e8"
99

1010
// Required by Flow
1111
const val FLOW_APP_IDENTIFIER = "Awesome App (v0.0)"

0 commit comments

Comments
 (0)