Upgrade deps

This commit is contained in:
LoveSy 2023-04-01 17:51:41 +08:00
parent 75965510f3
commit cf0e552715
2 changed files with 19 additions and 12 deletions

View File

@ -35,12 +35,12 @@ rikkax-recyclerview = { module = "dev.rikka.rikkax.recyclerview:recyclerview-ktx
rikkax-widget-borderview = { module = "dev.rikka.rikkax.widget:borderview", version = "1.1.0" } rikkax-widget-borderview = { module = "dev.rikka.rikkax.widget:borderview", version = "1.1.0" }
rikkax-widget-mainswitchbar = { module = "dev.rikka.rikkax.widget:mainswitchbar", version = "1.0.2" } rikkax-widget-mainswitchbar = { module = "dev.rikka.rikkax.widget:mainswitchbar", version = "1.0.2" }
androidx-activity = { module = "androidx.activity:activity", version = "1.6.1" } androidx-activity = { module = "androidx.activity:activity", version = "1.7.0" }
androidx-annotation = { module = "androidx.annotation:annotation", version = "1.6.0" } androidx-annotation = { module = "androidx.annotation:annotation", version = "1.6.0" }
androidx-browser = { module = "androidx.browser:browser", version = "1.5.0" } androidx-browser = { module = "androidx.browser:browser", version = "1.5.0" }
androidx-constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version = "2.1.4" } androidx-constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version = "2.1.4" }
androidx-core = { module = "androidx.core:core", version = "1.9.0" } androidx-core = { module = "androidx.core:core", version = "1.9.0" }
androidx-fragment = { module = "androidx.fragment:fragment", version = "1.5.5" } androidx-fragment = { module = "androidx.fragment:fragment", version = "1.5.6" }
androidx-navigation-fragment = { group = "androidx.navigation", name = "navigation-fragment", version.ref = "nav" } androidx-navigation-fragment = { group = "androidx.navigation", name = "navigation-fragment", version.ref = "nav" }
androidx-navigation-ui = { group = "androidx.navigation", name = "navigation-ui", version.ref = "nav" } androidx-navigation-ui = { group = "androidx.navigation", name = "navigation-ui", version.ref = "nav" }
androidx-preference = { module = "androidx.preference:preference", version = "1.2.0" } androidx-preference = { module = "androidx.preference:preference", version = "1.2.0" }

View File

@ -273,12 +273,17 @@ void zygisk_companion_entry(int client) { func(client); }
template <class T> template <class T>
void entry_impl(api_table *table, JNIEnv *env) { void entry_impl(api_table *table, JNIEnv *env) {
ModuleBase *module = new T(); static T module{};
if (!table->registerModule(table, new module_abi(module))) ModuleBase *m = &module;
return; static module_abi abi(m);
auto api = new Api(); static bool loaded = table->registerModule(table, &abi);
api->impl = table; if (!loaded) return;
module->onLoad(api, env); [[maybe_unused]] static Api api = [&] {
Api api;
api.impl = table;
m->onLoad(&api, env);
return api;
}();
} }
} // namespace internal } // namespace internal
@ -310,8 +315,10 @@ void zygisk_companion_entry(int client) { func(client); }
} // namespace zygisk } // namespace zygisk
[[gnu::visibility("default")]] [[gnu::used]] extern "C" {
extern "C" void zygisk_module_entry(zygisk::internal::api_table *, JNIEnv *); [[gnu::visibility("default"), maybe_unused]]
void zygisk_module_entry(zygisk::internal::api_table *, JNIEnv *);
[[gnu::visibility("default")]] [[gnu::used]] [[gnu::visibility("default"), maybe_unused]]
extern "C" void zygisk_companion_entry(int); void zygisk_companion_entry(int);
}