forked from TonyJiangWJ/Auto.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
65 lines (58 loc) · 1.69 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
apply plugin: 'com.android.library'
android {
compileSdkVersion versions.compile
buildToolsVersion versions.buildTool
defaultConfig {
minSdkVersion versions.mini
targetSdkVersion versions.target
}
buildTypes {
release {
minifyEnabled false
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
lint {
abortOnError false
}
}
task makeColorCenterJar(type: Copy) {
dependsOn build
// 删除存在的
delete 'build/libs/color-center-sdk.jar'
// 设置拷贝的文件
// from('build/intermediates/packaged-classes/release/')
from('build/intermediates/aar_main_jar/release/')
// 打进jar包后的文件目录
into('build/libs/')
// 将classes.jar放入build/libs/目录下
// include ,exclude参数来设置过滤
//(我们只关心classes.jar这个文件)
include('classes.jar')
// 重命名
rename ('classes.jar', 'color-center-sdk.jar')
}
task dexJar(type: Exec) {
def dxFile = file('../dex_support/dx')
if (!dxFile.exists()) {
println 'dx文件不存在,无法执行 请在dex_support下创建软连接文件'
return
}
dependsOn(makeColorCenterJar)
workingDir './'
def commands = []
commands << '../dex_support/dx'
commands << '--dex'
commands << '--output'
commands << 'build/libs/color-center.dex'
commands << 'build/libs/color-center-sdk.jar'
commandLine = commands
}
dependencies {
implementation project(path: ':autojs')
testImplementation "junit:junit:$junit_version"
implementation 'com.rmtheis:tess-two:9.1.0'
}