-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathbuild.gradle
78 lines (64 loc) · 1.91 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
import org.apache.tools.ant.taskdefs.condition.Os
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.ludei.basketgunner"
minSdkVersion 9
targetSdkVersion 21
versionCode 114
versionName "0.9"
}
signingConfigs {
release {
/* Get properties from ~/.gradle/gradle.properties */
storeFile file(STORE_FILE)
storePassword STORE_PASSWORD
keyAlias KEY_ALIAS
keyPassword KEY_PASSWORD
}
}
buildTypes {
release {
debuggable true
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}
sourceSets {
main {
jni.srcDirs=[]
jniLibs.srcDirs=['libs']
assets.srcDirs = ['../../resources']
}
}
}
// call regular ndk-build script from app directory
task ndkBuild(type: Exec) {
def ndkDir = project.plugins.findPlugin('com.android.application').getNdkFolder()
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
commandLine "$ndkDir/ndk-build.cmd", '-C', file('jni').absolutePath
} else {
commandLine "$ndkDir/ndk-build", '-C', file('jni').absolutePath
}
}
tasks.withType(JavaCompile) {
compileTask -> compileTask.dependsOn ndkBuild
}
repositories {
mavenCentral()
flatDir {
dirs '../../external/cocos2dx/prebuilt_android',
'../../../../src/cpp/android/jni/safejni/libs'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
compile (name:'libcocos2dx', ext:'jar')
compile (name:'safejni', ext:'jar')
compile project(':inapps-cppbridge')
compile project(':inapps-googleplay')
}