-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
80 lines (70 loc) · 1.66 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
buildscript {
repositories {
mavenCentral()
maven {
url "https://dl.bintray.com/jetbrains/kotlin-native-dependencies"
}
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-native-gradle-plugin:0.7"
}
}
apply plugin: 'konan'
konanArtifacts {
interop('cglew') {
defFile 'src/dependencies/cglew.def'
}
interop('cglfw') {
defFile 'src/dependencies/cglfw.def'
}
interop('cstb') {
defFile 'src/dependencies/cstb.def'
includeDirs "${project.rootDir}/src/dependencies/c"
}
library('common') {
srcFiles fileTree('src/common')
}
program('1-OpeningAWindow') {
srcDir 'src/1-OpeningAWindow'
libraries {
artifact 'cglew'
artifact 'cglfw'
artifact 'common'
}
}
program('2-HelloTriangle') {
srcDir 'src/2-HelloTriangle'
libraries {
artifact 'cglew'
artifact 'cglfw'
artifact 'common'
}
}
program('3-Matrices') {
srcDir 'src/3-Matrices'
libraries {
artifact 'cglew'
artifact 'cglfw'
artifact 'common'
}
}
program('5-A_Textured_Cube') {
srcDir 'src/5-ATexturedCube'
libraries {
artifact 'cglew'
artifact 'cglfw'
artifact 'cstb'
artifact 'common'
}
}
}
compileKonan {
doLast {
konanArtifacts.'1-OpeningAWindow'.forEach() { task ->
copy {
from 'src/resources'
into "${task.artifact.parentFile}/resources"
}
}
}
}