diff --git a/src/cordova/android/OutlineAndroidLib/outline/build.gradle b/src/cordova/android/OutlineAndroidLib/outline/build.gradle index 89029efcf0..f08084e379 100644 --- a/src/cordova/android/OutlineAndroidLib/outline/build.gradle +++ b/src/cordova/android/OutlineAndroidLib/outline/build.gradle @@ -36,7 +36,7 @@ dependencies { // To make this project editable directly in the source tree, we need to load // tun2socks.aar from its original path in the third_party directory. We do // this by relative path: - compileOnly fileTree(dir: '../../../../../third_party/outline-go-tun2socks/android', + compileOnly fileTree(dir: '../../../../../output/build/android', include: ['tun2socks.aar']) // Note: A flatDir repository might be preferable, but this is not compatible // with a composite build (https://github.com/gradle/gradle/issues/911). diff --git a/src/cordova/plugin/android/scripts/copy_third_party.js b/src/cordova/plugin/android/scripts/copy_third_party.js index 9f8e6388eb..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('third_party', 'outline-go-tun2socks', 'android'); +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 @@ - - - diff --git a/third_party/outline-go-tun2socks/LICENSE b/third_party/outline-go-tun2socks/LICENSE deleted file mode 100644 index 3cc95f21ad..0000000000 --- a/third_party/outline-go-tun2socks/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2018 eycorsican - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/third_party/outline-go-tun2socks/METADATA b/third_party/outline-go-tun2socks/METADATA deleted file mode 100644 index 50a9d77a15..0000000000 --- a/third_party/outline-go-tun2socks/METADATA +++ /dev/null @@ -1,11 +0,0 @@ -name: "outline-go-tun2socks" -description: "Go network stack based on go-tun2socks and go-shadowsocks." - -third_party { - url { - type: GIT - value: "https://github.com/Jigsaw-Code/outline-go-tun2socks" - } - version: "2.2.1" - last_upgrade_date { year: 2022 month: 4 day: 20 } -} \ No newline at end of file diff --git a/third_party/outline-go-tun2socks/android/jni/arm64-v8a/libgojni.so b/third_party/outline-go-tun2socks/android/jni/arm64-v8a/libgojni.so deleted file mode 100644 index 51e575d441..0000000000 Binary files a/third_party/outline-go-tun2socks/android/jni/arm64-v8a/libgojni.so and /dev/null differ diff --git a/third_party/outline-go-tun2socks/android/jni/armeabi-v7a/libgojni.so b/third_party/outline-go-tun2socks/android/jni/armeabi-v7a/libgojni.so deleted file mode 100644 index 6147d1c0a1..0000000000 Binary files a/third_party/outline-go-tun2socks/android/jni/armeabi-v7a/libgojni.so and /dev/null differ diff --git a/third_party/outline-go-tun2socks/android/jni/x86/libgojni.so b/third_party/outline-go-tun2socks/android/jni/x86/libgojni.so deleted file mode 100644 index 90324da099..0000000000 Binary files a/third_party/outline-go-tun2socks/android/jni/x86/libgojni.so and /dev/null differ diff --git a/third_party/outline-go-tun2socks/android/jni/x86_64/libgojni.so b/third_party/outline-go-tun2socks/android/jni/x86_64/libgojni.so deleted file mode 100644 index 32ad8aca0a..0000000000 Binary files a/third_party/outline-go-tun2socks/android/jni/x86_64/libgojni.so and /dev/null differ diff --git a/third_party/outline-go-tun2socks/android/tun2socks.aar b/third_party/outline-go-tun2socks/android/tun2socks.aar deleted file mode 100644 index c0a2231c32..0000000000 Binary files a/third_party/outline-go-tun2socks/android/tun2socks.aar and /dev/null differ