From ac4f702bde84d6e90752710319b6fa03e51ebeed Mon Sep 17 00:00:00 2001 From: Daniel LaCosse <3759828+daniellacosse@users.noreply.github.com> Date: Wed, 24 Jan 2024 16:06:30 -0500 Subject: [PATCH] remove jni --- Makefile | 1 - src/cordova/plugin/android/scripts/copy_third_party.js | 6 ++---- src/cordova/plugin/plugin.xml | 5 ----- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index dda80a7f55..9a9bf3a245 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,6 @@ android: $(BUILDDIR)/android/tun2socks.aar $(BUILDDIR)/android/tun2socks.aar: $(GOMOBILE) mkdir -p "$(BUILDDIR)/android" $(ANDROID_BUILD_CMD) -o "$@" $(IMPORT_PATH)/$(ROOT_PKG)/outline/tun2socks $(IMPORT_PATH)/$(ROOT_PKG)/outline/shadowsocks - unzip "$@" 'jni/*' -d $(BUILDDIR)/android # TODO(fortuna): -s strips symbols and is obsolete. Why are we using it? $(BUILDDIR)/ios/Tun2socks.xcframework: $(GOMOBILE) diff --git a/src/cordova/plugin/android/scripts/copy_third_party.js b/src/cordova/plugin/android/scripts/copy_third_party.js index 96c7242a4e..cbe6e8bc34 100644 --- a/src/cordova/plugin/android/scripts/copy_third_party.js +++ b/src/cordova/plugin/android/scripts/copy_third_party.js @@ -15,19 +15,17 @@ // limitations under the License. const fs = require('fs/promises'); +// const child_process = require('child_process'); const path = require('node:path'); const ANDROID_LIBS_FOLDER_PATH = path.join('plugins', 'cordova-plugin-outline', 'android', 'libs'); const TUN2SOCKS_ANDROID_FOLDER_PATH = path.join('output', 'build', 'android'); -module.exports = async function (context) { +module.exports = async function () { console.log('Copying Android third party libraries...'); await fs.mkdir(ANDROID_LIBS_FOLDER_PATH, {recursive: true}); await fs.copyFile( path.join(TUN2SOCKS_ANDROID_FOLDER_PATH, 'tun2socks.aar'), path.join(ANDROID_LIBS_FOLDER_PATH, 'tun2socks.aar') ); - await fs.cp(path.join(TUN2SOCKS_ANDROID_FOLDER_PATH, 'jni'), path.join(ANDROID_LIBS_FOLDER_PATH, 'obj'), { - recursive: true, - }); }; diff --git a/src/cordova/plugin/plugin.xml b/src/cordova/plugin/plugin.xml index a7406fff57..872aeb7520 100644 --- a/src/cordova/plugin/plugin.xml +++ b/src/cordova/plugin/plugin.xml @@ -57,11 +57,6 @@ - - -