diff --git a/samples/tetris/README.md b/samples/tetris/README.md index efdbaf585df..7d425934cef 100644 --- a/samples/tetris/README.md +++ b/samples/tetris/README.md @@ -15,7 +15,7 @@ To build Tetris application for your host platform use ./build.sh -You also may use gradle to build this sample: `../gradlew buildMacbook` or `../gradlew buildLinux`. +You also may use gradle to build this sample: `../gradlew build`. Note that SDL2 must be installed on the host. For cross-compilation to iOS (on Mac host) use diff --git a/samples/tetris/build.gradle b/samples/tetris/build.gradle index d7f97caca14..836ce13b184 100644 --- a/samples/tetris/build.gradle +++ b/samples/tetris/build.gradle @@ -68,8 +68,8 @@ konanArtifacts { inputFiles project.file('Tetris.kt') useInterop 'sdlIphone' - linkerOpts '-framework SDL2 -framework AVFoundation -framework CoreGraphics -framework CoreMotion' + - '-framework Foundation -framework GameController -framework AudioToolbox -framework OpenGLES' + + linkerOpts '-framework SDL2 -framework AVFoundation -framework CoreGraphics -framework CoreMotion ' + + '-framework Foundation -framework GameController -framework AudioToolbox -framework OpenGLES ' + '-framework QuartzCore -framework UIKit' noMain() target 'iphone' @@ -85,10 +85,15 @@ konanArtifacts { } -tasks.matching { it.name.startsWith("compileKonan") }.asList().forEach { compileTask -> - task ("build${compileTask.name - "compileKonanTetris"}", type: Copy) { - dependsOn(compileTask) - from compileTask.artifactPath - destinationDir projectDir +build { + doLast { + getTaskDependencies().getDependencies().forEach() { task -> + if (task.name.startsWith("compileKonan")) { + copy { + from task.artifactPath + into projectDir.canonicalPath + } + } + } } } \ No newline at end of file