Refactor local Skia build to Gradle/Kotlin (#1163)
Previously: - The bash script required specifying `SKIA_VERSION` separately from `gradle.properties`, leading to version mismatches - Script hardcoded `SKIA_TARGET` default to `iosSim`, requiring manual override on non-macOS systems This change: - Added `skiaVersionFromEnvOrProperties` property and `printSkiaVersion` task. The bash script now queries Gradle for the version instead of maintaining its own default. - Target platform now defaults to current OS (`hostOs.id`) instead of hardcoded `iosSim`. - Introduced `BuildLocalSkiaTask` that handles Python build script invocation, architecture detection, and validation. - Added `SkiaTarget` enum centralizing platform-specific Gradle flags and architecture mappings. - Simplified bash script: Now focuses solely on git operations (clone/checkout skia-pack), delegating all build logic to Gradle. ### Usage ```sh # Version from gradle.properties, target auto-detected from OS ./build-with-local-skia.sh # Override either via environment variables SKIA_VERSION=m138-80d088a-2 SKIA_TARGET=iosSim ./build-with-local-skia.sh # Or use Gradle tasks directly ./gradlew prepareLocalSkiaBuild -Pskia.target=linux ```
Showing
Please register or sign in to comment