Skip to content

Commit

Permalink
add react-native-photo-editor for ios + fix copying of builds folder …
Browse files Browse the repository at this point in the history
…from external pluginTemplatess
  • Loading branch information
ElenaDiachenko committed Mar 14, 2024
1 parent 15bd3c9 commit fbc09db
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 6 deletions.
21 changes: 20 additions & 1 deletion packages/app-harness/renative.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,26 @@
"package": "ui.photoeditor.RNPhotoEditorPackage"
},
"ios": {
"disabled": true
"podName": "iOSPhotoEditor",
"git": "https://github.com/prscX/photo-editor",
"commit": "4924e9ec984d25d03644e58aa148282642171de9",
"buildType": "dynamic",
"templateXcode": {
"Podfile": {
"header": ["plugin 'cocoapods-user-defined-build-types'", "enable_user_defined_build_types!"]
},
"project_pbxproj": {
"resourceFiles": [
"Resources/arrow1.png",
"Resources/arrow2.png",
"Resources/arrow3.png",
"Resources/arrow4.png",
"Resources/arrow5.png"
],
"sourceFiles": ["RNPhotoEditor/RNPhotoEditor.m"],
"headerFiles": ["RNPhotoEditor/RNPhotoEditor.h"]
}
}
},
"tvos": {
"disabled": true
Expand Down
11 changes: 6 additions & 5 deletions packages/core/src/plugins/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -905,12 +905,13 @@ export const copyTemplatePluginsSync = (c: RnvContext) => {

// FOLDER MERGES FROM SCOPED PLUGIN TEMPLATES
Object.keys(c.paths.rnv.pluginTemplates.dirs).forEach((pathKey) => {
if (pathKey !== 'rnv') {
const pluginTemplatePath = c.paths.rnv.pluginTemplates.dirs[pathKey];
// TODO: required for external rnv scoped templates to take effect. need to test full implications
// if (pathKey !== 'rnv') {
const pluginTemplatePath = c.paths.rnv.pluginTemplates.dirs[pathKey];

const sourcePath4sec = getAppConfigBuildsFolder(path.join(pluginTemplatePath, key));
copyFolderContentsRecursiveSync(sourcePath4sec, destPath, true, undefined, false, objectInject);
}
const sourcePath4sec = getAppConfigBuildsFolder(path.join(pluginTemplatePath, key));
copyFolderContentsRecursiveSync(sourcePath4sec, destPath, true, undefined, false, objectInject);
// }
});
});
};
Expand Down
11 changes: 11 additions & 0 deletions packages/engine-rn-tvos/templates/platforms/androidtv/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ buildscript {
ndkVersion = '{{NDK_VERSION}}'
kotlinVersion = '{{INJECT_KOTLIN_VERSION}}'
}
subprojects { subproject ->
afterEvaluate{
if((subproject.plugins.hasPlugin('android') || subproject.plugins.hasPlugin('android-library'))) {
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
}
}
}
}

repositories {
google()
mavenCentral()
Expand Down
11 changes: 11 additions & 0 deletions packages/engine-rn-tvos/templates/platforms/firetv/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ buildscript {
ndkVersion = '{{NDK_VERSION}}'
kotlinVersion = '{{INJECT_KOTLIN_VERSION}}'
}
subprojects { subproject ->
afterEvaluate{
if((subproject.plugins.hasPlugin('android') || subproject.plugins.hasPlugin('android-library'))) {
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
}
}
}
}

repositories {
google()
mavenCentral()
Expand Down
11 changes: 11 additions & 0 deletions packages/engine-rn/templates/platforms/androidwear/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ buildscript {
ndkVersion = '{{NDK_VERSION}}'
kotlinVersion = '{{INJECT_KOTLIN_VERSION}}'
}

subprojects { subproject ->
afterEvaluate{
if((subproject.plugins.hasPlugin('android') || subproject.plugins.hasPlugin('android-library'))) {
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
}
}
}
}
repositories {
google()
mavenCentral()
Expand Down

0 comments on commit fbc09db

Please sign in to comment.