samples: Fix iphone gradle project

This commit is contained in:
Ilya Matveev
2017-03-31 20:54:19 +07:00
committed by ilmat192
parent c5dd4d38fc
commit 1063d134cd
2 changed files with 13 additions and 8 deletions
+1 -1
View File
@@ -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
+12 -7
View File
@@ -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
}
}
}
}
}