-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
95 lines (82 loc) · 2.24 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
89
90
91
92
93
94
95
apply plugin: 'com.android.application'
android {
signingConfigs {
config_zozobreak {
keyAlias 'keyzozo'
keyPassword 'zozobreak'
storeFile file('C:/Users/zozobreak/zozobreak.jks')
storePassword 'zozobreak'
}
}
compileSdkVersion 26
defaultConfig {
applicationId = 'com.example.debugtest'
minSdkVersion 14
targetSdkVersion 26
versionCode = 1
versionName = '1.0'
ndk {
abiFilters 'armeabi-v7a'
}
externalNativeBuild {
cmake {
cppFlags ""
}
}
signingConfig signingConfigs.config_zozobreak
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
productFlavors {
}
sourceSets {
main {
//jni.srcDirs = ['g:/code/git/mgv-ng-4.1/debugtest']
}
}
externalNativeBuild {
cmake {
path "CMakeLists.txt"
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
}
task buildDebugCLib(type:Exec) {
group 'build'
description 'build jni libs'
workingDir 'g:/code/git/mgv-ng-4.1'
commandLine 'cmd', '/c', 'g:/code/git/mgv-ng-4.1/builddebugtest.bat Debug'
//store the output instead of printing to the console:
standardOutput = new ByteArrayOutputStream()
//extension method buildCLib.output() can be used to obtain the output:
ext.output = {
return standardOutput.toString()
}
}
task buildReleaseCLib(type:Exec) {
group 'build'
description 'build jni libs'
workingDir 'g:/code/git/mgv-ng-4.1'
commandLine 'cmd', '/c', 'g:/code/git/mgv-ng-4.1/builddebugtest.bat Release'
}
/*
tasks.whenTaskAdded { task ->
if (task.name == 'assembleDebug') {
task.mustRunAfter buildCLib
task.dependsOn(buildCLib)
}
}
*/
afterEvaluate {
assembleDebug.dependsOn(buildDebugCLib)
assembleRelease.dependsOn(buildReleaseCLib)
}