Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

template: Update to dioxus 0.4/wry 0.28 with libwebkit2gtk-4.1-dev #210

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,14 @@ jobs:

- name: install linux dependencies
if: ${{ matrix.host == 'ubuntu-latest' }}
run: sudo apt-get update && sudo apt-get install libwebkit2gtk-4.0-dev libgtk-3-dev squashfs-tools
run: sudo apt-get update && sudo apt-get install libwebkit2gtk-4.1-dev libgtk-3-dev squashfs-tools

- name: create project
run: ./x new template

# only linux can target linux as it is not clear what that even is exactly
# glibc/musl gtk/qt x11/wayland
# windows doesn't support posix symlinks so can't cross compile to macos/ios
# Only linux can target linux as it is not clear what that even is exactly
# (glibc/musl GTK/QT X11/Wayland).
# Windows doesn't support posix symlinks so can't cross compile to MacOS/iOS.
- name: build project
if: >
!(matrix.host == 'macos-latest' && matrix.target.platform == 'linux' ||
Expand Down
4 changes: 2 additions & 2 deletions xbuild/src/gradle/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ pub fn prepare(env: &BuildEnv) -> Result<()> {
std::fs::write(wry.join("MainActivity.kt"), main_activity)?;
}
let (package, name) = package.rsplit_once('.').unwrap();
std::env::set_var("WRY_ANDROID_REVERSED_DOMAIN", package);
std::env::set_var("WRY_ANDROID_APP_NAME_SNAKE_CASE", name);
std::env::set_var("WRY_ANDROID_PACKAGE", package);
std::env::set_var("WRY_ANDROID_LIBRARY", name); // TODO: Should this be the crate name?
std::env::set_var("WRY_ANDROID_KOTLIN_FILES_OUT_DIR", wry);
}
Ok(())
Expand Down
14 changes: 6 additions & 8 deletions xbuild/template/Cargo_toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,16 @@ crate-type = ["cdylib", "rlib"]

[dependencies]
anyhow = "1.0.68"
dioxus = "0.3.1"
dioxus = "0.4"

[target.'cfg(not(target_family = "wasm"))'.dependencies]
dioxus-desktop = "0.3.0"
dioxus-desktop = "0.4"

[target.'cfg(target_os = "android")'.dependencies]
android_logger = "0.11.1"
log = "0.4.17"
ndk-context = "0.1.1"
paste = "1.0.11"
android_logger = "0.11"
log = "0.4"

[target.'cfg(target_family = "wasm")'.dependencies]
console_error_panic_hook = "0.1.7"
dioxus-web = "0.3.0"
wasm-logger = "0.2.0"
dioxus-web = "0.4"
wasm-logger = "0.2"
Loading