Skip to content

Commit 04c486b

Browse files
committed
refactor: wire android build to unified runtime layout
1 parent 8d214e2 commit 04c486b

13 files changed

Lines changed: 149 additions & 24265 deletions

File tree

NativeScript/runtime/android/Runtime.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#include "JsV8InspectorClient.h"
3636
#endif
3737

38-
#include "NSRuntimeModules.h"
38+
#include "AndroidRuntimeModules.h"
3939

4040
using namespace tns;
4141
using namespace std;
@@ -233,7 +233,7 @@ void Runtime::Init(JNIEnv *_env, jstring filesPath, jstring nativeLibsDir,
233233

234234
ArgConverter::Init(env);
235235

236-
NSRuntimeModules::Init(env);
236+
AndroidRuntimeModules::Init(env, global);
237237

238238
m_objectManager->Init(env);
239239

@@ -705,4 +705,4 @@ tns::ConcurrentMap<std::thread::id, Runtime*> Runtime::thread_id_to_rt_cache;
705705
int Runtime::m_mainLooper_fd[2];
706706

707707
Runtime *Runtime::s_main_rt = nullptr;
708-
std::thread::id Runtime::s_main_thread_id;
708+
std::thread::id Runtime::s_main_thread_id;

NativeScript/runtime/android/modules/AndroidRuntimeModules.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22
// Created by Ammar Ahmed on 01/03/2025.
33
//
44

5-
#ifndef TEST_APP_RUNTIMEMODULES_H
6-
#define TEST_APP_RUNTIMEMODULES_H
5+
#ifndef TEST_APP_ANDROID_RUNTIME_MODULES_H
6+
#define TEST_APP_ANDROID_RUNTIME_MODULES_H
77

88
#include "js_native_api.h"
9-
#include "URL.h"
10-
#include "URLSearchParams.h"
9+
#include "url/URL.h"
10+
#include "url/URLSearchParams.h"
1111

1212
namespace tns {
13-
class NSRuntimeModules {
13+
class AndroidRuntimeModules {
1414
public:
15-
static void Init(napi_env env) {
16-
URL::Init(env);
17-
URLSearchParams::Init(env);
15+
static void Init(napi_env env, napi_value global) {
16+
nativescript::URL::Init(env, global);
17+
nativescript::URLSearchParams::Init(env, global);
1818
}
1919
};
2020
}
2121

22-
#endif //TEST_APP_RUNTIMEMODULES_H
22+
#endif //TEST_APP_ANDROID_RUNTIME_MODULES_H

NativeScript/runtime/android/modules/url/URL.cpp

Lines changed: 0 additions & 342 deletions
This file was deleted.

0 commit comments

Comments
 (0)