Compare commits

..

No commits in common. "fa9b42cf10d329981ba5ca89762e73a9398db8ef" and "eb972c8633ebcb0d8d6f2a449a301c7031221c57" have entirely different histories.

3 changed files with 7 additions and 186 deletions

View File

@ -45,11 +45,6 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.release_type }}-${{ inputs.platform }}
cancel-in-progress: false
env:
COMPOSE_WEBVIEW_REPO: KRTirtho/ComposeNativeWebview
# fix/linux-wayland-input
COMPOSE_WEBVIEW_COMMIT: b11ac748de1219f9432338c067a2c5dafef3072a
jobs:
validate-inputs:
name: Validate Inputs
@ -61,146 +56,15 @@ jobs:
echo "::error::Building a single platform is only supported for nightly releases"
exit 1
# ComposeNativeWebview's JNI backends are gitignored and only built for the host OS, so a
# publish from macOS alone ships a jar without the Linux / Windows WebView libraries (the
# WebView then renders nothing). Build them on their own OS and hand them to prepare-deps.
build-webview-natives:
name: WebView Natives (${{ matrix.name }})
needs: validate-inputs
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
include:
- name: linux-x64
os: ubuntu-latest
- name: linux-aarch64
os: ubuntu-24.04-arm
- name: windows-x64
os: windows-latest
steps:
- name: Checkout ComposeNativeWebview
uses: actions/checkout@v7
with:
repository: ${{ env.COMPOSE_WEBVIEW_REPO }}
ref: ${{ env.COMPOSE_WEBVIEW_COMMIT }}
token: ${{ secrets.GITHUB_TOKEN }}
path: compose-webview
- name: Set up JDK 21
uses: actions/setup-java@v6
with:
distribution: temurin
java-version: 21
- name: Build Linux WebView native library
if: runner.os == 'Linux'
working-directory: compose-webview
run: |
sudo apt-get update
sudo apt-get install -y build-essential pkg-config libgtk-3-dev libcairo2-dev \
libsoup-3.0-dev libwebkit2gtk-4.1-dev
bash webview-compose/src/jvmMain/native/linux/build.sh
- name: Build Windows WebView native library
if: runner.os == 'Windows'
working-directory: compose-webview
shell: cmd
run: webview-compose\src\jvmMain\native\windows\build.bat
- name: Verify WebView native library
working-directory: compose-webview
shell: bash
run: |
case "${{ matrix.name }}" in
linux-*) files="${{ matrix.name }}/libcompose_webview_linux.so" ;;
windows-x64) files="win32-x64/compose_webview_windows.dll win32-x64/WebView2Loader.dll" ;;
esac
for f in $files; do
test -f "webview-compose/src/jvmMain/resources/nucleus/native/$f" || { echo "::error::Missing $f"; exit 1; }
done
- name: Upload WebView native library
uses: actions/upload-artifact@v7
with:
name: webview-natives-${{ matrix.name }}
path: compose-webview/webview-compose/src/jvmMain/resources/nucleus/native/
retention-days: 1
prepare-deps:
name: Prepare Dependencies
needs: [validate-inputs, build-webview-natives]
runs-on: macos-latest
steps:
- name: Checkout ComposeNativeWebview
uses: actions/checkout@v7
with:
repository: ${{ env.COMPOSE_WEBVIEW_REPO }}
ref: ${{ env.COMPOSE_WEBVIEW_COMMIT }}
token: ${{ secrets.GITHUB_TOKEN }}
path: compose-webview
# Downloaded after checkout, so they are newer than the native sources and
# the build keeps them instead of trying to rebuild on the wrong OS.
- name: Download WebView native libraries
uses: actions/download-artifact@v8
with:
pattern: webview-natives-*
merge-multiple: true
path: compose-webview/webview-compose/src/jvmMain/resources/nucleus/native
- name: Set up JDK 21
uses: actions/setup-java@v6
with:
distribution: temurin
java-version: 21
- name: Set up Android SDK
uses: android-actions/setup-android@v4
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v6
- name: Publish compose-webview to mavenLocal
working-directory: compose-webview
run: |
chmod +x gradlew
./gradlew publishToMavenLocal
- name: Verify published JVM jar carries every WebView backend
run: |
jar=$(ls ~/.m2/repository/dev/nucleusframework/composewebview-jvm/*/composewebview-jvm-*.jar | grep -v -e sources -e javadoc | head -1)
contents=$(unzip -l "$jar")
for f in linux-x64/libcompose_webview_linux.so linux-aarch64/libcompose_webview_linux.so \
win32-x64/compose_webview_windows.dll win32-x64/WebView2Loader.dll \
darwin-aarch64/libcompose_webview_macos.dylib darwin-x64/libcompose_webview_macos.dylib; do
grep -q "nucleus/native/$f" <<< "$contents" || { echo "::error::$jar is missing $f"; exit 1; }
done
- name: Upload maven local
uses: actions/upload-artifact@v7
with:
name: maven-local
path: ~/.m2/repository/
build-android:
name: Android
needs: [validate-inputs, prepare-deps]
needs: validate-inputs
if: ${{ inputs.platform == 'all' || inputs.platform == 'android' }}
timeout-minutes: 120
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Download maven local
uses: actions/download-artifact@v8
with:
name: maven-local
path: ~/.m2/repository/
- name: Set up JDK 21
uses: actions/setup-java@v6
with:
@ -263,7 +127,7 @@ jobs:
build-linux:
name: Linux Desktop
needs: [validate-inputs, prepare-deps]
needs: validate-inputs
if: ${{ inputs.platform == 'all' || inputs.platform == 'linux-x86_64' }}
timeout-minutes: 120
runs-on: ubuntu-latest
@ -278,12 +142,6 @@ jobs:
sudo apt-get update
sudo apt-get install -y rpm fuse build-essential zlib1g-dev patchelf zstd
- name: Download maven local
uses: actions/download-artifact@v8
with:
name: maven-local
path: ~/.m2/repository/
- name: Set up JDK 21
uses: actions/setup-java@v6
with:
@ -377,7 +235,7 @@ jobs:
build-linux-arm64:
name: Linux Desktop (aarch64)
needs: [validate-inputs, prepare-deps]
needs: validate-inputs
if: ${{ inputs.platform == 'all' || inputs.platform == 'linux-aarch64' }}
timeout-minutes: 120
runs-on: ubuntu-24.04-arm
@ -399,12 +257,6 @@ jobs:
sudo apt-get update
sudo apt-get install -y rpm fuse build-essential zlib1g-dev patchelf zstd
- name: Download maven local
uses: actions/download-artifact@v8
with:
name: maven-local
path: ~/.m2/repository/
- name: Set up JDK 21
uses: actions/setup-java@v6
with:
@ -498,19 +350,13 @@ jobs:
build-windows:
name: Windows Desktop
needs: [validate-inputs, prepare-deps]
needs: validate-inputs
if: ${{ inputs.platform == 'all' || inputs.platform == 'windows' }}
timeout-minutes: 120
runs-on: windows-latest
steps:
- uses: actions/checkout@v7
- name: Download maven local
uses: actions/download-artifact@v8
with:
name: maven-local
path: ~/.m2/repository/
- name: Set up JDK 21
uses: actions/setup-java@v6
with:
@ -562,19 +408,13 @@ jobs:
build-macos:
name: macOS Desktop
needs: [validate-inputs, prepare-deps]
needs: validate-inputs
if: ${{ inputs.platform == 'all' || inputs.platform == 'macos' }}
timeout-minutes: 120
runs-on: macos-latest
steps:
- uses: actions/checkout@v7
- name: Download maven local
uses: actions/download-artifact@v8
with:
name: maven-local
path: ~/.m2/repository/
- name: Set up JDK 21
uses: actions/setup-java@v6
with:
@ -631,19 +471,13 @@ jobs:
build-ios:
name: iOS
needs: [validate-inputs, prepare-deps]
needs: validate-inputs
if: ${{ inputs.platform == 'all' || inputs.platform == 'ios' }}
timeout-minutes: 120
runs-on: macos-latest
steps:
- uses: actions/checkout@v7
- name: Download maven local
uses: actions/download-artifact@v8
with:
name: maven-local
path: ~/.m2/repository/
- name: Set up JDK 21
uses: actions/setup-java@v6
with:
@ -705,7 +539,6 @@ jobs:
if: ${{ !inputs.dry_run && !cancelled() && !contains(needs.*.result, 'failure') }}
needs:
- validate-inputs
- prepare-deps
- build-android
- build-linux
- build-linux-arm64
@ -718,12 +551,6 @@ jobs:
steps:
- uses: actions/checkout@v7
- name: Download maven local
uses: actions/download-artifact@v8
with:
name: maven-local
path: ~/.m2/repository/
- name: Set up JDK 21
uses: actions/setup-java@v6
with:

View File

@ -646,12 +646,6 @@ tasks.withType<ComposeHotRun>().configureEach {
jvmArgs(
"--enable-native-access=ALL-UNNAMED"
)
// Linux: the hot-reload agent starts AWT before main(), and JBR's X11 toolkit pins GTK to
// XWayland, where the embedded WebKit WebView renders black. Tao owns the windows, so the
// reloadable JVM stays headless (DevTools runs in its own JVM and is unaffected).
if (System.getProperty("os.name").lowercase().contains("linux")) {
jvmArgs("-Djava.awt.headless=true")
}
systemProperty(
"compose.application.resources.dir",
project.layout.buildDirectory.dir("compose/tmp/prepareAppResources").get()

View File

@ -50,7 +50,7 @@ ziplineVersion = "1.28.0"
ktor = "3.5.1"
dnssdkt = "1.1.0"
filekit = "0.14.2"
compose-webview = "0.1.0-SNAPSHOT"
compose-webview = "1.0.3"
composeNativeTray = "2.1.6"
koin = "4.2.2"
multiplatform-nav3-ui = "1.1.1"