forked from litesuits/android-common
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
68 lines (58 loc) · 1.82 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
apply plugin: 'com.android.library'
apply plugin: 'com.novoda.bintray-release'
android {
compileSdkVersion 20
buildToolsVersion '25.0.0'
defaultConfig {
minSdkVersion 7
targetSdkVersion 20
versionCode 13
versionName "1.1.3"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
}
}
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.novoda:bintray-release:0.3.4'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
options.addStringOption('encoding', 'UTF-8')
}
publish {
userOrg = 'litesuits' //bintray.com username
groupId = 'com.litesuits' //jcenter url
artifactId = 'android-common' //library name
publishVersion = '1.0.0' //version
desc = 'A powerful android common utils library.' //description
website = 'https://litesuits.com'
}
def libVersion = '1.2.0'
task makeJar(type: Jar) {
// 指定生成的jar名
def rootDir = project.getRootDir();
def parentDir = project.getRootDir().getParentFile().getAbsolutePath();
delete 'build/libs/*.*'
archiveName 'android-common-' + libVersion + '.jar'
destinationDir = file('build/libs')
// 从哪里打包class文件
from('build/intermediates/classes/release/')
// 打包到jar后的目录结构
// 去掉不需要打包的目录和文件
exclude('test/', 'BuildConfig.class', 'R.class', 'R\$*.class', 'META-INF/')
}