-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 2f0d46d
Showing
112 changed files
with
42,290 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
name: Automate Deployment | ||
|
||
on: | ||
workflow_dispatch: # Manual Events | ||
# pull_request: | ||
# types: [closed] | ||
# branches: | ||
# - main | ||
|
||
jobs: | ||
automate-deployment: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
JSONVIEWER_JKS_BASE64: ${{ secrets.JSONVIEWER_JKS_BASE64 }} | ||
|
||
JSONVIEWER_KEYSTORE_ALIAS: ${{ secrets.JSONVIEWER_KEYSTORE_ALIAS }} | ||
JSONVIEWER_KEY_PASSWORD: ${{ secrets.JSONVIEWER_KEY_PASSWORD }} | ||
JSONVIEWER_STORE_PASSWORD: ${{ secrets.JSONVIEWER_STORE_PASSWORD }} | ||
|
||
GOOGLE_CLOUD_JSON_KEY: ${{ secrets.GOOGLE_CLOUD_JSON_KEY }} | ||
JSON_KEY_PATH: ${{ 'google-cloud-json-key.json' }} # fastlane/Appfile | ||
|
||
BUILD_CONFIG_FILE_PATH: ${{ 'app/build/generated/source/buildConfig/release/kr/pokeum/app/BuildConfig.java' }} | ||
|
||
SLACK_CHANNEL: ${{ 'jsonviewer-release' }} | ||
|
||
steps: | ||
- name: clone repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: "[Signing Release APK 🔑] set system environment variables" | ||
run: | | ||
export JSONVIEWER_KEYSTORE_ALIAS="$JSONVIEWER_KEYSTORE_ALIAS" | ||
export JSONVIEWER_KEY_PASSWORD="$JSONVIEWER_KEY_PASSWORD" | ||
export JSONVIEWER_STORE_PASSWORD="$JSONVIEWER_STORE_PASSWORD" | ||
- name: "[Signing Release APK 🔑] upload jks file" | ||
run: | | ||
mkdir $HOME/keystore | ||
cd $HOME/keystore | ||
echo "$JSONVIEWER_JKS_BASE64" | base64 --decode > jsonviewer_keystore.jks | ||
- name: "[Fastlane] set up ruby (version 2.7.5)" | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.7.5 | ||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | ||
|
||
- name: "[Fastlane] install bundler" | ||
run: gem install bundler && bundle install | ||
|
||
- name: "[Fastlane] upload json key file" | ||
run: echo "$GOOGLE_CLOUD_JSON_KEY" > "$JSON_KEY_PATH" | ||
|
||
- name: "[Fastlane] fetch your app metadata" | ||
run: bundle exec fastlane supply init | ||
|
||
- name: "[Fastlane] run test" | ||
run: bundle exec fastlane test | ||
|
||
- name: "[Fastlane] publish app to google play store" | ||
#run: bundle exec fastlane deploy | ||
run: bundle exec fastlane deploy_aab | ||
|
||
- name: "[Fastlane][Post 🧹] upload json key file" | ||
run: rm "$JSON_KEY_PATH" | ||
|
||
- name: "[Get App Version] get and save version" | ||
run: cat "$BUILD_CONFIG_FILE_PATH" | grep VERSION_NAME | sed 's/[^[:digit:].]//g' > VERSION | ||
if: always() | ||
|
||
- name: "[Get App Version] read version file" | ||
id: read_version | ||
run: echo "::set-output name=version::$(cat VERSION)" | ||
if: always() | ||
|
||
- name: "[Get Version] commit version file" | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
default_author: github_actions | ||
if: success() | ||
|
||
- name: "[Slack] send slack notification (success 🚀)" | ||
uses: Brymastr/slack-action@v1 | ||
env: | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
with: | ||
channel-id: '${{ env.SLACK_CHANNEL }}' | ||
template: './slack/success.json' | ||
version: ${{ steps.read_version.outputs.version }} | ||
if: success() | ||
|
||
- name: "[Slack] send slack notification (fail 😢)" | ||
uses: Brymastr/slack-action@v1 | ||
env: | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
with: | ||
channel-id: '${{ env.SLACK_CHANNEL }}' | ||
template: './slack/fail.json' | ||
version: ${{ steps.read_version.outputs.version }} | ||
if: failure() |
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,33 @@ | ||
name: Get App Version | ||
|
||
on: | ||
workflow_dispatch: # Manual Events | ||
|
||
jobs: | ||
get-app-version: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
BUILD_CONFIG_FILE_PATH: ${{ 'app/build/generated/source/buildConfig/debug/kr/pokeum/app/BuildConfig.java' }} | ||
|
||
steps: | ||
- name: clone repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: setup java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '11' | ||
cache: 'gradle' | ||
|
||
- name: build jsonviewer app | ||
run: ./gradlew app:assembleDebug | ||
|
||
- name: get and save version | ||
run: cat "$BUILD_CONFIG_FILE_PATH" | grep VERSION_NAME | sed 's/[^[:digit:].]//g' > VERSION | ||
|
||
- name: commit version file | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
default_author: github_actions |
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,36 @@ | ||
name: Signing Key Verification | ||
|
||
on: | ||
workflow_dispatch: # Manual Events | ||
|
||
jobs: | ||
signing-key-verification: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
JSONVIEWER_JKS_BASE64: ${{ secrets.JSONVIEWER_JKS_BASE64 }} | ||
|
||
JSONVIEWER_KEYSTORE_ALIAS: ${{ secrets.JSONVIEWER_KEYSTORE_ALIAS }} | ||
JSONVIEWER_KEY_PASSWORD: ${{ secrets.JSONVIEWER_KEY_PASSWORD }} | ||
JSONVIEWER_STORE_PASSWORD: ${{ secrets.JSONVIEWER_STORE_PASSWORD }} | ||
|
||
steps: | ||
- name: clone repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: "[Signing Release APK 🔑] set system environment variables" | ||
run: | | ||
export JSONVIEWER_KEYSTORE_ALIAS="$JSONVIEWER_KEYSTORE_ALIAS" | ||
export JSONVIEWER_KEY_PASSWORD="$JSONVIEWER_KEY_PASSWORD" | ||
export JSONVIEWER_STORE_PASSWORD="$JSONVIEWER_STORE_PASSWORD" | ||
- name: "[Signing Release APK 🔑] upload jks file" | ||
run: | | ||
mkdir $HOME/keystore | ||
cd $HOME/keystore | ||
echo "$JSONVIEWER_JKS_BASE64" | base64 --decode > jsonviewer_keystore.jks | ||
- name: Signing Key Verification | ||
run: | | ||
./gradlew clean | ||
./gradlew app:assembleRelease |
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,31 @@ | ||
name: Test Connection | ||
|
||
on: | ||
workflow_dispatch: # Manual Events | ||
|
||
jobs: | ||
test-connection: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
GOOGLE_CLOUD_JSON_KEY: ${{ secrets.GOOGLE_CLOUD_JSON_KEY }} | ||
JSON_KEY_PATH: ${{ 'google-cloud-json-key.json' }} | ||
|
||
steps: | ||
- name: clone repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: "[Fastlane] set up ruby (version 2.7.5)" | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.7.5 | ||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | ||
|
||
- name: "[Fastlane] install bundler" | ||
run: gem install bundler && bundle install | ||
|
||
- name: "[Fastlane] upload json key file" | ||
run: echo "$GOOGLE_CLOUD_JSON_KEY" > "$JSON_KEY_PATH" | ||
|
||
- name: "[Fastlane] test the connection to google play store" | ||
run: bundle exec fastlane run validate_play_store_json_key json_key:"$JSON_KEY_PATH" |
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,15 @@ | ||
*.iml | ||
.gradle | ||
.idea | ||
/local.properties | ||
.DS_Store | ||
/build | ||
/captures | ||
.externalNativeBuild | ||
.cxx | ||
local.properties | ||
|
||
.project | ||
.settings/ | ||
|
||
/app/release/ |
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,3 @@ | ||
source "https://rubygems.org" | ||
|
||
gem "fastlane" |
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,40 @@ | ||
# Android JSON Viewer | ||
|
||
[![Generic badge](https://img.shields.io/badge/jitpack-v0.0.0-darkyellow?logo=jitpack&logoColor=white.svg)]() | ||
[![Generic badge](https://img.shields.io/badge/Google_Play-jsonviewer-lightblue?logo=googlePlay&logoColor=white)](https://play.google.com/store/apps/details?id=kr.pokeum.jsonviewer.app) | ||
|
||
--- | ||
|
||
<div align="center"> | ||
|
||
### JSON Viewer and Beautifier | ||
|
||
A lightweight package that will read JSON data, expand and collapse JSON view accordingly. | ||
|
||
</div> | ||
|
||
--- | ||
|
||
**Easiest way to format Json String** | ||
|
||
```xml | ||
<kr.pokeum.jsonviewer_xml.JsonRecyclerView | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
app:text="{PUT_YOUR_JSON_STRING}" /> | ||
``` | ||
|
||
## Table of Contents | ||
- [Installation](#Installation) | ||
- [Usage](#Usage) | ||
- [Basic](#Basic) | ||
- [Advance](#Advance) | ||
|
||
|
||
## <a id="Installation"> Installation | ||
|
||
## <a id="Usage"> Usage | ||
|
||
- ## <a id="Basic"> Basic | ||
|
||
- ## <a id="Advance"> Advance |
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 @@ | ||
1.0.1 |
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 @@ | ||
/build |
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,78 @@ | ||
plugins { | ||
id 'com.android.application' | ||
id 'kotlin-android' | ||
id 'com.google.gms.google-services' | ||
id 'com.google.firebase.appdistribution' | ||
} | ||
|
||
def majorNumber = 1 | ||
def minorNumber = 0 | ||
def patchNumber = 1 | ||
|
||
def versionNameApp = "$majorNumber.$minorNumber.$patchNumber" | ||
def versionCodeBase = majorNumber * 100000 + minorNumber * 1000 + patchNumber * 10 | ||
def versionCodeApp = versionCodeBase + 1 | ||
|
||
android { | ||
compileSdkVersion defaultCompileSdkVersion | ||
buildToolsVersion defaultBuildToolsVersion | ||
|
||
defaultConfig { | ||
applicationId "kr.pokeum.jsonviewer.app" | ||
minSdkVersion defaultMinSdkVersion | ||
targetSdkVersion defaultTargetSdkVersion | ||
versionCode versionCodeApp | ||
versionName versionNameApp | ||
|
||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
|
||
signingConfigs { | ||
release { | ||
keyAlias System.getenv("JSONVIEWER_KEYSTORE_ALIAS") | ||
keyPassword System.getenv("JSONVIEWER_KEY_PASSWORD") | ||
storeFile file(System.getenv("HOME") + "/keystore/jsonviewer_keystore.jks") | ||
storePassword System.getenv("JSONVIEWER_STORE_PASSWORD") | ||
} | ||
} | ||
buildTypes { | ||
release { | ||
debuggable false | ||
minifyEnabled true | ||
signingConfig signingConfigs.release | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility javaCompileVersion | ||
targetCompatibility javaCompileVersion | ||
} | ||
kotlinOptions { | ||
jvmTarget = jvmTarget | ||
} | ||
buildFeatures { | ||
viewBinding true | ||
} | ||
} | ||
|
||
dependencies { | ||
|
||
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar']) | ||
implementation 'com.github.pokeum:jsonviewer-xml:0.0.0' | ||
|
||
implementation stdlib.kotlin | ||
implementation androidx.core | ||
implementation androidx.appcompat | ||
implementation androidx.constraintLayout | ||
implementation material.material | ||
implementation coroutine.core | ||
implementation coroutine.android | ||
implementation network.okhttp | ||
|
||
implementation platform(firebase.bom) | ||
|
||
testImplementation test.junit | ||
|
||
androidTestImplementation androidTest.junit | ||
androidTestImplementation androidTest.espressoCore | ||
} |
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,29 @@ | ||
{ | ||
"project_info": { | ||
"project_number": "1019350039203", | ||
"project_id": "jsonviewer-86f73", | ||
"storage_bucket": "jsonviewer-86f73.appspot.com" | ||
}, | ||
"client": [ | ||
{ | ||
"client_info": { | ||
"mobilesdk_app_id": "1:1019350039203:android:9cd8b741a970ae86e2dd16", | ||
"android_client_info": { | ||
"package_name": "kr.pokeum.jsonviewer.app" | ||
} | ||
}, | ||
"oauth_client": [], | ||
"api_key": [ | ||
{ | ||
"current_key": "AIzaSyDicc_OVvidEUGxm0bYZPds0SJ8jZMscVU" | ||
} | ||
], | ||
"services": { | ||
"appinvite_service": { | ||
"other_platform_oauth_client": [] | ||
} | ||
} | ||
} | ||
], | ||
"configuration_version": "1" | ||
} |
Oops, something went wrong.