• Ivan Matkov's avatar
    Refactor local Skia build to Gradle/Kotlin (#1163) · 3451c14e
    Ivan Matkov authored
    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
    ```
    3451c14e
Name
Last commit
Last update
.github Loading commit data...
.run Loading commit data...
gradle/wrapper Loading commit data...
samples Loading commit data...
skiko Loading commit data...
.gitignore Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
CONTRIBUTING.md Loading commit data...
DEVELOPMENT.md Loading commit data...
LICENSE Loading commit data...
NOTICE Loading commit data...
README.md Loading commit data...
SECURITY.md Loading commit data...
dependencies.toml Loading commit data...
gradle.properties Loading commit data...
gradlew Loading commit data...
gradlew.bat Loading commit data...
settings.gradle.kts Loading commit data...