-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
86 lines (71 loc) · 3.2 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
apply plugin: 'java'
apply plugin: 'application'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'idea'
apply from: 'config.gradle'
buildscript {
// 设置在构建项目时的软件源库
repositories {
mavenLocal()
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
mavenCentral()
}
// 设置引用在构建项目时的插件
dependencies {
classpath "com.github.jengelman.gradle.plugins:shadow:2.0.1"
}
}
// Jar包基础名称
def jarBaseName = ext.project.projectName
// Jar包版本号
def jarVersion = ext.project.projectVersion
sourceCompatibility = 1.8
targetCompatibility = 1.8
// 设置编译时的编码
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
// 设置编译时的编码
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
// 设置项目的资源目录位置
sourceSets.main.resources.srcDirs = ["src/main/java", "src/main/resources"]
mainClassName = 'com.stevejrong.android.apk.downloader.boot.AndroidApkDownloaderApplication'
// 设置Jar包属性
jar {
// 生成Jar包的基础名
baseName = jarBaseName
// 生成Jar包的版本号
version jarVersion
// 生成Jar包的manifest清单属性
manifest {
attributes 'Manifest-Version': 2.0,
'Main-Class': 'com.stevejrong.android.apk.downloader.boot.AndroidApkDownloaderApplication'
}
}
// 设置项目的软件源库
repositories {
mavenLocal()
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven { url 'https://jitpack.io' }
mavenCentral()
}
dependencies {
compile("org.springframework:spring-context:$rootProject.ext.dependencies.springContextVersion")
compile("org.springframework:spring-test:$rootProject.ext.dependencies.springTestVersion")
compile("org.aspectj:aspectjweaver:$rootProject.ext.dependencies.aspectjweaverVersion")
compile("org.seleniumhq.selenium:selenium-java:$rootProject.ext.dependencies.seleniumVersion")
compile("com.github.vidstige:jadb:$rootProject.ext.dependencies.jadbVersion")
compile("net.dongliu:apk-parser:$rootProject.ext.dependencies.apkParserVersion")
compile("com.alibaba:fastjson:$rootProject.ext.dependencies.fastjsonVersion")
compile("com.squareup.okhttp3:okhttp:$rootProject.ext.dependencies.okHttpVersion")
compile("com.google.guava:guava:$rootProject.ext.dependencies.guavaVersion")
compile("org.dom4j:dom4j:$rootProject.ext.dependencies.dom4jVersion")
compile("org.apache.commons:commons-lang3:$rootProject.ext.dependencies.commonsLang3Version")
compile("org.apache.commons:commons-collections4:$rootProject.ext.dependencies.commonsCollections4Version")
compile("org.apache.logging.log4j:log4j-api:$rootProject.ext.dependencies.log4jApiCoreVersion")
compile("org.apache.logging.log4j:log4j-core:$rootProject.ext.dependencies.log4jCoreVersion")
compile("commons-logging:commons-logging:$rootProject.ext.dependencies.commonsLoggingVersion")
compile("org.yaml:snakeyaml:$rootProject.ext.dependencies.snakeyamlVersion")
testCompile("junit:junit:$rootProject.ext.dependencies.junitVersion")
testCompile("org.hamcrest:hamcrest-core:$rootProject.ext.dependencies.hamcrestVersion")
}