samples: Fix iphone gradle project
This commit is contained in:
@@ -15,7 +15,7 @@ To build Tetris application for your host platform use
|
|||||||
|
|
||||||
./build.sh
|
./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.
|
Note that SDL2 must be installed on the host.
|
||||||
|
|
||||||
For cross-compilation to iOS (on Mac host) use
|
For cross-compilation to iOS (on Mac host) use
|
||||||
|
|||||||
@@ -68,8 +68,8 @@ konanArtifacts {
|
|||||||
inputFiles project.file('Tetris.kt')
|
inputFiles project.file('Tetris.kt')
|
||||||
useInterop 'sdlIphone'
|
useInterop 'sdlIphone'
|
||||||
|
|
||||||
linkerOpts '-framework SDL2 -framework AVFoundation -framework CoreGraphics -framework CoreMotion' +
|
linkerOpts '-framework SDL2 -framework AVFoundation -framework CoreGraphics -framework CoreMotion ' +
|
||||||
'-framework Foundation -framework GameController -framework AudioToolbox -framework OpenGLES' +
|
'-framework Foundation -framework GameController -framework AudioToolbox -framework OpenGLES ' +
|
||||||
'-framework QuartzCore -framework UIKit'
|
'-framework QuartzCore -framework UIKit'
|
||||||
noMain()
|
noMain()
|
||||||
target 'iphone'
|
target 'iphone'
|
||||||
@@ -85,10 +85,15 @@ konanArtifacts {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.matching { it.name.startsWith("compileKonan") }.asList().forEach { compileTask ->
|
build {
|
||||||
task ("build${compileTask.name - "compileKonanTetris"}", type: Copy) {
|
doLast {
|
||||||
dependsOn(compileTask)
|
getTaskDependencies().getDependencies().forEach() { task ->
|
||||||
from compileTask.artifactPath
|
if (task.name.startsWith("compileKonan")) {
|
||||||
destinationDir projectDir
|
copy {
|
||||||
|
from task.artifactPath
|
||||||
|
into projectDir.canonicalPath
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user