/
build.gradle
52 lines (46 loc) · 1.51 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
apply plugin: 'com.android.model.native'
def lib_distribution_root = '../distribution'
model {
android {
compileSdkVersion = gradle.sdkVersion
buildToolsVersion = gradle.buildToolsVersion
defaultConfig {
minSdkVersion.apiLevel = 13
targetSdkVersion.apiLevel = gradle.sdkVersion
versionCode = 1
versionName = '1.0'
}
ndk {
moduleName = 'SDL2_gfx'
ldLibs.addAll(["GLESv1_CM", "EGL", "GLESv2", "log", "android", "dl"])
CFlags.addAll(["-DGL_GLEXT_PROTOTYPES"])
CFlags.addAll(["-I" + file("include/").absolutePath,"-DGL_GLEXT_PROTOTYPES"])
}
sources {
main {
jni {
dependencies {
project ':SDL2' linkage 'shared'
}
exportedHeaders {
srcDir "../SDL2/include"
}
source {
srcDir "src"
}
}
}
}
}
}
// This is just copy out the header file and built lib into distribution
// directory for clint application to use; it is a small overhead of this sample:
// both lib and app are put inside one project space [save maintenance time]
task(distributeLib, type : Copy) {
// trigger build library
dependsOn assemble
into '../distribution/SDL2_gfx/'
from('build/outputs/native/release/lib') {
into 'lib/'
}
}