diff --git a/.github/workflows/prod-android.yml b/.github/workflows/prod-android.yml index effd7723..a38fb47b 100644 --- a/.github/workflows/prod-android.yml +++ b/.github/workflows/prod-android.yml @@ -26,12 +26,12 @@ jobs: - name: Install modules run: cd ../ && npm install - - name: Build package - run: cd ../ && npm run build - - name: Build android nodejs packages run: cd ../static/nodejs-android && npm install + - name: Build package + run: cd ../ && npm run build + - name: Sync package run: cd ../ && npx cap sync diff --git a/materialious/android/app/build.gradle b/materialious/android/app/build.gradle index 6681feff..9f2fda21 100644 --- a/materialious/android/app/build.gradle +++ b/materialious/android/app/build.gradle @@ -7,8 +7,8 @@ android { applicationId "us.materialio.app" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 42 - versionName "1.5.1" + versionCode 43 + versionName "1.5.2" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" aaptOptions { // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps. diff --git a/materialious/electron/package.json b/materialious/electron/package.json index 7531a13c..56d4e21a 100644 --- a/materialious/electron/package.json +++ b/materialious/electron/package.json @@ -1,6 +1,6 @@ { "name": "Materialious", - "version": "1.5.1", + "version": "1.5.2", "description": "Modern material design for Invidious.", "author": { "name": "Ward Pearce", @@ -21,7 +21,6 @@ }, "dependencies": { "@capacitor-community/electron": "^5.0.0", - "capacitor-nodejs": "https://github.com/EdenwareApps/Capacitor-NodeJS/releases/download/v1.0.0-beta.7/capacitor6-nodejs.tgz", "chokidar": "~3.6.0", "electron-is-dev": "~2.0.0", "electron-serve": "~1.1.0", diff --git a/materialious/electron/remove_plugin.py b/materialious/electron/remove_plugin.py new file mode 100644 index 00000000..a8fce612 --- /dev/null +++ b/materialious/electron/remove_plugin.py @@ -0,0 +1,40 @@ +"""Script for removing unwanted Capacitor plugins +""" + +import json +import os +import subprocess + +WORKING_DIR = os.path.dirname(os.path.realpath(__file__)) + +ELECTRON_PLUGIN_FILE = os.path.join(WORKING_DIR, "src", "rt", "electron-plugins.js") +PACKAGE_JSON = os.path.join(WORKING_DIR, "package.json") + + +ELECTRON_PLUGIN_REPLACEMENT = """/* eslint-disable @typescript-eslint/no-var-requires */ + +module.exports = { +}""" + + +def run(): + with open(ELECTRON_PLUGIN_FILE, "w") as f_: + f_.write(ELECTRON_PLUGIN_REPLACEMENT) + + with open(PACKAGE_JSON, "r") as f_: + package: dict = json.loads(f_.read()) + if "dependencies" not in package: + return + + package["dependencies"].pop("capacitor-nodejs") + + f_.close() + + with open(PACKAGE_JSON, "w") as f_: + f_.write(json.dumps(package, indent="\t")) + + subprocess.call(["npm", "install"]) + + +if __name__ == "__main__": + run() diff --git a/materialious/electron/src/rt/electron-plugins.js b/materialious/electron/src/rt/electron-plugins.js index 5f312366..b33b2826 100644 --- a/materialious/electron/src/rt/electron-plugins.js +++ b/materialious/electron/src/rt/electron-plugins.js @@ -1,6 +1,4 @@ /* eslint-disable @typescript-eslint/no-var-requires */ -const CapacitorNodejs = require('../../../node_modules/capacitor-nodejs/electron/dist/plugin.js'); module.exports = { - CapacitorNodejs, } \ No newline at end of file diff --git a/materialious/package.json b/materialious/package.json index 1002ba8b..dce4e069 100644 --- a/materialious/package.json +++ b/materialious/package.json @@ -1,6 +1,6 @@ { "name": "materialious", - "version": "1.5.1", + "version": "1.5.2", "private": true, "scripts": { "dev": "vite dev", diff --git a/update_versions.py b/update_versions.py index 15b1128a..1507f096 100644 --- a/update_versions.py +++ b/update_versions.py @@ -5,7 +5,7 @@ import json import os import re -LATEST_VERSION = "1.5.1" +LATEST_VERSION = "1.5.2" WORKING_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "materialious") ROOT_PACKAGE = os.path.join(WORKING_DIR, "package.json")