-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
executable file
·88 lines (76 loc) · 2.31 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
81
82
83
84
85
86
87
88
import org.apache.tools.ant.taskdefs.condition.Os
apply plugin: 'com.android.application'
apply plugin: 'com.mob.sdk'
android {
compileSdkVersion 22
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "com.mob.moblink.demo"
minSdkVersion 10
targetSdkVersion 16
versionCode 20201
versionName "2.2.1"
externalNativeBuild {
ndkBuild {
targets 'MyGame'
def module_paths = [project.file("../../cocos2d").absolutePath,
project.file("../../cocos2d/cocos").absolutePath,
project.file("../../cocos2d/external").absolutePath]
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
// should use '/'
module_paths = module_paths.collect {it.replaceAll('\\\\', '/')}
arguments 'NDK_MODULE_PATH=' + module_paths.join(";")
}
else {
arguments 'NDK_MODULE_PATH=' + module_paths.join(':')
}
arguments '-j' + Runtime.runtime.availableProcessors()
abiFilters "armeabi-v7a"
}
}
}
sourceSets.main {
java.srcDir "src"
res.srcDir "res"
manifest.srcFile "AndroidManifest.xml"
assets.srcDir "../../Resources"
}
externalNativeBuild {
ndkBuild {
path "jni/Android.mk"
}
}
signingConfigs {
config {
storeFile file("demokey.keystore")
storePassword "123456"
keyAlias "demokey.keystore"
keyPassword "123456"
}
}
buildTypes {
release {
minifyEnabled true
signingConfig signingConfigs.config
zipAlignEnabled true
externalNativeBuild {
ndkBuild {
arguments 'NDK_DEBUG=0'
}
}
}
debug {
signingConfig signingConfigs.config
externalNativeBuild {
ndkBuild {
arguments 'NDK_DEBUG=1'
}
}
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile project(':libcocos2dx')
compile project(':Cocos2dxBridge')
}