Skip to content

Commit

Permalink
fix(💚): add missing xcframeworks files and remove duplicated headers (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
wcandillon authored Oct 1, 2024
1 parent bf416d8 commit f4db230
Show file tree
Hide file tree
Showing 17 changed files with 54 additions and 72 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ jobs:
env:
JAVA_OPTS: "-XX:MaxHeapSize=6g"
run: |
yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --force --concurrency 1
yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --concurrency 1
- name: Cache apk
if: env.turbo_cache_hit != 1
Expand Down
2 changes: 1 addition & 1 deletion apps/paper/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1935,7 +1935,7 @@ SPEC CHECKSUMS:
React-Mapbuffer: 1c08607305558666fd16678b85ef135e455d5c96
React-microtasksnativemodule: 87b8de96f937faefece8afd2cb3a518321b2ef99
react-native-safe-area-context: ab8f4a3d8180913bd78ae75dd599c94cce3d5e9a
react-native-skia: b1f33ae82bb728aee1d1602a6adfaee52af43f61
react-native-skia: 89e0ec26e70ca4f34a7a1f7425bc955baf77c566
react-native-slider: 97ce0bd921f40de79cead9754546d5e4e7ba44f8
react-native-wgpu: fb9d60b0f4c63a03fb60bd986d758aeffca6ee13
React-nativeconfig: 57781b79e11d5af7573e6f77cbf1143b71802a6d
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
#define GL_GLEXT_PROTOTYPES
#define EGL_EGLEXT_PROTOTYPES

#include "include/gpu/GrBackendSurface.h"
#include "include/gpu/GrDirectContext.h"
#include "include/gpu/ganesh/GrBackendSurface.h"
#include "include/gpu/ganesh/GrDirectContext.h"
#include "include/gpu/ganesh/gl/GrGLBackendSurface.h"
#include "include/gpu/gl/GrGLTypes.h"
#include "include/gpu/ganesh/gl/GrGLTypes.h"
#include "src/gpu/ganesh/gl/GrGLDefines.h"
// #include "src/gpu/ganesh/GrDirectContextPriv.h"
// #include "src/gpu/ganesh/gl/GrGLUtil.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

#if __ANDROID_API__ >= 26

#include "include/gpu/GrBackendSurface.h"
#include "include/gpu/GrTypes.h"
#include "include/gpu/ganesh/GrBackendSurface.h"
#include "include/gpu/ganesh/GrTypes.h"

class GrDirectContext;

Expand Down
4 changes: 2 additions & 2 deletions packages/skia/android/cpp/rnskia-android/SkiaOpenGLHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
#include "include/core/SkCanvas.h"
#include "include/core/SkColorSpace.h"
#include "include/core/SkSurface.h"
#include "include/gpu/GrDirectContext.h"
#include "include/gpu/ganesh/GrDirectContext.h"
#include "include/gpu/ganesh/gl/GrGLDirectContext.h"
#include "include/gpu/gl/GrGLInterface.h"
#include "include/gpu/ganesh/gl/GrGLInterface.h"

#pragma clang diagnostic pop

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
#include "include/core/SkCanvas.h"
#include "include/core/SkColorSpace.h"
#include "include/core/SkSurface.h"
#include "include/gpu/GrBackendSurface.h"
#include "include/gpu/GrDirectContext.h"
#include "include/gpu/ganesh/GrBackendSurface.h"
#include "include/gpu/ganesh/GrDirectContext.h"
#include "include/gpu/ganesh/SkSurfaceGanesh.h"
#include "include/gpu/gl/GrGLInterface.h"
#include "include/gpu/ganesh/gl/GrGLInterface.h"

#pragma clang diagnostic pop

Expand Down
2 changes: 1 addition & 1 deletion packages/skia/cpp/api/JsiSkSurface.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#pragma clang diagnostic ignored "-Wdocumentation"

#include "include/core/SkSurface.h"
#include "include/gpu/GrDirectContext.h"
#include "include/gpu/ganesh/GrDirectContext.h"

#pragma clang diagnostic pop

Expand Down
2 changes: 1 addition & 1 deletion packages/skia/ios/RNSkia-iOS/RNSkMetalCanvasProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdocumentation"

#import <include/gpu/GrDirectContext.h>
#import <include/gpu/ganesh/GrDirectContext.h>

#pragma clang diagnostic pop

Expand Down
4 changes: 2 additions & 2 deletions packages/skia/ios/RNSkia-iOS/RNSkMetalCanvasProvider.mm
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#import "include/core/SkColorSpace.h"
#import "include/core/SkSurface.h"

#import <include/gpu/GrBackendSurface.h>
#import <include/gpu/GrDirectContext.h>
#import <include/gpu/ganesh/GrBackendSurface.h>
#import <include/gpu/ganesh/GrDirectContext.h>
#import <include/gpu/ganesh/SkSurfaceGanesh.h>

#pragma clang diagnostic pop
Expand Down
4 changes: 2 additions & 2 deletions packages/skia/ios/RNSkia-iOS/SkiaCVPixelBufferUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
#pragma clang diagnostic ignored "-Wdocumentation"
#import "include/core/SkColorSpace.h"
#import "include/core/SkImage.h"
#import "include/gpu/GrBackendSurface.h"
#import "include/gpu/GrYUVABackendTextures.h"
#import "include/gpu/ganesh/GrBackendSurface.h"
#import "include/gpu/ganesh/GrYUVABackendTextures.h"
#pragma clang diagnostic pop

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/skia/ios/RNSkia-iOS/SkiaCVPixelBufferUtils.mm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdocumentation"
#import "include/core/SkColorSpace.h"
#import <include/gpu/GrBackendSurface.h>
#import <include/gpu/ganesh/GrBackendSurface.h>
#import <include/gpu/ganesh/SkImageGanesh.h>
#import <include/gpu/ganesh/mtl/GrMtlBackendContext.h>
#import <include/gpu/ganesh/mtl/GrMtlBackendSurface.h>
Expand Down
2 changes: 1 addition & 1 deletion packages/skia/ios/RNSkia-iOS/SkiaMetalSurfaceFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#import "include/core/SkCanvas.h"
#import <CoreMedia/CMSampleBuffer.h>
#import <CoreVideo/CVMetalTextureCache.h>
#import <include/gpu/GrDirectContext.h>
#import <include/gpu/ganesh/GrDirectContext.h>

#pragma clang diagnostic pop

Expand Down
4 changes: 2 additions & 2 deletions packages/skia/ios/RNSkia-iOS/SkiaMetalSurfaceFactory.mm
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#import "include/core/SkColorSpace.h"
#import "include/core/SkSurface.h"

#import <include/gpu/GrBackendSurface.h>
#import <include/gpu/GrDirectContext.h>
#import <include/gpu/ganesh/GrBackendSurface.h>
#import <include/gpu/ganesh/GrDirectContext.h>
#import <include/gpu/ganesh/SkImageGanesh.h>
#import <include/gpu/ganesh/SkSurfaceGanesh.h>
#import <include/gpu/ganesh/mtl/GrMtlBackendContext.h>
Expand Down
8 changes: 1 addition & 7 deletions packages/skia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,7 @@
"jestEnv.mjs",
"cpp/**/*.{h,cpp}",
"ios/**",
"libs/ios/libskia.xcframework/**",
"libs/ios/libskshaper.xcframework/**",
"libs/ios/libsvg.xcframework/**",
"libs/ios/libskottie.xcframework/**",
"libs/ios/libsksg.xcframework/**",
"libs/ios/libskparagraph.xcframework/**",
"libs/ios/libskunicode.xcframework/**",
"libs/ios/*.xcframework/**",
"react-native-skia.podspec",
"scripts/setup-canvaskit.js",
"dist/**"
Expand Down
9 changes: 5 additions & 4 deletions packages/skia/react-native-skia.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ Pod::Spec.new do |s|
@shopify/react-native-skia
DESC
s.homepage = "https://github.com/shopify/react-native-skia"
# brief license entry:
s.license = "MIT"
# optional - use expanded license entry instead:
# s.license = { :type => "MIT", :file => "LICENSE" }
s.authors = { "Your Name" => "[email protected]" }
s.license = { :type => "MIT", :file => "LICENSE.md" }
s.authors = {
"Christian Falch" => "[email protected]",
"William Candillon" => "[email protected]"
}
s.platforms = { :ios => "13.0" }
s.source = { :git => "https://github.com/shopify/react-native-skia/react-native-skia.git", :tag => "#{s.version}" }

Expand Down
24 changes: 23 additions & 1 deletion packages/skia/scripts/copy-skia-module-headers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,29 @@ const copyModule = (module: string) => [
"mkdir -p ./cpp/skia/modules/skunicode/include/",
"cp -a ../../externals/skia/modules/skunicode/include/SkUnicode.h ./cpp/skia/modules/skunicode/include/.",

"mkdir -p ./cpp/skia/include/gpu/graphite",
// Remove migrated headers
//grep -R "Delete this after migrating clients" cpp
"rm -rf ./cpp/skia/include/gpu/GrContextThreadSafeProxy.h",
"rm -rf ./cpp/skia/include/gpu/GrDirectContext.h",
"rm -rf ./cpp/skia/include/gpu/GrBackendSemaphore.h",
"rm -rf ./cpp/skia/include/gpu/mock/GrMockTypes.h",
"rm -rf ./cpp/skia/include/gpu/GrDriverBugWorkaroundsAutogen.h",
"rm -rf ./cpp/skia/include/gpu/GrTypes.h",
"rm -rf ./cpp/skia/include/gpu/vk/GrVkTypes.h",
"rm -rf ./cpp/skia/include/gpu/GrDriverBugWorkarounds.h",
"rm -rf ./cpp/skia/include/gpu/GrContextOptions.h",
"rm -rf ./cpp/skia/include/gpu/gl/GrGLExtensions.h",
"rm -rf ./cpp/skia/include/gpu/gl/GrGLAssembleInterface.h",
"rm -rf ./cpp/skia/include/gpu/gl/GrGLTypes.h",
"rm -rf ./cpp/skia/include/gpu/gl/GrGLConfig.h",
"rm -rf ./cpp/skia/include/gpu/gl/GrGLFunctions.h",
"rm -rf ./cpp/skia/include/gpu/gl/GrGLAssembleHelpers.h",
"rm -rf ./cpp/skia/include/gpu/gl/GrGLInterface.h",
"rm -rf ./cpp/skia/include/gpu/GrYUVABackendTextures.h",
"rm -rf ./cpp/skia/include/gpu/GrRecordingContext.h",
"rm -rf ./cpp/skia/include/gpu/GrBackendSurface.h",
"rm -rf ./cpp/skia/include/gpu/d3d/GrD3DBackendContext.h",
"rm -rf ./cpp/skia/include/gpu/d3d/GrD3DTypes.h",
].map((cmd) => {
console.log(cmd);
executeCmdSync(cmd);
Expand Down
41 changes: 3 additions & 38 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,13 @@
"$schema": "https://turbo.build/schema.json",
"tasks": {
"build:android": {
"env": ["JAVA_HOME", "ANDROID_NDK", "ANDROID_SDK", "ANDROID_HOME"],
"inputs": [
"packages/*/package.json",
"packages/app/package.json",
"packages/*/src/*.{ts,tsx}",
"apps/*/src/*.{ts,tsx}",
"apps/*/cpp/*.{cpp,h}",
"packages/*/android",
"!packages/*/android/build",
"apps/*/src/android",
"!apps/*/src/.gradle",
"!apps/*/src/build",
"!apps/*/src/app/build"
],
"outputs": [
"apps/*/android/**"
]
"env": ["JAVA_HOME", "ANDROID_NDK", "ANDROID_SDK", "ANDROID_HOME"]
},
"build:ios": {
"dependsOn": ["pod:install"],
"outputs": [
"apps/*/ios/build/**",
"!apps/*/ios/.ios.xcode.env.local"
],
"inputs": [
"packages/*/package.json",
"packages/app/package.json",
"packages/*/src/*.{ts,tsx}",
"apps/*/src/*.{ts,tsx}",
"apps/*/cpp/*.{cpp,h}",
"packages/*/*.podspec",
"packages/*/ios",
"apps/*/ios",
"!apps/*/ios/.ios.xcode.env.local",
"!apps/*/ios/build",
"!apps/*/ios/Pods"
]
"dependsOn": ["pod:install"]
},
"pod:install": {
"cache": false,
"inputs": ["**/ios/Podfile", "**/ios/Podfile.lock"],
"outputs": ["**/ios/Pods/**"]
"cache": false
},
"lint": {},
"tsc": {},
Expand Down

0 comments on commit f4db230

Please sign in to comment.