From d74d26ed4e7ffca486dcfb7cd85d9b604ef1068c Mon Sep 17 00:00:00 2001 From: Krzysztof Borowy Date: Thu, 16 Jul 2020 09:56:55 +0200 Subject: [PATCH] fix: separate example from native lib --- src/create.ts | 7 +- .../example/$package.json | 0 .../example/android/app/build.gradle | 0 .../example/android/app/debug.keystore | Bin .../example/android/app/proguard-rules.pro | 0 .../android/app/src/debug/AndroidManifest.xml | 0 .../ReactNativeFlipper.java | 0 .../android/app/src/main/AndroidManifest.xml | 0 .../{%= project.package %}/MainActivity.java | 0 .../MainApplication.java | 5 +- .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin .../res/mipmap-hdpi/ic_launcher_round.png | Bin .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin .../res/mipmap-mdpi/ic_launcher_round.png | Bin .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin .../res/mipmap-xhdpi/ic_launcher_round.png | Bin .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin .../res/mipmap-xxhdpi/ic_launcher_round.png | Bin .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin .../res/mipmap-xxxhdpi/ic_launcher_round.png | Bin .../app/src/main/res/values/strings.xml | 0 .../app/src/main/res/values/styles.xml | 0 .../example/android/build.gradle | 0 .../example/android/gradle.properties | 0 .../android/gradle/wrapper/gradle-wrapper.jar | Bin .../gradle/wrapper/gradle-wrapper.properties | 0 .../example/android/gradlew | 0 .../example/android/gradlew.bat | 200 +++++++++--------- .../example/android/settings.gradle | 0 .../example/app.json | 0 .../example/babel.config.js | 0 .../example/index.tsx | 0 .../example/ios/File.swift | 0 .../example/ios/Podfile | 0 ...= project.name %}Example-Bridging-Header.h | 0 .../project.pbxproj | 0 .../contents.xcworkspacedata | 0 .../{%= project.name %}Example.xcscheme | 0 .../contents.xcworkspacedata | 0 .../xcshareddata/IDEWorkspaceChecks.plist | 0 .../{%= project.name %}Example/AppDelegate.h | 0 .../{%= project.name %}Example/AppDelegate.m | 0 .../Base.lproj/LaunchScreen.xib | 0 .../AppIcon.appiconset/Contents.json | 0 .../Images.xcassets/Contents.json | 0 .../ios/{%= project.name %}Example/Info.plist | 0 .../ios/{%= project.name %}Example/main.m | 0 47 files changed, 109 insertions(+), 103 deletions(-) rename templates/{native-library => example}/example/$package.json (100%) rename templates/{native-library => example}/example/android/app/build.gradle (100%) rename templates/{native-library => example}/example/android/app/debug.keystore (100%) rename templates/{native-library => example}/example/android/app/proguard-rules.pro (100%) rename templates/{native-library => example}/example/android/app/src/debug/AndroidManifest.xml (100%) rename templates/{native-library => example}/example/android/app/src/debug/java/com/example/{%= project.package %}/ReactNativeFlipper.java (100%) rename templates/{native-library => example}/example/android/app/src/main/AndroidManifest.xml (100%) rename templates/{native-library => example}/example/android/app/src/main/java/com/example/{%= project.package %}/MainActivity.java (100%) rename templates/{native-library => example}/example/android/app/src/main/java/com/example/{%= project.package %}/MainApplication.java (95%) rename templates/{native-library => example}/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png (100%) rename templates/{native-library => example}/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png (100%) rename templates/{native-library => example}/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png (100%) rename templates/{native-library => example}/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png (100%) rename templates/{native-library => example}/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png (100%) rename templates/{native-library => example}/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png (100%) rename templates/{native-library => example}/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png (100%) rename templates/{native-library => example}/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png (100%) rename templates/{native-library => example}/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png (100%) rename templates/{native-library => example}/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png (100%) rename templates/{native-library => example}/example/android/app/src/main/res/values/strings.xml (100%) rename templates/{native-library => example}/example/android/app/src/main/res/values/styles.xml (100%) rename templates/{native-library => example}/example/android/build.gradle (100%) rename templates/{native-library => example}/example/android/gradle.properties (100%) rename templates/{native-library => example}/example/android/gradle/wrapper/gradle-wrapper.jar (100%) rename templates/{native-library => example}/example/android/gradle/wrapper/gradle-wrapper.properties (100%) rename templates/{native-library => example}/example/android/gradlew (100%) rename templates/{native-library => example}/example/android/gradlew.bat (96%) rename templates/{native-library => example}/example/android/settings.gradle (100%) rename templates/{native-library => example}/example/app.json (100%) rename templates/{native-library => example}/example/babel.config.js (100%) rename templates/{native-library => example}/example/index.tsx (100%) rename templates/{native-library => example}/example/ios/File.swift (100%) rename templates/{native-library => example}/example/ios/Podfile (100%) rename templates/{native-library => example}/example/ios/{%= project.name %}Example-Bridging-Header.h (100%) rename templates/{native-library => example}/example/ios/{%= project.name %}Example.xcodeproj/project.pbxproj (100%) rename templates/{native-library => example}/example/ios/{%= project.name %}Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata (100%) rename templates/{native-library => example}/example/ios/{%= project.name %}Example.xcodeproj/xcshareddata/xcschemes/{%= project.name %}Example.xcscheme (100%) rename templates/{native-library => example}/example/ios/{%= project.name %}Example.xcworkspace/contents.xcworkspacedata (100%) rename templates/{native-library => example}/example/ios/{%= project.name %}Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (100%) rename templates/{native-library => example}/example/ios/{%= project.name %}Example/AppDelegate.h (100%) rename templates/{native-library => example}/example/ios/{%= project.name %}Example/AppDelegate.m (100%) rename templates/{native-library => example}/example/ios/{%= project.name %}Example/Base.lproj/LaunchScreen.xib (100%) rename templates/{native-library => example}/example/ios/{%= project.name %}Example/Images.xcassets/AppIcon.appiconset/Contents.json (100%) rename templates/{native-library => example}/example/ios/{%= project.name %}Example/Images.xcassets/Contents.json (100%) rename templates/{native-library => example}/example/ios/{%= project.name %}Example/Info.plist (100%) rename templates/{native-library => example}/example/ios/{%= project.name %}Example/main.m (100%) diff --git a/src/create.ts b/src/create.ts index cb0c2ae39..cb6f62ba8 100644 --- a/src/create.ts +++ b/src/create.ts @@ -19,6 +19,7 @@ const EXPO_FILES = path.resolve(__dirname, '../templates/expo-library'); const CPP_FILES = path.resolve(__dirname, '../templates/cpp-library'); const OBJC_FILES = path.resolve(__dirname, '../templates/objc-library'); const SWIFT_FILES = path.resolve(__dirname, '../templates/swift-library'); +const EXAMPLE_FILES = path.resolve(__dirname, '../templates/example'); type ArgName = | 'slug' @@ -275,10 +276,14 @@ export default async function create(argv: yargs.Arguments) { } else if (type === 'js') { await copyDir(JS_FILES, folder); await copyDir( - path.join(NATIVE_FILES, 'example'), + path.join(EXAMPLE_FILES, 'example'), path.join(folder, 'example') ); } else { + await copyDir( + path.join(EXAMPLE_FILES, 'example'), + path.join(folder, 'example') + ); await copyDir(NATIVE_FILES, folder); if (type === 'cpp') { diff --git a/templates/native-library/example/$package.json b/templates/example/example/$package.json similarity index 100% rename from templates/native-library/example/$package.json rename to templates/example/example/$package.json diff --git a/templates/native-library/example/android/app/build.gradle b/templates/example/example/android/app/build.gradle similarity index 100% rename from templates/native-library/example/android/app/build.gradle rename to templates/example/example/android/app/build.gradle diff --git a/templates/native-library/example/android/app/debug.keystore b/templates/example/example/android/app/debug.keystore similarity index 100% rename from templates/native-library/example/android/app/debug.keystore rename to templates/example/example/android/app/debug.keystore diff --git a/templates/native-library/example/android/app/proguard-rules.pro b/templates/example/example/android/app/proguard-rules.pro similarity index 100% rename from templates/native-library/example/android/app/proguard-rules.pro rename to templates/example/example/android/app/proguard-rules.pro diff --git a/templates/native-library/example/android/app/src/debug/AndroidManifest.xml b/templates/example/example/android/app/src/debug/AndroidManifest.xml similarity index 100% rename from templates/native-library/example/android/app/src/debug/AndroidManifest.xml rename to templates/example/example/android/app/src/debug/AndroidManifest.xml diff --git a/templates/native-library/example/android/app/src/debug/java/com/example/{%= project.package %}/ReactNativeFlipper.java b/templates/example/example/android/app/src/debug/java/com/example/{%= project.package %}/ReactNativeFlipper.java similarity index 100% rename from templates/native-library/example/android/app/src/debug/java/com/example/{%= project.package %}/ReactNativeFlipper.java rename to templates/example/example/android/app/src/debug/java/com/example/{%= project.package %}/ReactNativeFlipper.java diff --git a/templates/native-library/example/android/app/src/main/AndroidManifest.xml b/templates/example/example/android/app/src/main/AndroidManifest.xml similarity index 100% rename from templates/native-library/example/android/app/src/main/AndroidManifest.xml rename to templates/example/example/android/app/src/main/AndroidManifest.xml diff --git a/templates/native-library/example/android/app/src/main/java/com/example/{%= project.package %}/MainActivity.java b/templates/example/example/android/app/src/main/java/com/example/{%= project.package %}/MainActivity.java similarity index 100% rename from templates/native-library/example/android/app/src/main/java/com/example/{%= project.package %}/MainActivity.java rename to templates/example/example/android/app/src/main/java/com/example/{%= project.package %}/MainActivity.java diff --git a/templates/native-library/example/android/app/src/main/java/com/example/{%= project.package %}/MainApplication.java b/templates/example/example/android/app/src/main/java/com/example/{%= project.package %}/MainApplication.java similarity index 95% rename from templates/native-library/example/android/app/src/main/java/com/example/{%= project.package %}/MainApplication.java rename to templates/example/example/android/app/src/main/java/com/example/{%= project.package %}/MainApplication.java index 484cfb5b0..c0a94b378 100644 --- a/templates/native-library/example/android/app/src/main/java/com/example/{%= project.package %}/MainApplication.java +++ b/templates/example/example/android/app/src/main/java/com/example/{%= project.package %}/MainApplication.java @@ -10,8 +10,9 @@ import com.facebook.soloader.SoLoader; import java.lang.reflect.InvocationTargetException; import java.util.List; - +<% if (project.module) { -%> import com.<%= project.package %>.<%= project.name %>Package; +<% } -%> public class MainApplication extends Application implements ReactApplication { @@ -28,7 +29,7 @@ protected List getPackages() { List packages = new PackageList(this).getPackages(); // Packages that cannot be autolinked yet can be added manually here, for <%= project.name %>Example: // packages.add(new MyReactNativePackage()); - packages.add(new <%= project.name %>Package()); + <% if (project.module) { -%>packages.add(new <%= project.name %>Package());<% } -%> return packages; } diff --git a/templates/native-library/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/templates/example/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from templates/native-library/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png rename to templates/example/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/templates/native-library/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/templates/example/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png similarity index 100% rename from templates/native-library/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png rename to templates/example/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png diff --git a/templates/native-library/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/templates/example/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from templates/native-library/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png rename to templates/example/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/templates/native-library/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/templates/example/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png similarity index 100% rename from templates/native-library/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png rename to templates/example/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png diff --git a/templates/native-library/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/templates/example/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from templates/native-library/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png rename to templates/example/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/templates/native-library/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/templates/example/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png similarity index 100% rename from templates/native-library/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png rename to templates/example/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png diff --git a/templates/native-library/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/templates/example/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from templates/native-library/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to templates/example/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/templates/native-library/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/templates/example/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png similarity index 100% rename from templates/native-library/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png rename to templates/example/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png diff --git a/templates/native-library/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/templates/example/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from templates/native-library/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png rename to templates/example/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/templates/native-library/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/templates/example/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png similarity index 100% rename from templates/native-library/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png rename to templates/example/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png diff --git a/templates/native-library/example/android/app/src/main/res/values/strings.xml b/templates/example/example/android/app/src/main/res/values/strings.xml similarity index 100% rename from templates/native-library/example/android/app/src/main/res/values/strings.xml rename to templates/example/example/android/app/src/main/res/values/strings.xml diff --git a/templates/native-library/example/android/app/src/main/res/values/styles.xml b/templates/example/example/android/app/src/main/res/values/styles.xml similarity index 100% rename from templates/native-library/example/android/app/src/main/res/values/styles.xml rename to templates/example/example/android/app/src/main/res/values/styles.xml diff --git a/templates/native-library/example/android/build.gradle b/templates/example/example/android/build.gradle similarity index 100% rename from templates/native-library/example/android/build.gradle rename to templates/example/example/android/build.gradle diff --git a/templates/native-library/example/android/gradle.properties b/templates/example/example/android/gradle.properties similarity index 100% rename from templates/native-library/example/android/gradle.properties rename to templates/example/example/android/gradle.properties diff --git a/templates/native-library/example/android/gradle/wrapper/gradle-wrapper.jar b/templates/example/example/android/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from templates/native-library/example/android/gradle/wrapper/gradle-wrapper.jar rename to templates/example/example/android/gradle/wrapper/gradle-wrapper.jar diff --git a/templates/native-library/example/android/gradle/wrapper/gradle-wrapper.properties b/templates/example/example/android/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from templates/native-library/example/android/gradle/wrapper/gradle-wrapper.properties rename to templates/example/example/android/gradle/wrapper/gradle-wrapper.properties diff --git a/templates/native-library/example/android/gradlew b/templates/example/example/android/gradlew similarity index 100% rename from templates/native-library/example/android/gradlew rename to templates/example/example/android/gradlew diff --git a/templates/native-library/example/android/gradlew.bat b/templates/example/example/android/gradlew.bat similarity index 96% rename from templates/native-library/example/android/gradlew.bat rename to templates/example/example/android/gradlew.bat index 15e1ee37a..9991c5032 100644 --- a/templates/native-library/example/android/gradlew.bat +++ b/templates/example/example/android/gradlew.bat @@ -1,100 +1,100 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem http://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem http://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/templates/native-library/example/android/settings.gradle b/templates/example/example/android/settings.gradle similarity index 100% rename from templates/native-library/example/android/settings.gradle rename to templates/example/example/android/settings.gradle diff --git a/templates/native-library/example/app.json b/templates/example/example/app.json similarity index 100% rename from templates/native-library/example/app.json rename to templates/example/example/app.json diff --git a/templates/native-library/example/babel.config.js b/templates/example/example/babel.config.js similarity index 100% rename from templates/native-library/example/babel.config.js rename to templates/example/example/babel.config.js diff --git a/templates/native-library/example/index.tsx b/templates/example/example/index.tsx similarity index 100% rename from templates/native-library/example/index.tsx rename to templates/example/example/index.tsx diff --git a/templates/native-library/example/ios/File.swift b/templates/example/example/ios/File.swift similarity index 100% rename from templates/native-library/example/ios/File.swift rename to templates/example/example/ios/File.swift diff --git a/templates/native-library/example/ios/Podfile b/templates/example/example/ios/Podfile similarity index 100% rename from templates/native-library/example/ios/Podfile rename to templates/example/example/ios/Podfile diff --git a/templates/native-library/example/ios/{%= project.name %}Example-Bridging-Header.h b/templates/example/example/ios/{%= project.name %}Example-Bridging-Header.h similarity index 100% rename from templates/native-library/example/ios/{%= project.name %}Example-Bridging-Header.h rename to templates/example/example/ios/{%= project.name %}Example-Bridging-Header.h diff --git a/templates/native-library/example/ios/{%= project.name %}Example.xcodeproj/project.pbxproj b/templates/example/example/ios/{%= project.name %}Example.xcodeproj/project.pbxproj similarity index 100% rename from templates/native-library/example/ios/{%= project.name %}Example.xcodeproj/project.pbxproj rename to templates/example/example/ios/{%= project.name %}Example.xcodeproj/project.pbxproj diff --git a/templates/native-library/example/ios/{%= project.name %}Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/templates/example/example/ios/{%= project.name %}Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from templates/native-library/example/ios/{%= project.name %}Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to templates/example/example/ios/{%= project.name %}Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/templates/native-library/example/ios/{%= project.name %}Example.xcodeproj/xcshareddata/xcschemes/{%= project.name %}Example.xcscheme b/templates/example/example/ios/{%= project.name %}Example.xcodeproj/xcshareddata/xcschemes/{%= project.name %}Example.xcscheme similarity index 100% rename from templates/native-library/example/ios/{%= project.name %}Example.xcodeproj/xcshareddata/xcschemes/{%= project.name %}Example.xcscheme rename to templates/example/example/ios/{%= project.name %}Example.xcodeproj/xcshareddata/xcschemes/{%= project.name %}Example.xcscheme diff --git a/templates/native-library/example/ios/{%= project.name %}Example.xcworkspace/contents.xcworkspacedata b/templates/example/example/ios/{%= project.name %}Example.xcworkspace/contents.xcworkspacedata similarity index 100% rename from templates/native-library/example/ios/{%= project.name %}Example.xcworkspace/contents.xcworkspacedata rename to templates/example/example/ios/{%= project.name %}Example.xcworkspace/contents.xcworkspacedata diff --git a/templates/native-library/example/ios/{%= project.name %}Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/templates/example/example/ios/{%= project.name %}Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from templates/native-library/example/ios/{%= project.name %}Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to templates/example/example/ios/{%= project.name %}Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/templates/native-library/example/ios/{%= project.name %}Example/AppDelegate.h b/templates/example/example/ios/{%= project.name %}Example/AppDelegate.h similarity index 100% rename from templates/native-library/example/ios/{%= project.name %}Example/AppDelegate.h rename to templates/example/example/ios/{%= project.name %}Example/AppDelegate.h diff --git a/templates/native-library/example/ios/{%= project.name %}Example/AppDelegate.m b/templates/example/example/ios/{%= project.name %}Example/AppDelegate.m similarity index 100% rename from templates/native-library/example/ios/{%= project.name %}Example/AppDelegate.m rename to templates/example/example/ios/{%= project.name %}Example/AppDelegate.m diff --git a/templates/native-library/example/ios/{%= project.name %}Example/Base.lproj/LaunchScreen.xib b/templates/example/example/ios/{%= project.name %}Example/Base.lproj/LaunchScreen.xib similarity index 100% rename from templates/native-library/example/ios/{%= project.name %}Example/Base.lproj/LaunchScreen.xib rename to templates/example/example/ios/{%= project.name %}Example/Base.lproj/LaunchScreen.xib diff --git a/templates/native-library/example/ios/{%= project.name %}Example/Images.xcassets/AppIcon.appiconset/Contents.json b/templates/example/example/ios/{%= project.name %}Example/Images.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from templates/native-library/example/ios/{%= project.name %}Example/Images.xcassets/AppIcon.appiconset/Contents.json rename to templates/example/example/ios/{%= project.name %}Example/Images.xcassets/AppIcon.appiconset/Contents.json diff --git a/templates/native-library/example/ios/{%= project.name %}Example/Images.xcassets/Contents.json b/templates/example/example/ios/{%= project.name %}Example/Images.xcassets/Contents.json similarity index 100% rename from templates/native-library/example/ios/{%= project.name %}Example/Images.xcassets/Contents.json rename to templates/example/example/ios/{%= project.name %}Example/Images.xcassets/Contents.json diff --git a/templates/native-library/example/ios/{%= project.name %}Example/Info.plist b/templates/example/example/ios/{%= project.name %}Example/Info.plist similarity index 100% rename from templates/native-library/example/ios/{%= project.name %}Example/Info.plist rename to templates/example/example/ios/{%= project.name %}Example/Info.plist diff --git a/templates/native-library/example/ios/{%= project.name %}Example/main.m b/templates/example/example/ios/{%= project.name %}Example/main.m similarity index 100% rename from templates/native-library/example/ios/{%= project.name %}Example/main.m rename to templates/example/example/ios/{%= project.name %}Example/main.m