forked from byhook/ffmpeg4android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
module.gradle
82 lines (78 loc) · 2.27 KB
/
module.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
apply plugin: 'com.android.application'
android {
//构建版本
compileSdkVersion rootProject.ext.android.compileSdkVersion
buildToolsVersion rootProject.ext.android.buildToolsVersion
signingConfigs {
config {
Properties buildProps = loadSignProperties()
storeFile file(buildProps['STORE_FILE'])
keyAlias buildProps['KEY_ALIAS']
keyPassword buildProps['KEY_PASSWORD']
storePassword buildProps['STORE_PASSWORD']
}
}
buildTypes {
debug {
signingConfig signingConfigs.config
}
release {
signingConfig signingConfigs.config
minifyEnabled true
zipAlignEnabled true
debuggable false
jniDebuggable false
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
//默认的配置
defaultConfig {
minSdkVersion rootProject.ext.android.minSdkVersion
targetSdkVersion rootProject.ext.android.targetSdkVersion
versionCode rootProject.ext.android.versionCode
versionName rootProject.ext.android.versionName
externalNativeBuild {
cmake {
cppFlags ""
}
ndk {
abiFilters "armeabi-v7a"
}
}
sourceSets {
main {
//库地址
jniLibs.srcDirs = ['libs']
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
externalNativeBuild {
cmake {
path "CMakeLists.txt"
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile rootProject.ext.dependencies["appcompat-v7"]
compile rootProject.ext.dependencies["design"]
compile project(':common')
compile project(':ffmpeg-single')
}
/**
* 读取配置签名
* @return
*/
def loadSignProperties() {
Properties buildProperties = new Properties()
buildProperties.load(new FileInputStream(file("$rootDir/config/sign.properties")))
return buildProperties
}