From f58a07c5bb28fba0666a5ef6ac3b4f8bf08da86c Mon Sep 17 00:00:00 2001 From: dlgt7 <102397160+dlgt7@users.noreply.github.com> Date: Tue, 30 Dec 2025 07:04:34 +0800 Subject: [PATCH] Add files via upload --- 洛雪音乐打包/TVBoxOSC.jks | Bin 0 -> 2258 bytes 洛雪音乐打包/build.gradle | 211 ++++++++++++++++++++++++++++++++++++++ 洛雪音乐打包/release.yml | 204 ++++++++++++++++++++++++++++++++++++ 洛雪音乐打包/说明.txt | 5 +- 4 files changed, 419 insertions(+), 1 deletion(-) create mode 100644 洛雪音乐打包/TVBoxOSC.jks create mode 100644 洛雪音乐打包/build.gradle create mode 100644 洛雪音乐打包/release.yml diff --git a/洛雪音乐打包/TVBoxOSC.jks b/洛雪音乐打包/TVBoxOSC.jks new file mode 100644 index 0000000000000000000000000000000000000000..d9ed79a2850d4634196d69a4fc0b8de1cbcaab16 GIT binary patch literal 2258 zcmc(g`8U)HAIIlAGc++nmdMy5(qkE4%ZMl%L?X$ONM(r-W2vExFqZ0OkbPguzRNnY zm7%d*F1aQYL$+urOcKNO-19u=x##o;JU_gDc)x!7ocDR3&wH1-%Y;B6(0u`a3vrj= zgb&2~JMV+A1bWId2!sO)lHj`_4=0xbCjbZJp?mk&(oSUtSXv5%ErBs5LqeR=FvEp+zoR-ZO#c01o*OvgXjfVoGd7{$G|NMW^X z0x@Xp1M!z5gjW?I)vLKx7xl$I8A|ojRl;Z8ggW%+u%}H0G9nhlMYgMzWK7CitIjJW z0O5qMxbhCCF0Uo|zF{PNAvAi|q%ME7Q;=v<7hpm99h=L_ZC<&~$I6P(?$(-yJ4^~{ zky}+ImGdhQ@YGzQHcMx%T*5L{Z*hvn5A8qZE^=1LpO5rLZ8RcSMeW2b>C6kefz~7to@7?9LmC{j3t(9CSJm!0F?zit3 z2Y#q3x)ay7k%xI9r9mshdgeqLaoL@pU&o-cP8~{!EOWI4TD-iMdcF;W$XDHbcP(Zq zkH%ec$LVfmzw{!tHAQpgQemx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_#{_UUkyIz?0kV$DlXh6Zz?Uf zaW-+G#bO}a=Vhp>^2Ups9HcV3$m+w0Dl z_{MwponcBJCabYb&Z^J!d{1@^kt(lTR6RDPzQpkDYPT$L>3|&~2NPD}^Cj27LcYax Xw*kCo!?Kj01jvjQb^DSaa3S(9_`Kr* literal 0 HcmV?d00001 diff --git a/洛雪音乐打包/build.gradle b/洛雪音乐打包/build.gradle new file mode 100644 index 0000000..21e0075 --- /dev/null +++ b/洛雪音乐打包/build.gradle @@ -0,0 +1,211 @@ +apply plugin: "com.android.application" +apply plugin: "org.jetbrains.kotlin.android" +apply plugin: "com.facebook.react" + +import com.android.build.OutputFile +import groovy.json.JsonSlurper +import org.apache.tools.ant.taskdefs.condition.Os + +/** + * This is the configuration block to customize your React Native Android app. + * By default you don't need to apply any configuration, just uncomment the lines you need. + */ +react { + /* Folders */ + // The root of your project, i.e. where "package.json" lives. Default is '..' + // root = file("../") + // The folder where the react-native NPM package is. Default is ../node_modules/react-native + // reactNativeDir = file("../node_modules/react-native") + // The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen + // codegenDir = file("../node_modules/@react-native/codegen") + // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js + // cliFile = file("../node_modules/react-native/cli.js") + + /* Variants */ + // The list of variants to that are debuggable. For those we're going to + // skip the bundling of the JS bundle and the assets. By default is just 'debug'. + // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants. + // debuggableVariants = ["liteDebug", "prodDebug"] + + /* Bundling */ + // A list containing the node command and its flags. Default is just 'node'. + // nodeExecutableAndArgs = ["node"] + // + // The command to run when bundling. By default is 'bundle' + // bundleCommand = "ram-bundle" + // + // The path to the CLI configuration file. Default is empty. + // bundleConfig = file(../rn-cli.config.js) + // + // The name of the generated asset file containing your JS bundle + // bundleAssetName = "MyApplication.android.bundle" + // + // The entry file for bundle generation. Default is 'index.android.js' or 'index.js' + // entryFile = file("../js/MyApplication.android.js") + // + // A list of extra flags to pass to the 'bundle' commands. + // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle + // extraPackagerArgs = [] + + /* Hermes Commands */ + // The hermes compiler command to run. By default it is 'hermesc' + // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc" + // + // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map" + // hermesFlags = ["-O", "-output-source-map"] +} + +/** + * Set this to true to create four separate APKs instead of one, + * one for each native architecture. This is useful if you don't + * use App Bundles (https://developer.android.com/guide/app-bundle/) + * and want to have separate APKs to upload to the Play Store. + */ +def enableSeparateBuildPerCPUArchitecture = true + +/** + * Set this to true to Run Proguard on Release builds to minify the Java bytecode. + */ +def enableProguardInReleaseBuilds = true + +/** + * The preferred build flavor of JavaScriptCore (JSC) + * + * For example, to use the international variant, you can use: + * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` + * + * The international variant includes ICU i18n library and necessary data + * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that + * give correct results when using with locales other than en-US. Note that + * this variant is about 6MiB larger per architecture than default. + */ +def jscFlavor = 'org.webkit:android-jsc:+' + +/** + * Private function to get the list of Native Architectures you want to build. + * This reads the value from reactNativeArchitectures in your gradle.properties + * file and works together with the --active-arch-only flag of react-native run-android. + */ +def reactNativeArchitectures() { + def value = project.getProperties().get("reactNativeArchitectures") + return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"] +} + +// Get version number +def getNpmPackageJson() { + def inputFile = new File("../package.json") + def packageJson = new JsonSlurper().parseText(inputFile.text) + return packageJson +} +def npmPackageJson = getNpmPackageJson() +def verCode = npmPackageJson["versionCode"] +def verName = npmPackageJson["version"] +def applicationName = npmPackageJson["name"] + +android { + ndkVersion rootProject.ext.ndkVersion + + buildToolsVersion rootProject.ext.buildToolsVersion + compileSdk rootProject.ext.compileSdkVersion + + namespace "cn.toside.music.mobile" + defaultConfig { + applicationId "cn.toside.music.mobile" + minSdkVersion rootProject.ext.minSdkVersion + targetSdkVersion rootProject.ext.targetSdkVersion + versionCode verCode + versionName verName + } + + splits { + abi { + reset() + enable enableSeparateBuildPerCPUArchitecture + universalApk true // If true, also generate a universal APK + include (*reactNativeArchitectures()) + } + } + // ==================== 彻底重写的签名配置 ==================== + signingConfigs { + debug { + storeFile file('ikunshare.keystore') + storePassword '@Ikun2.0.1.2' + keyAlias 'ikunshare' + keyPassword '@Ikun2.0.1.2' + } + + release { + // 安全获取属性(变量名故意改成不和属性冲突) + def keystoreFile = project.findProperty("FONGMIBOX_STORE_FILE") ?: "" + def keystorePass = project.findProperty("FONGMIBOX_STORE_PASSWORD") ?: "" + def keystoreAlias = project.findProperty("FONGMIBOX_KEY_ALIAS") ?: "" + def keystoreKeyPass = project.findProperty("FONGMIBOX_KEY_PASSWORD") ?: "" + + // 检查是否注入成功 + if (!keystoreFile || !keystorePass || !keystoreAlias || !keystoreKeyPass) { + throw new GradleException("TVBoxOSC signing properties missing in android/gradle.properties! Check workflow injection.") + } + + // 显式赋值,避免任何 DSL 歧义 + storeFile = file(keystoreFile) + storePassword = keystorePass + keyAlias = keystoreAlias + keyPassword = keystoreKeyPass + + v1SigningEnabled true + v2SigningEnabled true + enableV3Signing true + enableV4Signing true + } + } + + buildTypes { + debug { + signingConfig signingConfigs.debug + } + release { + signingConfig signingConfigs.release + minifyEnabled enableProguardInReleaseBuilds + proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" + } + } + // =========================================================== + + // applicationVariants are e.g. debug, release + applicationVariants.all { variant -> + variant.outputs.each { output -> + // For each separate APK per architecture, set a unique version code as described here: + // https://developer.android.com/studio/build/configure-apk-splits.html + // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc. + def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4] + def abi = output.getFilter(OutputFile.ABI) + if (abi == null) { // null for the universal-debug, universal-release variants + output.outputFileName = + "${applicationName}-v${defaultConfig.versionName}-universal.apk" + } else { + output.versionCodeOverride = + defaultConfig.versionCode * 1000 + versionCodes.get(abi) + output.outputFileName = + "${applicationName}-v${defaultConfig.versionName}-${abi}.apk" + } + + } + } +} + +dependencies { + // The version of react-native is set by the React Native Gradle Plugin + implementation("com.facebook.react:react-android") + implementation("com.facebook.react:flipper-integration") + // implementation "androidx.javascriptengine:javascriptengine:1.0.0-alpha07" + // implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3") + implementation 'wang.harlon.quickjs:wrapper-android:2.4.0' + + if (hermesEnabled.toBoolean()) { + implementation("com.facebook.react:hermes-android") + } else { + implementation jscFlavor + } +} + +apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) diff --git a/洛雪音乐打包/release.yml b/洛雪音乐打包/release.yml new file mode 100644 index 0000000..c516285 --- /dev/null +++ b/洛雪音乐打包/release.yml @@ -0,0 +1,204 @@ +name: Build111 + +on: +# push: +# branches: [ "main" ] +# pull_request: +# branches: [ "main" ] + workflow_dispatch: + +jobs: + Android: + name: Android + runs-on: ubuntu-latest + steps: + - name: Check out git repository + uses: actions/checkout@v4 + + - name: Setup Env + uses: ./.github/actions/setup + + - name: Configure TVBoxOSC Signing + run: | + cd android + ls -l app/TVBoxOSC.jks # 确认 keystore 存在 + + # 只写入属性即可,build.gradle 会自动识别并优先使用 + cat <<'EOF' >> gradle.properties + FONGMIBOX_STORE_FILE=../app/TVBoxOSC.jks + FONGMIBOX_KEY_ALIAS=TVBoxOSC + FONGMIBOX_STORE_PASSWORD=TVBoxOSC + FONGMIBOX_KEY_PASSWORD=TVBoxOSC + EOF + + - name: Build Packages + run: | + cd android + chmod +x ./gradlew + ./gradlew clean assembleRelease --parallel --daemon --warning-mode all + + # Push tag to GitHub if package.json version's tag is not tagged + - name: Get package version + run: | + PACKAGE_VERSION=$(node -p "require('./package.json').version") + echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_ENV + + - name: Create git tag + uses: pkgdeps/git-tag-action@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + github_repo: ${{ github.repository }} + version: ${{ env.PACKAGE_VERSION }} + git_commit_sha: ${{ github.sha }} + git_tag_prefix: "v" + + - name: Generate file MD5 + run: | + cd android/app/build/outputs/apk/release + md5sum *.apk + + - name: Upload Artifact + uses: ./.github/actions/upload-artifact + env: + PACKAGE_VERSION: ${{ env.PACKAGE_VERSION }} + + # Android_SL: + # name: Android_SL + # runs-on: ubuntu-latest + # steps: + # - name: Check out git repository + # uses: actions/checkout@v4 + # with: + # ref: statusbar_lyric + + # - name: Setup Env + # uses: ./.github/actions/setup + + # - name: Build Packages + # shell: bash + # 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 }} + + # # Push tag to GitHub if package.json version's tag is not tagged + # - name: Get package version + # run: | + # node -p -e '`PACKAGE_VERSION=${require("./package.json").version}`' >> $GITHUB_ENV + # echo "COMMIT_SHA=$(git show -s --format=%H)" >> $GITHUB_ENV + + # - name: Create git tag + # uses: pkgdeps/git-tag-action@v3 + # with: + # github_token: ${{ secrets.GITHUB_TOKEN }} + # github_repo: ${{ github.repository }} + # version: ${{ env.PACKAGE_VERSION }} + # git_commit_sha: ${{ env.COMMIT_SHA }} + # git_tag_prefix: "v" + + # - name: Generate file MD5 + # run: | + # echo "current commit sha: ${{ env.COMMIT_SHA }}" + # cd android/app/build/outputs/apk/release + # md5sum *.apk + + # - name: Upload Artifact + # uses: ./.github/actions/upload-artifact + # env: + # PACKAGE_TYPE: 'Android_SL' + # PACKAGE_VERSION: ${{ env.PACKAGE_VERSION }} + + # Android_5: + # name: Android_5 + # runs-on: ubuntu-latest + # steps: + # - name: Check out git repository + # uses: actions/checkout@v4 + # with: + # ref: android_5 + + # - name: Setup Env + # uses: ./.github/actions/setup + + # - name: Build Packages + # shell: bash + # 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 }} + + # # Push tag to GitHub if package.json version's tag is not tagged + # - name: Get package version + # run: | + # node -p -e '`PACKAGE_VERSION=${require("./package.json").version}`' >> $GITHUB_ENV + # echo "COMMIT_SHA=$(git show -s --format=%H)" >> $GITHUB_ENV + + # - name: Create git tag + # uses: pkgdeps/git-tag-action@v3 + # with: + # github_token: ${{ secrets.GITHUB_TOKEN }} + # github_repo: ${{ github.repository }} + # version: ${{ env.PACKAGE_VERSION }} + # git_commit_sha: ${{ env.COMMIT_SHA }} + # git_tag_prefix: "v" + + # - name: Generate file MD5 + # run: | + # echo "current commit sha: ${{ env.COMMIT_SHA }}" + # cd android/app/build/outputs/apk/release + # md5sum *.apk + + # - name: Upload Artifact + # uses: ./.github/actions/upload-artifact + # env: + # PACKAGE_TYPE: 'Android_5' + # PACKAGE_VERSION: ${{ env.PACKAGE_VERSION }} + + Release: + name: Release + runs-on: ubuntu-latest + # needs: [Android, Android_SL] + needs: [Android] + steps: + - name: Check out git repository + uses: actions/checkout@v4 + + - name: Download Artifacts + uses: actions/download-artifact@v4 + with: + path: ./artifacts + merge-multiple: true + + - name: Generate file MD5 + run: | + echo -e '\n### File MD5\n```' >> ./publish/changeLog.md + cd artifacts + md5sum *.apk >> ../publish/changeLog.md + echo -e '```\n' >> ../publish/changeLog.md + echo -e '\n[软件安装包说明](https://lyswhut.github.io/lx-music-doc/download#%E8%BD%AF%E4%BB%B6%E5%AE%89%E8%A3%85%E5%8C%85%E8%AF%B4%E6%98%8E)\n' >> ../publish/changeLog.md + + - name: Get package version + run: | + PACKAGE_VERSION=$(node -p "require('./package.json').version") + echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_ENV + + - name: Release + uses: softprops/action-gh-release@v2 + with: + body_path: ./publish/changeLog.md + prerelease: false + draft: false + tag_name: v${{ env.PACKAGE_VERSION }} + files: | + artifacts/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-arm64-v8a.apk + artifacts/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-armeabi-v7a.apk + artifacts/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-x86_64.apk + artifacts/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-x86.apk + artifacts/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-universal.apk + + # artifacts/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-sl-arm64-v8a.apk + # artifacts/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-android_5-universal.apk + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/洛雪音乐打包/说明.txt b/洛雪音乐打包/说明.txt index bca70f3..cb76dc6 100644 --- a/洛雪音乐打包/说明.txt +++ b/洛雪音乐打包/说明.txt @@ -1 +1,4 @@ -q +文件放置的位置: +android/app/build.gradle +android/app/TVBoxOSC.jks +.github/workflows/release.yml