Skip to content
Closed
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
70 changes: 70 additions & 0 deletions .github/workflows/build_apk.yaml.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Build APK

on:
workflow_run:
workflows:
- "Publish to Play Store and Bump Version"
types:
- completed

jobs:
build_release_apk:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.PUBLIVERSIONER_ID }}
private-key: ${{ secrets.PUBLIVERSIONER_SECRET }}

- name: Checkout repository
uses: actions/checkout@v4

- name: Get current version from source
env:
FILE_PATH: "version.properties"
id: version_source
run: |
current_version=$(awk -F"=" '/VERSION_NAME/ {print $2}' "$FILE_PATH")
echo "version=$current_version" >> $GITHUB_OUTPUT

- name: Decode and create google-services.json
run: |
mkdir -p app/src/prod/release
echo "$GOOGLE_SERVICES_JSON" | base64 -d > app/src/prod/release/google-services.json
env:
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_FILE_AS_BASE64 }}

- name: Decode Keystore
run: |
echo "$KEYSTORE_AS_BASE64" | base64 --decode > app/keystore.jks
env:
KEYSTORE_AS_BASE64: ${{ secrets.GOOGLE_PLAY_SIGNING_KEY_FILE_AS_BASE64 }}

- name: Set up JDK 20
uses: actions/setup-java@v4
with:
java-version: "20"
distribution: "zulu"

- name: Build Release APK
run: ./gradlew assembleProdRelease
env:
SIGNING_STORE_FILE: ${{ github.workspace }}/app/keystore.jks
SIGNING_STORE_PASSWORD: ${{ secrets.RELEASE_STORE_PASSWORD }}
SIGNING_KEY_ALIAS: ${{ secrets.RELEASE_KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.RELEASE_KEY_PASSWORD }}

- name: Prepare release directory
run: |
mkdir -p release
cp app/build/outputs/apk/prod/release/app-prod-release.apk release/

- name: Create release
env:
TAG: ${{ steps.version_source.outputs.version }}
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
gh release create "v$TAG" ./release/app-prod-release.apk \
--title=$TAG \
--generate-notes
24 changes: 24 additions & 0 deletions .github/workflows/publish.yaml.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Publish to Play Store and Bump Version

on:
pull_request:
types:
- closed
workflow_dispatch:

jobs:
publish_and_version_bump:
uses: rees46/workflow/.github/workflows/reusable-android-google-play-publish.yaml@master
with:
githubAppId: ${{ vars.PUBLIVERSIONER_ID }}
packageName: "rees46.demo_shop"
aabReleasePath: "app/build/outputs/bundle/prodRelease/app-prod-release.aab"
propertiesFilePath: "version.properties"
secrets:
GITHUB_APP_PRIVATE_KEY: ${{ secrets.PUBLIVERSIONER_SECRET }}
GOOGLE_SERVICES_FILE_AS_BASE64: ${{ secrets.GOOGLE_SERVICES_FILE_AS_BASE64 }}
GOOGLE_PLAY_SIGNING_KEY_FILE_AS_BASE64: ${{ secrets.GOOGLE_PLAY_SIGNING_KEY_FILE_AS_BASE64 }}
RELEASE_STORE_PASSWORD: ${{ secrets.RELEASE_STORE_PASSWORD }}
RELEASE_KEY_ALIAS: ${{ secrets.RELEASE_KEY_ALIAS }}
RELEASE_KEY_PASSWORD: ${{ secrets.RELEASE_KEY_PASSWORD }}
PLAY_ACCOUNT_AS_BASE64: ${{ secrets.PLAY_ACCOUNT_AS_BASE64 }}
28 changes: 28 additions & 0 deletions .github/workflows/sync.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Sync repositories

on:
pull_request:
# TODO uncomment
# workflow_run:
# workflows:
# - "Publish to Play Store and Bump Version"
# types:
# - completed
# workflow_dispatch:

jobs:
run:
# TODO uncomment
# uses: personaClick/workflow/.github/workflows/reusable-android-synchronization.yaml@master
uses: personaClick/workflow/.github/workflows/reusable-android-synchronization.yaml@refactor/reusable-android-synchronization
permissions: write-all
with:
appId: ${{ vars.PERSONACLICK_COURIER_ID }}
targetRepository: personaclick/demo-android
sourceDirname: personaClick
targetDirname: personaClick
syncIgnore: ".git,.idea,version.properties,app/src/main/res/drawable/ic_app.xml,app/src/main/res/drawable/ic_logo.xml"
replacementExtentions: "*.kts,*.kt,*.md,*.xml,*.toml,*.yml,*.yaml"
replacementContents: "42a4cd11ebab3b0454778d18d4f3d5|42a4cd11ebab3b0454778d18d4f3d5,5a57812604806d58d3d98f8e9480cb97|5a57812604806d58d3d98f8e9480cb97,e4fd6e3a19610f7aea5534e96eec69d6|e4fd6e3a19610f7aea5534e96eec69d6,5a57812604806d58d3d98f8e9480cb97|aabc899d3db3d71c4032832e4291c16a,09d291f54de95e9e5bde43b343b0b0d7|09d291f54de95e9e5bde43b343b0b0d7,https://api.personaclick.com/|https://api.personaclick.com/,com.personaclick:personaclick-sdk|com.personaclick:personaclick-sdk,api.personaclick.com|api.personaclick.com,personaclick.com|personaclick.com,personaClick|personaClick,PersonaClick|PersonaClick,PersonaClick|PersonaClick"
secrets:
privateKey: ${{ secrets.PERSONACLICK_COURIER_SECRET }}
3 changes: 3 additions & 0 deletions .vim/coc-settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.compile.nullAnalysis.mode": "disabled"
}
28 changes: 28 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
BSD 3-Clause License

Copyright (c) 2024, REES46

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,28 @@
# trigger-repository
# PersonaClick Demo Android

## Description

PersonaClick Demo Android - application to demonstrate working with SDK.

## Configure

Versions:
- PersonaClick SDK 2.0.20
- Java 20
- Kotlin 2.0.0
- Gradle 8.8
- Android Gradle Plugin 8.5.2

Copy `google-services.json` file from [Firebase console](https://console.firebase.google.com/u/0/) to app module.

## Documentation

For detailed information on methods used from the SDK, please refer to the documentation available at the following link:

[Official API references](https://reference.api.personaclick.com/#introduction)

## Screenshots

![home (1)](https://github.com/user-attachments/assets/2d16d6f6-d821-442e-b850-1b6ed1b8dbf4)
![2](https://github.com/user-attachments/assets/b7994bb1-5aa0-4178-a257-bab0f740145b)
![cart](https://github.com/user-attachments/assets/37a21ca8-904b-4819-859f-93643968634a)
1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ class DemoApplication : Application() {
}

companion object {
private const val SHOP_ID = "357382bf66ac0ce2f1722677c59511"
private const val SHOP_ID = "42a4cd11ebab3b0454778d18d4f3d5"
}
}
9 changes: 0 additions & 9 deletions app/src/main/res/drawable/ic_app.xml

This file was deleted.

36 changes: 0 additions & 36 deletions app/src/main/res/drawable/ic_logo.xml

This file was deleted.

1 change: 1 addition & 0 deletions buildConfig/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
Loading