diff --git a/kotlin-native/backend.native/tests/samples/README.md b/kotlin-native/backend.native/tests/samples/README.md new file mode 100644 index 00000000000..f6d065fec45 --- /dev/null +++ b/kotlin-native/backend.native/tests/samples/README.md @@ -0,0 +1,2 @@ +This directory contains a set of compiler tests. +They do not demonstrate Kotlin/Native best practices, and are mostly pretty outdated. diff --git a/kotlin-native/samples/build.gradle.kts b/kotlin-native/backend.native/tests/samples/build.gradle.kts similarity index 100% rename from kotlin-native/samples/build.gradle.kts rename to kotlin-native/backend.native/tests/samples/build.gradle.kts diff --git a/kotlin-native/samples/coverage/build.gradle.kts b/kotlin-native/backend.native/tests/samples/coverage/build.gradle.kts similarity index 100% rename from kotlin-native/samples/coverage/build.gradle.kts rename to kotlin-native/backend.native/tests/samples/coverage/build.gradle.kts diff --git a/kotlin-native/samples/coverage/gradle.properties b/kotlin-native/backend.native/tests/samples/coverage/gradle.properties similarity index 100% rename from kotlin-native/samples/coverage/gradle.properties rename to kotlin-native/backend.native/tests/samples/coverage/gradle.properties diff --git a/kotlin-native/samples/coverage/src/coverageMain/kotlin/bar.kt b/kotlin-native/backend.native/tests/samples/coverage/src/coverageMain/kotlin/bar.kt similarity index 100% rename from kotlin-native/samples/coverage/src/coverageMain/kotlin/bar.kt rename to kotlin-native/backend.native/tests/samples/coverage/src/coverageMain/kotlin/bar.kt diff --git a/kotlin-native/samples/coverage/src/coverageMain/kotlin/main.kt b/kotlin-native/backend.native/tests/samples/coverage/src/coverageMain/kotlin/main.kt similarity index 100% rename from kotlin-native/samples/coverage/src/coverageMain/kotlin/main.kt rename to kotlin-native/backend.native/tests/samples/coverage/src/coverageMain/kotlin/main.kt diff --git a/kotlin-native/samples/coverage/src/coverageTest/kotlin/Tests.kt b/kotlin-native/backend.native/tests/samples/coverage/src/coverageTest/kotlin/Tests.kt similarity index 100% rename from kotlin-native/samples/coverage/src/coverageTest/kotlin/Tests.kt rename to kotlin-native/backend.native/tests/samples/coverage/src/coverageTest/kotlin/Tests.kt diff --git a/kotlin-native/samples/csvparser/build.gradle.kts b/kotlin-native/backend.native/tests/samples/csvparser/build.gradle.kts similarity index 100% rename from kotlin-native/samples/csvparser/build.gradle.kts rename to kotlin-native/backend.native/tests/samples/csvparser/build.gradle.kts diff --git a/kotlin-native/samples/csvparser/gradle.properties b/kotlin-native/backend.native/tests/samples/csvparser/gradle.properties similarity index 100% rename from kotlin-native/samples/csvparser/gradle.properties rename to kotlin-native/backend.native/tests/samples/csvparser/gradle.properties diff --git a/kotlin-native/samples/csvparser/src/csvParserMain/kotlin/CsvParser.kt b/kotlin-native/backend.native/tests/samples/csvparser/src/csvParserMain/kotlin/CsvParser.kt similarity index 100% rename from kotlin-native/samples/csvparser/src/csvParserMain/kotlin/CsvParser.kt rename to kotlin-native/backend.native/tests/samples/csvparser/src/csvParserMain/kotlin/CsvParser.kt diff --git a/kotlin-native/samples/curl/build.gradle.kts b/kotlin-native/backend.native/tests/samples/curl/build.gradle.kts similarity index 100% rename from kotlin-native/samples/curl/build.gradle.kts rename to kotlin-native/backend.native/tests/samples/curl/build.gradle.kts diff --git a/kotlin-native/samples/curl/gradle.properties b/kotlin-native/backend.native/tests/samples/curl/gradle.properties similarity index 100% rename from kotlin-native/samples/curl/gradle.properties rename to kotlin-native/backend.native/tests/samples/curl/gradle.properties diff --git a/kotlin-native/samples/curl/src/curlMain/kotlin/main.kt b/kotlin-native/backend.native/tests/samples/curl/src/curlMain/kotlin/main.kt similarity index 100% rename from kotlin-native/samples/curl/src/curlMain/kotlin/main.kt rename to kotlin-native/backend.native/tests/samples/curl/src/curlMain/kotlin/main.kt diff --git a/kotlin-native/samples/echoServer/build.gradle.kts b/kotlin-native/backend.native/tests/samples/echoServer/build.gradle.kts similarity index 100% rename from kotlin-native/samples/echoServer/build.gradle.kts rename to kotlin-native/backend.native/tests/samples/echoServer/build.gradle.kts diff --git a/kotlin-native/samples/echoServer/gradle.properties b/kotlin-native/backend.native/tests/samples/echoServer/gradle.properties similarity index 100% rename from kotlin-native/samples/echoServer/gradle.properties rename to kotlin-native/backend.native/tests/samples/echoServer/gradle.properties diff --git a/kotlin-native/samples/echoServer/src/echoServerMain/kotlin/EchoServer.kt b/kotlin-native/backend.native/tests/samples/echoServer/src/echoServerMain/kotlin/EchoServer.kt similarity index 100% rename from kotlin-native/samples/echoServer/src/echoServerMain/kotlin/EchoServer.kt rename to kotlin-native/backend.native/tests/samples/echoServer/src/echoServerMain/kotlin/EchoServer.kt diff --git a/kotlin-native/samples/globalState/build.gradle.kts b/kotlin-native/backend.native/tests/samples/globalState/build.gradle.kts similarity index 100% rename from kotlin-native/samples/globalState/build.gradle.kts rename to kotlin-native/backend.native/tests/samples/globalState/build.gradle.kts diff --git a/kotlin-native/samples/globalState/gradle.properties b/kotlin-native/backend.native/tests/samples/globalState/gradle.properties similarity index 100% rename from kotlin-native/samples/globalState/gradle.properties rename to kotlin-native/backend.native/tests/samples/globalState/gradle.properties diff --git a/kotlin-native/samples/globalState/src/globalStateMain/kotlin/Global.kt b/kotlin-native/backend.native/tests/samples/globalState/src/globalStateMain/kotlin/Global.kt similarity index 100% rename from kotlin-native/samples/globalState/src/globalStateMain/kotlin/Global.kt rename to kotlin-native/backend.native/tests/samples/globalState/src/globalStateMain/kotlin/Global.kt diff --git a/kotlin-native/samples/globalState/src/nativeInterop/cinterop/global.def b/kotlin-native/backend.native/tests/samples/globalState/src/nativeInterop/cinterop/global.def similarity index 100% rename from kotlin-native/samples/globalState/src/nativeInterop/cinterop/global.def rename to kotlin-native/backend.native/tests/samples/globalState/src/nativeInterop/cinterop/global.def diff --git a/kotlin-native/samples/gradle.properties b/kotlin-native/backend.native/tests/samples/gradle.properties similarity index 100% rename from kotlin-native/samples/gradle.properties rename to kotlin-native/backend.native/tests/samples/gradle.properties diff --git a/kotlin-native/samples/gradle/wrapper/gradle-wrapper.jar b/kotlin-native/backend.native/tests/samples/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from kotlin-native/samples/gradle/wrapper/gradle-wrapper.jar rename to kotlin-native/backend.native/tests/samples/gradle/wrapper/gradle-wrapper.jar diff --git a/kotlin-native/samples/gradle/wrapper/gradle-wrapper.properties b/kotlin-native/backend.native/tests/samples/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from kotlin-native/samples/gradle/wrapper/gradle-wrapper.properties rename to kotlin-native/backend.native/tests/samples/gradle/wrapper/gradle-wrapper.properties diff --git a/kotlin-native/samples/gradlew b/kotlin-native/backend.native/tests/samples/gradlew similarity index 100% rename from kotlin-native/samples/gradlew rename to kotlin-native/backend.native/tests/samples/gradlew diff --git a/kotlin-native/samples/gradlew.bat b/kotlin-native/backend.native/tests/samples/gradlew.bat similarity index 96% rename from kotlin-native/samples/gradlew.bat rename to kotlin-native/backend.native/tests/samples/gradlew.bat index ac1b06f9382..107acd32c4e 100644 --- a/kotlin-native/samples/gradlew.bat +++ b/kotlin-native/backend.native/tests/samples/gradlew.bat @@ -1,89 +1,89 @@ -@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 https://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 Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@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 execute - -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 execute - -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 - -: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 %* - -: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 https://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 Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@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 execute + +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 execute + +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 + +: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 %* + +: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/kotlin-native/samples/html5Canvas/build.gradle.kts b/kotlin-native/backend.native/tests/samples/html5Canvas/build.gradle.kts similarity index 100% rename from kotlin-native/samples/html5Canvas/build.gradle.kts rename to kotlin-native/backend.native/tests/samples/html5Canvas/build.gradle.kts diff --git a/kotlin-native/samples/html5Canvas/gradle.properties b/kotlin-native/backend.native/tests/samples/html5Canvas/gradle.properties similarity index 100% rename from kotlin-native/samples/html5Canvas/gradle.properties rename to kotlin-native/backend.native/tests/samples/html5Canvas/gradle.properties diff --git a/kotlin-native/samples/html5Canvas/index.html b/kotlin-native/backend.native/tests/samples/html5Canvas/index.html similarity index 100% rename from kotlin-native/samples/html5Canvas/index.html rename to kotlin-native/backend.native/tests/samples/html5Canvas/index.html diff --git a/kotlin-native/samples/html5Canvas/src/html5CanvasMain/kotlin/main.kt b/kotlin-native/backend.native/tests/samples/html5Canvas/src/html5CanvasMain/kotlin/main.kt similarity index 100% rename from kotlin-native/samples/html5Canvas/src/html5CanvasMain/kotlin/main.kt rename to kotlin-native/backend.native/tests/samples/html5Canvas/src/html5CanvasMain/kotlin/main.kt diff --git a/kotlin-native/samples/html5Canvas/src/httpServerMain/kotlin/HttpServer.kt b/kotlin-native/backend.native/tests/samples/html5Canvas/src/httpServerMain/kotlin/HttpServer.kt similarity index 100% rename from kotlin-native/samples/html5Canvas/src/httpServerMain/kotlin/HttpServer.kt rename to kotlin-native/backend.native/tests/samples/html5Canvas/src/httpServerMain/kotlin/HttpServer.kt diff --git a/kotlin-native/samples/libcurl/build.gradle.kts b/kotlin-native/backend.native/tests/samples/libcurl/build.gradle.kts similarity index 100% rename from kotlin-native/samples/libcurl/build.gradle.kts rename to kotlin-native/backend.native/tests/samples/libcurl/build.gradle.kts diff --git a/kotlin-native/samples/libcurl/gradle.properties b/kotlin-native/backend.native/tests/samples/libcurl/gradle.properties similarity index 100% rename from kotlin-native/samples/libcurl/gradle.properties rename to kotlin-native/backend.native/tests/samples/libcurl/gradle.properties diff --git a/kotlin-native/samples/libcurl/src/libcurlMain/kotlin/CUrl.kt b/kotlin-native/backend.native/tests/samples/libcurl/src/libcurlMain/kotlin/CUrl.kt similarity index 100% rename from kotlin-native/samples/libcurl/src/libcurlMain/kotlin/CUrl.kt rename to kotlin-native/backend.native/tests/samples/libcurl/src/libcurlMain/kotlin/CUrl.kt diff --git a/kotlin-native/samples/libcurl/src/libcurlMain/kotlin/Event.kt b/kotlin-native/backend.native/tests/samples/libcurl/src/libcurlMain/kotlin/Event.kt similarity index 100% rename from kotlin-native/samples/libcurl/src/libcurlMain/kotlin/Event.kt rename to kotlin-native/backend.native/tests/samples/libcurl/src/libcurlMain/kotlin/Event.kt diff --git a/kotlin-native/samples/libcurl/src/nativeInterop/cinterop/libcurl.def b/kotlin-native/backend.native/tests/samples/libcurl/src/nativeInterop/cinterop/libcurl.def similarity index 100% rename from kotlin-native/samples/libcurl/src/nativeInterop/cinterop/libcurl.def rename to kotlin-native/backend.native/tests/samples/libcurl/src/nativeInterop/cinterop/libcurl.def diff --git a/kotlin-native/samples/nonBlockingEchoServer/build.gradle.kts b/kotlin-native/backend.native/tests/samples/nonBlockingEchoServer/build.gradle.kts similarity index 100% rename from kotlin-native/samples/nonBlockingEchoServer/build.gradle.kts rename to kotlin-native/backend.native/tests/samples/nonBlockingEchoServer/build.gradle.kts diff --git a/kotlin-native/samples/nonBlockingEchoServer/gradle.properties b/kotlin-native/backend.native/tests/samples/nonBlockingEchoServer/gradle.properties similarity index 100% rename from kotlin-native/samples/nonBlockingEchoServer/gradle.properties rename to kotlin-native/backend.native/tests/samples/nonBlockingEchoServer/gradle.properties diff --git a/kotlin-native/samples/nonBlockingEchoServer/src/nonBlockingEchoServerMain/kotlin/EchoServer.kt b/kotlin-native/backend.native/tests/samples/nonBlockingEchoServer/src/nonBlockingEchoServerMain/kotlin/EchoServer.kt similarity index 100% rename from kotlin-native/samples/nonBlockingEchoServer/src/nonBlockingEchoServerMain/kotlin/EchoServer.kt rename to kotlin-native/backend.native/tests/samples/nonBlockingEchoServer/src/nonBlockingEchoServerMain/kotlin/EchoServer.kt diff --git a/kotlin-native/samples/objc/build.gradle.kts b/kotlin-native/backend.native/tests/samples/objc/build.gradle.kts similarity index 100% rename from kotlin-native/samples/objc/build.gradle.kts rename to kotlin-native/backend.native/tests/samples/objc/build.gradle.kts diff --git a/kotlin-native/samples/objc/gradle.properties b/kotlin-native/backend.native/tests/samples/objc/gradle.properties similarity index 100% rename from kotlin-native/samples/objc/gradle.properties rename to kotlin-native/backend.native/tests/samples/objc/gradle.properties diff --git a/kotlin-native/samples/objc/src/objcMain/kotlin/Async.kt b/kotlin-native/backend.native/tests/samples/objc/src/objcMain/kotlin/Async.kt similarity index 100% rename from kotlin-native/samples/objc/src/objcMain/kotlin/Async.kt rename to kotlin-native/backend.native/tests/samples/objc/src/objcMain/kotlin/Async.kt diff --git a/kotlin-native/samples/objc/src/objcMain/kotlin/Window.kt b/kotlin-native/backend.native/tests/samples/objc/src/objcMain/kotlin/Window.kt similarity index 100% rename from kotlin-native/samples/objc/src/objcMain/kotlin/Window.kt rename to kotlin-native/backend.native/tests/samples/objc/src/objcMain/kotlin/Window.kt diff --git a/kotlin-native/samples/opengl/build.gradle.kts b/kotlin-native/backend.native/tests/samples/opengl/build.gradle.kts similarity index 100% rename from kotlin-native/samples/opengl/build.gradle.kts rename to kotlin-native/backend.native/tests/samples/opengl/build.gradle.kts diff --git a/kotlin-native/samples/opengl/gradle.properties b/kotlin-native/backend.native/tests/samples/opengl/gradle.properties similarity index 100% rename from kotlin-native/samples/opengl/gradle.properties rename to kotlin-native/backend.native/tests/samples/opengl/gradle.properties diff --git a/kotlin-native/samples/opengl/src/openglMain/kotlin/OpenGlTeapot.kt b/kotlin-native/backend.native/tests/samples/opengl/src/openglMain/kotlin/OpenGlTeapot.kt similarity index 100% rename from kotlin-native/samples/opengl/src/openglMain/kotlin/OpenGlTeapot.kt rename to kotlin-native/backend.native/tests/samples/opengl/src/openglMain/kotlin/OpenGlTeapot.kt diff --git a/kotlin-native/samples/settings.gradle.kts b/kotlin-native/backend.native/tests/samples/settings.gradle.kts similarity index 100% rename from kotlin-native/samples/settings.gradle.kts rename to kotlin-native/backend.native/tests/samples/settings.gradle.kts diff --git a/kotlin-native/samples/tensorflow/build.gradle.kts b/kotlin-native/backend.native/tests/samples/tensorflow/build.gradle.kts similarity index 100% rename from kotlin-native/samples/tensorflow/build.gradle.kts rename to kotlin-native/backend.native/tests/samples/tensorflow/build.gradle.kts diff --git a/kotlin-native/samples/tensorflow/downloadTensorflow.sh b/kotlin-native/backend.native/tests/samples/tensorflow/downloadTensorflow.sh similarity index 100% rename from kotlin-native/samples/tensorflow/downloadTensorflow.sh rename to kotlin-native/backend.native/tests/samples/tensorflow/downloadTensorflow.sh diff --git a/kotlin-native/samples/tensorflow/gradle.properties b/kotlin-native/backend.native/tests/samples/tensorflow/gradle.properties similarity index 100% rename from kotlin-native/samples/tensorflow/gradle.properties rename to kotlin-native/backend.native/tests/samples/tensorflow/gradle.properties diff --git a/kotlin-native/samples/tensorflow/src/nativeInterop/cinterop/tensorflow.def b/kotlin-native/backend.native/tests/samples/tensorflow/src/nativeInterop/cinterop/tensorflow.def similarity index 100% rename from kotlin-native/samples/tensorflow/src/nativeInterop/cinterop/tensorflow.def rename to kotlin-native/backend.native/tests/samples/tensorflow/src/nativeInterop/cinterop/tensorflow.def diff --git a/kotlin-native/samples/tensorflow/src/tensorflowMain/kotlin/HelloTensorflow.kt b/kotlin-native/backend.native/tests/samples/tensorflow/src/tensorflowMain/kotlin/HelloTensorflow.kt similarity index 100% rename from kotlin-native/samples/tensorflow/src/tensorflowMain/kotlin/HelloTensorflow.kt rename to kotlin-native/backend.native/tests/samples/tensorflow/src/tensorflowMain/kotlin/HelloTensorflow.kt diff --git a/kotlin-native/samples/uikit/.gitignore b/kotlin-native/backend.native/tests/samples/uikit/.gitignore similarity index 100% rename from kotlin-native/samples/uikit/.gitignore rename to kotlin-native/backend.native/tests/samples/uikit/.gitignore diff --git a/kotlin-native/samples/uikit/UIKitSample.xcodeproj/project.pbxproj b/kotlin-native/backend.native/tests/samples/uikit/UIKitSample.xcodeproj/project.pbxproj similarity index 100% rename from kotlin-native/samples/uikit/UIKitSample.xcodeproj/project.pbxproj rename to kotlin-native/backend.native/tests/samples/uikit/UIKitSample.xcodeproj/project.pbxproj diff --git a/kotlin-native/samples/uikit/UIKitSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/kotlin-native/backend.native/tests/samples/uikit/UIKitSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from kotlin-native/samples/uikit/UIKitSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to kotlin-native/backend.native/tests/samples/uikit/UIKitSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/kotlin-native/samples/uikit/UIKitSample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/kotlin-native/backend.native/tests/samples/uikit/UIKitSample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from kotlin-native/samples/uikit/UIKitSample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to kotlin-native/backend.native/tests/samples/uikit/UIKitSample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/kotlin-native/samples/uikit/build.gradle.kts b/kotlin-native/backend.native/tests/samples/uikit/build.gradle.kts similarity index 100% rename from kotlin-native/samples/uikit/build.gradle.kts rename to kotlin-native/backend.native/tests/samples/uikit/build.gradle.kts diff --git a/kotlin-native/samples/uikit/gradle.properties b/kotlin-native/backend.native/tests/samples/uikit/gradle.properties similarity index 100% rename from kotlin-native/samples/uikit/gradle.properties rename to kotlin-native/backend.native/tests/samples/uikit/gradle.properties diff --git a/kotlin-native/samples/uikit/plists/Ios/Info.plist b/kotlin-native/backend.native/tests/samples/uikit/plists/Ios/Info.plist similarity index 100% rename from kotlin-native/samples/uikit/plists/Ios/Info.plist rename to kotlin-native/backend.native/tests/samples/uikit/plists/Ios/Info.plist diff --git a/kotlin-native/samples/uikit/project.yml b/kotlin-native/backend.native/tests/samples/uikit/project.yml similarity index 100% rename from kotlin-native/samples/uikit/project.yml rename to kotlin-native/backend.native/tests/samples/uikit/project.yml diff --git a/kotlin-native/samples/uikit/src/iosMain/kotlin/ViewController.kt b/kotlin-native/backend.native/tests/samples/uikit/src/iosMain/kotlin/ViewController.kt similarity index 100% rename from kotlin-native/samples/uikit/src/iosMain/kotlin/ViewController.kt rename to kotlin-native/backend.native/tests/samples/uikit/src/iosMain/kotlin/ViewController.kt diff --git a/kotlin-native/samples/uikit/src/iosMain/kotlin/main.kt b/kotlin-native/backend.native/tests/samples/uikit/src/iosMain/kotlin/main.kt similarity index 100% rename from kotlin-native/samples/uikit/src/iosMain/kotlin/main.kt rename to kotlin-native/backend.native/tests/samples/uikit/src/iosMain/kotlin/main.kt diff --git a/kotlin-native/samples/videoplayer/README.md b/kotlin-native/backend.native/tests/samples/videoplayer/README.md similarity index 100% rename from kotlin-native/samples/videoplayer/README.md rename to kotlin-native/backend.native/tests/samples/videoplayer/README.md diff --git a/kotlin-native/samples/videoplayer/build.gradle.kts b/kotlin-native/backend.native/tests/samples/videoplayer/build.gradle.kts similarity index 100% rename from kotlin-native/samples/videoplayer/build.gradle.kts rename to kotlin-native/backend.native/tests/samples/videoplayer/build.gradle.kts diff --git a/kotlin-native/samples/videoplayer/gradle.properties b/kotlin-native/backend.native/tests/samples/videoplayer/gradle.properties similarity index 100% rename from kotlin-native/samples/videoplayer/gradle.properties rename to kotlin-native/backend.native/tests/samples/videoplayer/gradle.properties diff --git a/kotlin-native/samples/videoplayer/src/nativeInterop/cinterop/ffmpeg.def b/kotlin-native/backend.native/tests/samples/videoplayer/src/nativeInterop/cinterop/ffmpeg.def similarity index 100% rename from kotlin-native/samples/videoplayer/src/nativeInterop/cinterop/ffmpeg.def rename to kotlin-native/backend.native/tests/samples/videoplayer/src/nativeInterop/cinterop/ffmpeg.def diff --git a/kotlin-native/samples/videoplayer/src/nativeInterop/cinterop/sdl.def b/kotlin-native/backend.native/tests/samples/videoplayer/src/nativeInterop/cinterop/sdl.def similarity index 100% rename from kotlin-native/samples/videoplayer/src/nativeInterop/cinterop/sdl.def rename to kotlin-native/backend.native/tests/samples/videoplayer/src/nativeInterop/cinterop/sdl.def diff --git a/kotlin-native/samples/videoplayer/src/videoPlayerMain/kotlin/DecoderWorker.kt b/kotlin-native/backend.native/tests/samples/videoplayer/src/videoPlayerMain/kotlin/DecoderWorker.kt similarity index 100% rename from kotlin-native/samples/videoplayer/src/videoPlayerMain/kotlin/DecoderWorker.kt rename to kotlin-native/backend.native/tests/samples/videoplayer/src/videoPlayerMain/kotlin/DecoderWorker.kt diff --git a/kotlin-native/samples/videoplayer/src/videoPlayerMain/kotlin/Dimensions.kt b/kotlin-native/backend.native/tests/samples/videoplayer/src/videoPlayerMain/kotlin/Dimensions.kt similarity index 100% rename from kotlin-native/samples/videoplayer/src/videoPlayerMain/kotlin/Dimensions.kt rename to kotlin-native/backend.native/tests/samples/videoplayer/src/videoPlayerMain/kotlin/Dimensions.kt diff --git a/kotlin-native/samples/videoplayer/src/videoPlayerMain/kotlin/Disposable.kt b/kotlin-native/backend.native/tests/samples/videoplayer/src/videoPlayerMain/kotlin/Disposable.kt similarity index 100% rename from kotlin-native/samples/videoplayer/src/videoPlayerMain/kotlin/Disposable.kt rename to kotlin-native/backend.native/tests/samples/videoplayer/src/videoPlayerMain/kotlin/Disposable.kt diff --git a/kotlin-native/samples/videoplayer/src/videoPlayerMain/kotlin/Queue.kt b/kotlin-native/backend.native/tests/samples/videoplayer/src/videoPlayerMain/kotlin/Queue.kt similarity index 100% rename from kotlin-native/samples/videoplayer/src/videoPlayerMain/kotlin/Queue.kt rename to kotlin-native/backend.native/tests/samples/videoplayer/src/videoPlayerMain/kotlin/Queue.kt diff --git a/kotlin-native/samples/videoplayer/src/videoPlayerMain/kotlin/SDLAudio.kt b/kotlin-native/backend.native/tests/samples/videoplayer/src/videoPlayerMain/kotlin/SDLAudio.kt similarity index 100% rename from kotlin-native/samples/videoplayer/src/videoPlayerMain/kotlin/SDLAudio.kt rename to kotlin-native/backend.native/tests/samples/videoplayer/src/videoPlayerMain/kotlin/SDLAudio.kt diff --git a/kotlin-native/samples/videoplayer/src/videoPlayerMain/kotlin/SDLErrors.kt b/kotlin-native/backend.native/tests/samples/videoplayer/src/videoPlayerMain/kotlin/SDLErrors.kt similarity index 100% rename from kotlin-native/samples/videoplayer/src/videoPlayerMain/kotlin/SDLErrors.kt rename to kotlin-native/backend.native/tests/samples/videoplayer/src/videoPlayerMain/kotlin/SDLErrors.kt diff --git a/kotlin-native/samples/videoplayer/src/videoPlayerMain/kotlin/SDLInput.kt b/kotlin-native/backend.native/tests/samples/videoplayer/src/videoPlayerMain/kotlin/SDLInput.kt similarity index 100% rename from kotlin-native/samples/videoplayer/src/videoPlayerMain/kotlin/SDLInput.kt rename to kotlin-native/backend.native/tests/samples/videoplayer/src/videoPlayerMain/kotlin/SDLInput.kt diff --git a/kotlin-native/samples/videoplayer/src/videoPlayerMain/kotlin/SDLVideo.kt b/kotlin-native/backend.native/tests/samples/videoplayer/src/videoPlayerMain/kotlin/SDLVideo.kt similarity index 100% rename from kotlin-native/samples/videoplayer/src/videoPlayerMain/kotlin/SDLVideo.kt rename to kotlin-native/backend.native/tests/samples/videoplayer/src/videoPlayerMain/kotlin/SDLVideo.kt diff --git a/kotlin-native/samples/videoplayer/src/videoPlayerMain/kotlin/VideoPlayer.kt b/kotlin-native/backend.native/tests/samples/videoplayer/src/videoPlayerMain/kotlin/VideoPlayer.kt similarity index 100% rename from kotlin-native/samples/videoplayer/src/videoPlayerMain/kotlin/VideoPlayer.kt rename to kotlin-native/backend.native/tests/samples/videoplayer/src/videoPlayerMain/kotlin/VideoPlayer.kt diff --git a/kotlin-native/samples/watchos/Storyboard.storyboard b/kotlin-native/backend.native/tests/samples/watchos/Storyboard.storyboard similarity index 100% rename from kotlin-native/samples/watchos/Storyboard.storyboard rename to kotlin-native/backend.native/tests/samples/watchos/Storyboard.storyboard diff --git a/kotlin-native/samples/watchos/build.gradle.kts b/kotlin-native/backend.native/tests/samples/watchos/build.gradle.kts similarity index 100% rename from kotlin-native/samples/watchos/build.gradle.kts rename to kotlin-native/backend.native/tests/samples/watchos/build.gradle.kts diff --git a/kotlin-native/samples/watchos/plists/App/Info.plist b/kotlin-native/backend.native/tests/samples/watchos/plists/App/Info.plist similarity index 100% rename from kotlin-native/samples/watchos/plists/App/Info.plist rename to kotlin-native/backend.native/tests/samples/watchos/plists/App/Info.plist diff --git a/kotlin-native/samples/watchos/plists/App/Interface.plist b/kotlin-native/backend.native/tests/samples/watchos/plists/App/Interface.plist similarity index 100% rename from kotlin-native/samples/watchos/plists/App/Interface.plist rename to kotlin-native/backend.native/tests/samples/watchos/plists/App/Interface.plist diff --git a/kotlin-native/samples/watchos/plists/Ext/Info.plist b/kotlin-native/backend.native/tests/samples/watchos/plists/Ext/Info.plist similarity index 100% rename from kotlin-native/samples/watchos/plists/Ext/Info.plist rename to kotlin-native/backend.native/tests/samples/watchos/plists/Ext/Info.plist diff --git a/kotlin-native/samples/watchos/project.yml b/kotlin-native/backend.native/tests/samples/watchos/project.yml similarity index 100% rename from kotlin-native/samples/watchos/project.yml rename to kotlin-native/backend.native/tests/samples/watchos/project.yml diff --git a/kotlin-native/samples/watchos/src/watchosMain/kotlin/main.kt b/kotlin-native/backend.native/tests/samples/watchos/src/watchosMain/kotlin/main.kt similarity index 100% rename from kotlin-native/samples/watchos/src/watchosMain/kotlin/main.kt rename to kotlin-native/backend.native/tests/samples/watchos/src/watchosMain/kotlin/main.kt diff --git a/kotlin-native/samples/watchos/watchosSample.xcodeproj/project.pbxproj b/kotlin-native/backend.native/tests/samples/watchos/watchosSample.xcodeproj/project.pbxproj similarity index 100% rename from kotlin-native/samples/watchos/watchosSample.xcodeproj/project.pbxproj rename to kotlin-native/backend.native/tests/samples/watchos/watchosSample.xcodeproj/project.pbxproj diff --git a/kotlin-native/samples/watchos/watchosSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/kotlin-native/backend.native/tests/samples/watchos/watchosSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from kotlin-native/samples/watchos/watchosSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to kotlin-native/backend.native/tests/samples/watchos/watchosSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/kotlin-native/samples/watchos/watchosSample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/kotlin-native/backend.native/tests/samples/watchos/watchosSample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from kotlin-native/samples/watchos/watchosSample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to kotlin-native/backend.native/tests/samples/watchos/watchosSample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/kotlin-native/samples/win32/build.gradle.kts b/kotlin-native/backend.native/tests/samples/win32/build.gradle.kts similarity index 100% rename from kotlin-native/samples/win32/build.gradle.kts rename to kotlin-native/backend.native/tests/samples/win32/build.gradle.kts diff --git a/kotlin-native/samples/win32/gradle.properties b/kotlin-native/backend.native/tests/samples/win32/gradle.properties similarity index 100% rename from kotlin-native/samples/win32/gradle.properties rename to kotlin-native/backend.native/tests/samples/win32/gradle.properties diff --git a/kotlin-native/samples/win32/src/win32Main/kotlin/MessageBox.kt b/kotlin-native/backend.native/tests/samples/win32/src/win32Main/kotlin/MessageBox.kt similarity index 100% rename from kotlin-native/samples/win32/src/win32Main/kotlin/MessageBox.kt rename to kotlin-native/backend.native/tests/samples/win32/src/win32Main/kotlin/MessageBox.kt diff --git a/kotlin-native/samples/workers/build.gradle.kts b/kotlin-native/backend.native/tests/samples/workers/build.gradle.kts similarity index 100% rename from kotlin-native/samples/workers/build.gradle.kts rename to kotlin-native/backend.native/tests/samples/workers/build.gradle.kts diff --git a/kotlin-native/samples/workers/gradle.properties b/kotlin-native/backend.native/tests/samples/workers/gradle.properties similarity index 100% rename from kotlin-native/samples/workers/gradle.properties rename to kotlin-native/backend.native/tests/samples/workers/gradle.properties diff --git a/kotlin-native/samples/workers/src/workersMain/kotlin/Workers.kt b/kotlin-native/backend.native/tests/samples/workers/src/workersMain/kotlin/Workers.kt similarity index 100% rename from kotlin-native/samples/workers/src/workersMain/kotlin/Workers.kt rename to kotlin-native/backend.native/tests/samples/workers/src/workersMain/kotlin/Workers.kt diff --git a/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/CopySamples.kt b/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/CopySamples.kt index 0391bcf4df8..08cbcd2e2f4 100644 --- a/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/CopySamples.kt +++ b/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/CopySamples.kt @@ -12,7 +12,7 @@ import java.io.File */ open class CopySamples : Copy() { @InputDirectory - var samplesDir: File = project.file("samples") + var samplesDir: File = project.file("backend.native/tests/samples") private fun configureReplacements() { from(samplesDir) { diff --git a/kotlin-native/performance/videoplayer/build.gradle.kts b/kotlin-native/performance/videoplayer/build.gradle.kts index 011363e8533..5575002fc1a 100644 --- a/kotlin-native/performance/videoplayer/build.gradle.kts +++ b/kotlin-native/performance/videoplayer/build.gradle.kts @@ -15,7 +15,7 @@ plugins { val dist = file(findProperty("kotlin.native.home") ?: "dist") val toolSuffix = if (System.getProperty("os.name").startsWith("Windows")) ".bat" else "" val binarySuffix = getNativeProgramExtension() -val videoplayerDir = "$projectDir/../../samples/videoplayer" +val videoplayerDir = "$projectDir/../../backend.native/tests/samples/videoplayer" val linkerOpts = when { PlatformInfo.isMac() -> listOf("-linker-options", "-L/opt/local/lib", "-linker-options", "-L/usr/local/lib", "-linker-options", "-L/opt/homebrew/lib", "-linker-options", "-L/opt/homebrew/opt/ffmpeg@4/lib") diff --git a/kotlin-native/samples/README.md b/kotlin-native/samples/README.md index 68601e650b7..a2346ab898c 100644 --- a/kotlin-native/samples/README.md +++ b/kotlin-native/samples/README.md @@ -1,4 +1,3 @@ -This directory contains a set of Kotlin/Native samples. -They do not demonstrate Kotlin/Native best practices, and are mostly pretty outdated. +This directory used to contain a set of outdated Kotlin/Native samples. Please visit the website for actual documentation and examples: https://kotlinlang.org/