更新依赖,兼容 Android 5

This commit is contained in:
lyswhut 2024-01-09 20:06:14 +08:00
parent 42f73dd2da
commit a006a906c3
10 changed files with 556 additions and 855 deletions

View File

@ -13,7 +13,7 @@ runs:
uses: actions/setup-java@v4 uses: actions/setup-java@v4
with: with:
distribution: 'microsoft' distribution: 'microsoft'
java-version: ${{ env.JAVA_VERSION }} java-version: '17'
cache: gradle cache: gradle
- name: Cache node modules - name: Cache node modules

View File

@ -13,8 +13,6 @@ jobs:
- name: Setup Env - name: Setup Env
uses: ./.github/actions/setup uses: ./.github/actions/setup
env:
JAVA_VERSION: '17'
- name: Build Packages - name: Build Packages
shell: bash shell: bash
@ -50,8 +48,6 @@ jobs:
- name: Setup Env - name: Setup Env
uses: ./.github/actions/setup uses: ./.github/actions/setup
env:
JAVA_VERSION: '17'
- name: Build Packages - name: Build Packages
shell: bash shell: bash
@ -79,42 +75,40 @@ jobs:
PACKAGE_TYPE: 'Android_SL' PACKAGE_TYPE: 'Android_SL'
PACKAGE_VERSION: ${{ env.PACKAGE_VERSION }} PACKAGE_VERSION: ${{ env.PACKAGE_VERSION }}
Android_5: # Android_5:
name: Android_5 # name: Android_5
runs-on: ubuntu-latest # runs-on: ubuntu-latest
steps: # steps:
- name: Check out git repository # - name: Check out git repository
uses: actions/checkout@v4 # uses: actions/checkout@v4
with: # with:
ref: android_5 # ref: android_5
- name: Setup Env # - name: Setup Env
uses: ./.github/actions/setup # uses: ./.github/actions/setup
env:
JAVA_VERSION: '11'
- name: Build Packages # - name: Build Packages
shell: bash # shell: bash
run: | # run: |
cd android # cd android
echo ${{ secrets.KEYSTORE_STORE_FILE_BASE64 }} | base64 --decode > app/${{ secrets.KEYSTORE_STORE_FILE }} # 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 }}' # ./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 }} # rm -f app/${{ secrets.KEYSTORE_STORE_FILE }}
# Push tag to GitHub if package.json version's tag is not tagged # # Push tag to GitHub if package.json version's tag is not tagged
- name: Get package version # - name: Get package version
run: | # run: |
node -p -e '`PACKAGE_VERSION=${require("./package.json").version}`' >> $GITHUB_ENV # node -p -e '`PACKAGE_VERSION=${require("./package.json").version}`' >> $GITHUB_ENV
echo "COMMIT_SHA=$(git show -s --format=%H)" >> $GITHUB_ENV # echo "COMMIT_SHA=$(git show -s --format=%H)" >> $GITHUB_ENV
- name: Generate file MD5 # - name: Generate file MD5
run: | # run: |
echo "current commit sha: ${{ env.COMMIT_SHA }}" # echo "current commit sha: ${{ env.COMMIT_SHA }}"
cd android/app/build/outputs/apk/release # cd android/app/build/outputs/apk/release
md5sum *.apk # md5sum *.apk
- name: Upload Artifact # - name: Upload Artifact
uses: ./.github/actions/upload-artifact # uses: ./.github/actions/upload-artifact
env: # env:
PACKAGE_TYPE: 'Android_5' # PACKAGE_TYPE: 'Android_5'
PACKAGE_VERSION: ${{ env.PACKAGE_VERSION }} # PACKAGE_VERSION: ${{ env.PACKAGE_VERSION }}

View File

@ -15,8 +15,6 @@ jobs:
- name: Setup Env - name: Setup Env
uses: ./.github/actions/setup uses: ./.github/actions/setup
env:
JAVA_VERSION: '17'
- name: Build Packages - name: Build Packages
shell: bash shell: bash

View File

@ -15,8 +15,6 @@ jobs:
- name: Setup Env - name: Setup Env
uses: ./.github/actions/setup uses: ./.github/actions/setup
env:
JAVA_VERSION: '17'
- name: Build Packages - name: Build Packages
shell: bash shell: bash
@ -60,8 +58,6 @@ jobs:
- name: Setup Env - name: Setup Env
uses: ./.github/actions/setup uses: ./.github/actions/setup
env:
JAVA_VERSION: '17'
- name: Build Packages - name: Build Packages
shell: bash shell: bash
@ -98,59 +94,57 @@ jobs:
PACKAGE_TYPE: 'Android_SL' PACKAGE_TYPE: 'Android_SL'
PACKAGE_VERSION: ${{ env.PACKAGE_VERSION }} PACKAGE_VERSION: ${{ env.PACKAGE_VERSION }}
Android_5: # Android_5:
name: Android_5 # name: Android_5
runs-on: ubuntu-latest # runs-on: ubuntu-latest
steps: # steps:
- name: Check out git repository # - name: Check out git repository
uses: actions/checkout@v4 # uses: actions/checkout@v4
with: # with:
ref: android_5 # ref: android_5
- name: Setup Env # - name: Setup Env
uses: ./.github/actions/setup # uses: ./.github/actions/setup
env:
JAVA_VERSION: '11'
- name: Build Packages # - name: Build Packages
shell: bash # shell: bash
run: | # run: |
cd android # cd android
echo ${{ secrets.KEYSTORE_STORE_FILE_BASE64 }} | base64 --decode > app/${{ secrets.KEYSTORE_STORE_FILE }} # 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 }}' # ./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 }} # rm -f app/${{ secrets.KEYSTORE_STORE_FILE }}
# Push tag to GitHub if package.json version's tag is not tagged # # Push tag to GitHub if package.json version's tag is not tagged
- name: Get package version # - name: Get package version
run: | # run: |
node -p -e '`PACKAGE_VERSION=${require("./package.json").version}`' >> $GITHUB_ENV # node -p -e '`PACKAGE_VERSION=${require("./package.json").version}`' >> $GITHUB_ENV
echo "COMMIT_SHA=$(git show -s --format=%H)" >> $GITHUB_ENV # echo "COMMIT_SHA=$(git show -s --format=%H)" >> $GITHUB_ENV
- name: Create git tag # - name: Create git tag
uses: pkgdeps/git-tag-action@v2 # uses: pkgdeps/git-tag-action@v2
with: # with:
github_token: ${{ secrets.GITHUB_TOKEN }} # github_token: ${{ secrets.GITHUB_TOKEN }}
github_repo: ${{ github.repository }} # github_repo: ${{ github.repository }}
version: ${{ env.PACKAGE_VERSION }} # version: ${{ env.PACKAGE_VERSION }}
git_commit_sha: ${{ env.COMMIT_SHA }} # git_commit_sha: ${{ env.COMMIT_SHA }}
git_tag_prefix: "v" # git_tag_prefix: "v"
- name: Generate file MD5 # - name: Generate file MD5
run: | # run: |
echo "current commit sha: ${{ env.COMMIT_SHA }}" # echo "current commit sha: ${{ env.COMMIT_SHA }}"
cd android/app/build/outputs/apk/release # cd android/app/build/outputs/apk/release
md5sum *.apk # md5sum *.apk
- name: Upload Artifact # - name: Upload Artifact
uses: ./.github/actions/upload-artifact # uses: ./.github/actions/upload-artifact
env: # env:
PACKAGE_TYPE: 'Android_5' # PACKAGE_TYPE: 'Android_5'
PACKAGE_VERSION: ${{ env.PACKAGE_VERSION }} # PACKAGE_VERSION: ${{ env.PACKAGE_VERSION }}
Release: Release:
name: Release name: Release
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [Android, Android_SL, Android_5] needs: [Android, Android_SL]
steps: steps:
- name: Check out git repository - name: Check out git repository
uses: actions/checkout@v4 uses: actions/checkout@v4

View File

@ -44,7 +44,7 @@ public class JavaScriptThread extends HandlerThread {
case HandlerWhat.INIT: break; case HandlerWhat.INIT: break;
case HandlerWhat.ACTION: { case HandlerWhat.ACTION: {
Object[] data = (Object[]) message.obj; Object[] data = (Object[]) message.obj;
Log.d("UserApi [handler]", "handler action: " + data[0]); // Log.d("UserApi [handler]", "handler action: " + data[0]);
javaScriptExecutor.callJS((String) data[0], data[1]); javaScriptExecutor.callJS((String) data[0], data[1]);
return; return;
} }

View File

@ -57,7 +57,7 @@ public class JsHandler extends Handler {
case HandlerWhat.ACTION: case HandlerWhat.ACTION:
Object[] action = (Object[]) msg.obj; Object[] action = (Object[]) msg.obj;
sendActionEvent((String) action[0], (String) action[1]); sendActionEvent((String) action[0], (String) action[1]);
Log.d("UserApi [api call]", "action: " + action[0]); // Log.d("UserApi [api call]", "action: " + action[0]);
break; break;
case HandlerWhat.LOG: case HandlerWhat.LOG:
sendLogEvent((Object[]) msg.obj); sendLogEvent((Object[]) msg.obj);

View File

@ -6,11 +6,6 @@ const path = require('node:path')
const rootPath = path.join(__dirname, './') const rootPath = path.join(__dirname, './')
const patchs = [ const patchs = [
[
path.join(rootPath, './node_modules/@react-native-community/cli-tools/build/findDevServerPort.js'),
'let startPackager = true;',
'let startPackager = false;',
],
[ [
path.join(rootPath, './node_modules/react-native-navigation/lib/android/app/build.gradle'), path.join(rootPath, './node_modules/react-native-navigation/lib/android/app/build.gradle'),
` `

1224
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -53,7 +53,7 @@
"message2call": "^0.1.3", "message2call": "^0.1.3",
"pako": "^2.1.0", "pako": "^2.1.0",
"react": "18.2.0", "react": "18.2.0",
"react-native": "0.73.1", "react-native": "0.73.2",
"react-native-background-timer": "github:lyswhut/react-native-background-timer#f49f41d0283a796e3e38cb3d505198b5953dc249", "react-native-background-timer": "github:lyswhut/react-native-background-timer#f49f41d0283a796e3e38cb3d505198b5953dc249",
"react-native-exception-handler": "^2.10.10", "react-native-exception-handler": "^2.10.10",
"react-native-fast-image": "^8.6.3", "react-native-fast-image": "^8.6.3",
@ -71,13 +71,13 @@
"@babel/core": "^7.23.7", "@babel/core": "^7.23.7",
"@babel/eslint-parser": "^7.23.3", "@babel/eslint-parser": "^7.23.3",
"@babel/plugin-proposal-export-namespace-from": "^7.18.9", "@babel/plugin-proposal-export-namespace-from": "^7.18.9",
"@babel/preset-env": "^7.23.7", "@babel/preset-env": "^7.23.8",
"@babel/runtime": "^7.23.7", "@babel/runtime": "^7.23.8",
"@react-native/babel-preset": "^0.74.0", "@react-native/babel-preset": "^0.74.0",
"@react-native/metro-config": "^0.73.2", "@react-native/metro-config": "^0.73.3",
"@react-native/typescript-config": "^0.74.0", "@react-native/typescript-config": "^0.74.0",
"@tsconfig/react-native": "^3.0.2", "@tsconfig/react-native": "^3.0.2",
"@types/react": "^18.2.46", "@types/react": "^18.2.47",
"@types/react-native": "^0.72.8", "@types/react-native": "^0.72.8",
"@types/react-native-background-timer": "^2.0.2", "@types/react-native-background-timer": "^2.0.2",
"@types/react-native-vector-icons": "^6.4.18", "@types/react-native-vector-icons": "^6.4.18",

View File

@ -1,5 +1,3 @@
据测试 v1.2.0 开始在已无法在 Android 5.1 上运行,所以我们专门为 Android 5.1 构建了特别版,同时墨·状态栏版也将包含在 release 中。
### 新增 ### 新增
- 新增自定义源实验性功能调用方式与PC端一致但需要注意的是移动端自定义源的环境与PC端不同某些环境API不可用详情看自定义说明文档 - 新增自定义源实验性功能调用方式与PC端一致但需要注意的是移动端自定义源的环境与PC端不同某些环境API不可用详情看自定义说明文档
@ -13,7 +11,7 @@
- 播放详情页新增桌面歌词显示/隐藏切换按钮,长按可切换歌词锁定状态 - 播放详情页新增桌面歌词显示/隐藏切换按钮,长按可切换歌词锁定状态
- 我的列表菜单列表新增“新建列表”菜单 - 我的列表菜单列表新增“新建列表”菜单
- 我的列表菜单列表新增“排序歌曲”菜单可以排序所选列表内的歌曲排序功能与PC一致 - 我的列表菜单列表新增“排序歌曲”菜单可以排序所选列表内的歌曲排序功能与PC一致
- 添加 Android 5 特别版(版本号包含`android_5`)与墨·状态栏特别版(版本号包含`sl`)的 release 构建 - 添加 墨·状态栏特别版(版本号包含`sl`)的 release 构建
### 优化 ### 优化
@ -43,5 +41,5 @@
- 移除所有内置源由于收到腾讯投诉要求停止提供软件内置的连接到他们平台的在线播放及下载服务所以从即日2023年10月18日起LX本身不再提供上述服务 - 移除所有内置源由于收到腾讯投诉要求停止提供软件内置的连接到他们平台的在线播放及下载服务所以从即日2023年10月18日起LX本身不再提供上述服务
- 更新许可协议的排版,使其看起来更加清晰明了,更新数据来源原理说明 - 更新许可协议的排版,使其看起来更加清晰明了,更新数据来源原理说明
- 更新 React native 到 v0.73.1 - 更新 React native 到 v0.73.2
- 核心播放器从 ExoPlayer 迁移到 media3 v1.2.0 - 核心播放器从 ExoPlayer 迁移到 media3 v1.2.0