-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathversion.gradle
57 lines (36 loc) · 1.25 KB
/
version.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
//版本管理
ext{
//融合SDK版本
versionCode = 1
versionName = 'v20200616'
//Android SDK版本(注:因使用的第三方SDK中存在最低支持的库为api17,故这里只能兼容到最低17)
minSdk = 19
targetSdk = 29
compileSdk = 29
//开发模式开关
buildModel = false //true 发布模式,false 调试模式
}
//----------------------------------以下为aar自动打包脚本--------------------------------------------
//打包输出位置
String outputDir = '/Users/heshuiguang/Documents/文档/项目/其他/广告SDK/sdk/libs/'
String libraryName = 'adgamesdk'
String endName = '_' + rootProject.ext.versionName + ".aar"//重命名aar包名
String dir_output = '/build/outputs/aar/'//aar包默认输出目录
/**
* 开始打融合SDK aar
*/
task callBuild(type:Exec){
group 'build'
workingDir libraryName
commandLine 'gradle','build'
}
//拷贝融合SDK aar到输出目录
task copyAAR(type: Copy,dependsOn:['callBuild']){
String oldName = libraryName + '-release.aar'
String newAarName = libraryName + endName
group 'build'
from libraryName + dir_output
into outputDir
include(oldName)//只复制特定的文件
rename(oldName,newAarName)//重命名
}