Skip to content
This repository has been archived by the owner on Aug 10, 2021. It is now read-only.

Commit

Permalink
Redirect samples to new repository
Browse files Browse the repository at this point in the history
This repository is archived. The development is moved to https://github.com/JetBrains/kotlin.
Issue tracking and discussions are moved too, see #4079.
  • Loading branch information
SvyatoslavScherbina authored Aug 10, 2021
1 parent 1d2f55c commit 9fb0a75
Show file tree
Hide file tree
Showing 275 changed files with 28 additions and 14,305 deletions.
39 changes: 1 addition & 38 deletions samples/README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1 @@
# Samples

This directory contains a set of samples demonstrating how one can work with Kotlin/Native. The samples can be
built using Gradle build tool. See `README.md` in sample directories to learn more about specific samples and
the building process.

* `androidNativeActivity` - Android Native Activity rendering 3D graphics using OpenGLES
* `calculator` - iOS Swift application, using Kotlin/Native code compiled into the framework
* `cocoapods` - A Kotlin/Native application using the `AFNetworking` library from CocoaPods.
* `csvparser` - simple CSV file parser and analyzer
* `echoServer` - TCP/IP echo server
* `gitchurn` - program interoperating with `libgit2` for GIT repository analysis
* `gtk` - GTK3 interoperability example
* `html5Canvas` - WebAssembly example
* `libcurl` - using of FTP/HTTP/HTTPS client library `libcurl`
* `nonBlockingEchoServer` - multi-client TCP/IP echo server using co-routines
* `objc` - AppKit Objective-C interoperability example for macOS
* `opengl` - OpenGL/GLUT teapot example
* `python_extension` - Python extension written in Kotlin/Native
* `tensorflow` - simple client for TensorFlow Machine Intelligence library
* `tetris` - Tetris game implementation (using SDL2 for rendering)
* `uikit` - UIKit Objective-C interoperability example for iOS
* `videoplayer` - SDL and FFMPEG-based video and audio player
* `win32` - trivial Win32 GUI application
* `workers` - example of using workers API


**Note**: If the samples are built from a source tree (not from a distribution archive) the compiler built from
the sources is used. So you must build the compiler and the necessary platform libraries by running
`./gradlew bundle` from the Kotlin/Native root directory before building samples (see
[README.md](https://github.com/JetBrains/kotlin-native/blob/master/README.md) for details).

Alternatively you may remove a line `kotlin.native.home=<...>` from all `gradle.properties` files.
In this case the Gradle plugin downloads and uses a default compiler for this plugin version.

One may also build all the samples with one command. To build them using Gradle run:

./gradlew buildAllSamples
Moved to https://github.com/JetBrains/kotlin/tree/master/kotlin-native/samples.
23 changes: 1 addition & 22 deletions samples/androidNativeActivity/README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1 @@
# Android Native Activity

This example shows how to build an Android Native Activity. Also, we provide an example
bridging mechanism for the Java APIs, callable from Native side.

The example will render a textured dodecahedron using OpenGL ES library. It can be rotated with fingers.
Please make sure that Android SDK version 28 is installed, using Android SDK manager in Android Studio.
See https://developer.android.com/studio/index.html for more details on Android Studio or
`$ANDROID_HOME/tools/bin/sdkmanager "platforms;android-28" "build-tools;28.0.3"` from command line.
We use JniBridge to call vibration service on the Java side for short tremble on startup.

To build use `ANDROID_HOME=<your path to android sdk> ../gradlew assemble`.

Run `$ANDROID_HOME/platform-tools/adb install -r build/outputs/apk/debug/androidNativeActivity-debug.apk`
to deploy the apk on the Android device or emulator.

Note that "Emulated Performance - Graphics" in AVD manager must be set to "Software - GLES 2.0".

Note: If you are importing project to IDEA for the first time, you might need to put `local.properties` file
with the following content:

sdk.dir=<your path to Android SDK>
Moved to https://github.com/JetBrains/kotlin/tree/master/kotlin-native/samples.
110 changes: 0 additions & 110 deletions samples/androidNativeActivity/build.gradle.kts

This file was deleted.

5 changes: 0 additions & 5 deletions samples/androidNativeActivity/build.sh

This file was deleted.

15 changes: 0 additions & 15 deletions samples/androidNativeActivity/gradle.properties

This file was deleted.

Binary file not shown.

This file was deleted.

185 changes: 0 additions & 185 deletions samples/androidNativeActivity/gradlew

This file was deleted.

Loading

0 comments on commit 9fb0a75

Please sign in to comment.