Skip to content

Commit

Permalink
外置音频元数据读取代码
Browse files Browse the repository at this point in the history
  • Loading branch information
lyswhut committed Dec 11, 2023
1 parent 6a830ff commit 1d87ec8
Show file tree
Hide file tree
Showing 540 changed files with 147 additions and 94,804 deletions.
12 changes: 12 additions & 0 deletions .github/actions/build-packages/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Setup
description: Setup Env

runs:
using: composite
steps:
- name: Build Packages
run: |
cd android
echo ${{ secrets.KEYSTORE_STORE_FILE_BASE64 }} | base64 --decode > app/${{ secrets.KEYSTORE_STORE_FILE }}
./gradlew assembleRelease -PMYAPP_UPLOAD_STORE_FILE='${{ secrets.KEYSTORE_STORE_FILE }}' -PMYAPP_UPLOAD_KEY_ALIAS='${{ secrets.KEYSTORE_KEY_ALIAS }}' -PMYAPP_UPLOAD_STORE_PASSWORD='${{ secrets.KEYSTORE_PASSWORD }}' -PMYAPP_UPLOAD_KEY_PASSWORD='${{ secrets.KEYSTORE_KEY_PASSWORD }}'
rm -f app/${{ secrets.KEYSTORE_STORE_FILE }}
30 changes: 30 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Setup
description: Setup Env

runs:
using: composite
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc

- name: Setup Java Env
uses: actions/setup-java@v4
with:
distribution: 'microsoft'
java-version: '17'
cache: gradle

- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-node-modules-cache-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-modules-cache-
- name: Install dependencies
run: npm ci
35 changes: 35 additions & 0 deletions .github/actions/upload-artifact/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Setup
description: Setup Env

runs:
using: composite
steps:
- name: Upload Artifact arm64-v8a
uses: actions/upload-artifact@v3
with:
name: app-v${{ env.PACKAGE_VERSION }}-arm64-v8a-release
path: android/app/build/outputs/apk/release/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-arm64-v8a.apk

- name: Upload Artifact armeabi-v7a
uses: actions/upload-artifact@v3
with:
name: app-v${{ env.PACKAGE_VERSION }}-armeabi-v7a-release
path: android/app/build/outputs/apk/release/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-armeabi-v7a.apk

- name: Upload Artifact universal
uses: actions/upload-artifact@v3
with:
name: app-v${{ env.PACKAGE_VERSION }}-universal-release
path: android/app/build/outputs/apk/release/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-universal.apk

- name: Upload Artifact x86_64
uses: actions/upload-artifact@v3
with:
name: app-v${{ env.PACKAGE_VERSION }}-x86_64-release
path: android/app/build/outputs/apk/release/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-x86_64.apk

- name: Upload Artifact x86
uses: actions/upload-artifact@v3
with:
name: app-v${{ env.PACKAGE_VERSION }}-x86-release
path: android/app/build/outputs/apk/release/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-x86.apk
68 changes: 6 additions & 62 deletions .github/workflows/beta-pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,39 +13,8 @@ jobs:
- name: Check out git repository
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Setup Java Env
uses: actions/setup-java@v4
with:
distribution: 'microsoft'
java-version: '17'
- name: Cache Gradle Wrapper
uses: actions/cache@v3
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}

- name: Cache Gradle Dependencies
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-caches-
- name: Cache Node Dependencies
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node-caches-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-caches-
- name: Install dependencies
run: npm ci
- name: Setup Env
uses: ./.github/actions/setup

- name: Build Packages
run: |
Expand All @@ -62,32 +31,7 @@ jobs:
cd android/app/build/outputs/apk/release
md5sum *.apk
- name: Upload Artifact arm64-v8a
uses: actions/upload-artifact@v3
with:
name: app-v${{ env.PACKAGE_VERSION }}-arm64-v8a-release
path: android/app/build/outputs/apk/release/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-arm64-v8a.apk

- name: Upload Artifact armeabi-v7a
uses: actions/upload-artifact@v3
with:
name: app-v${{ env.PACKAGE_VERSION }}-armeabi-v7a-release
path: android/app/build/outputs/apk/release/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-armeabi-v7a.apk

- name: Upload Artifact universal
uses: actions/upload-artifact@v3
with:
name: app-v${{ env.PACKAGE_VERSION }}-universal-release
path: android/app/build/outputs/apk/release/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-universal.apk

- name: Upload Artifact x86_64
uses: actions/upload-artifact@v3
with:
name: app-v${{ env.PACKAGE_VERSION }}-x86_64-release
path: android/app/build/outputs/apk/release/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-x86_64.apk

- name: Upload Artifact x86
uses: actions/upload-artifact@v3
with:
name: app-v${{ env.PACKAGE_VERSION }}-x86-release
path: android/app/build/outputs/apk/release/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-x86.apk
- name: Upload Artifact
uses: ./.github/actions/upload-artifact
env:
PACKAGE_VERSION: ${{ env.PACKAGE_VERSION }}
73 changes: 7 additions & 66 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,45 +13,11 @@ jobs:
- name: Check out git repository
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Setup Java Env
uses: actions/setup-java@v4
with:
distribution: 'microsoft'
java-version: '17'
- name: Cache Gradle Wrapper
uses: actions/cache@v3
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}

- name: Cache Gradle Dependencies
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-caches-
- name: Cache Node Dependencies
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node-caches-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-caches-
- name: Install dependencies
run: npm ci
- name: Setup Env
uses: ./.github/actions/setup

- name: Build Packages
run: |
cd android
echo ${{ secrets.KEYSTORE_STORE_FILE_BASE64 }} | base64 --decode > app/${{ secrets.KEYSTORE_STORE_FILE }}
./gradlew assembleRelease -PMYAPP_UPLOAD_STORE_FILE='${{ secrets.KEYSTORE_STORE_FILE }}' -PMYAPP_UPLOAD_KEY_ALIAS='${{ secrets.KEYSTORE_KEY_ALIAS }}' -PMYAPP_UPLOAD_STORE_PASSWORD='${{ secrets.KEYSTORE_PASSWORD }}' -PMYAPP_UPLOAD_KEY_PASSWORD='${{ secrets.KEYSTORE_KEY_PASSWORD }}'
uses: ./.github/actions/build-packages

# Push tag to GitHub if package.json version's tag is not tagged
- name: Get package version
Expand Down Expand Up @@ -89,32 +55,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Artifact arm64-v8a
uses: actions/upload-artifact@v3
with:
name: app-v${{ env.PACKAGE_VERSION }}-arm64-v8a-release
path: android/app/build/outputs/apk/release/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-arm64-v8a.apk

- name: Upload Artifact armeabi-v7a
uses: actions/upload-artifact@v3
with:
name: app-v${{ env.PACKAGE_VERSION }}-armeabi-v7a-release
path: android/app/build/outputs/apk/release/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-armeabi-v7a.apk

- name: Upload Artifact universal
uses: actions/upload-artifact@v3
with:
name: app-v${{ env.PACKAGE_VERSION }}-universal-release
path: android/app/build/outputs/apk/release/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-universal.apk

- name: Upload Artifact x86_64
uses: actions/upload-artifact@v3
with:
name: app-v${{ env.PACKAGE_VERSION }}-x86_64-release
path: android/app/build/outputs/apk/release/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-x86_64.apk

- name: Upload Artifact x86
uses: actions/upload-artifact@v3
with:
name: app-v${{ env.PACKAGE_VERSION }}-x86-release
path: android/app/build/outputs/apk/release/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-x86.apk
- name: Upload Artifact
uses: ./.github/actions/upload-artifact
env:
PACKAGE_VERSION: ${{ env.PACKAGE_VERSION }}
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18
3 changes: 0 additions & 3 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,6 @@ dependencies {
// implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
implementation group: 'wang.harlon.quickjs', name: 'wrapper-android', version: '1.0.0'

// https://mvnrepository.com/artifact/com.googlecode.juniversalchardet/juniversalchardet
implementation group: 'com.googlecode.juniversalchardet', name: 'juniversalchardet', version: '1.0.3'

if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import cn.toside.music.mobile.cache.CachePackage;
import cn.toside.music.mobile.crypto.CryptoPackage;
import cn.toside.music.mobile.gzip.GzipPackage;
import cn.toside.music.mobile.localMedia.LocalMediaPackage;
import cn.toside.music.mobile.lyric.LyricPackage;
import cn.toside.music.mobile.userApi.UserApiPackage;
import cn.toside.music.mobile.utils.UtilsPackage;
Expand All @@ -41,7 +40,6 @@ protected List<ReactPackage> getPackages() {
packages.add(new UtilsPackage());
packages.add(new CryptoPackage());
packages.add(new UserApiPackage());
packages.add(new LocalMediaPackage());
return packages;
}

Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 1d87ec8

Please sign in to comment.