-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
42 lines (34 loc) · 915 Bytes
/
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
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'maven-publish'
group 'com.github.memorylorry'
version '1.0.3'
sourceCompatibility = 1.8
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
compile 'com.alibaba:fastjson:1.2.47'
}
//指定编译编码
tasks.withType(JavaCompile){
options.encoding = "UTF-8"
}
// 指定上传的路径
def localMavenRepo = 'file://' + new File(System.getProperty('user.home'), '.m2/repository').absolutePath
// 上传Task,Gradle会生成并上传pom.xml文件。
uploadArchives {
repositories {
mavenDeployer {
repository(url: localMavenRepo)
//构造项目的Pom文件
pom.project {
name = project.name
packaging = 'jar'
description = 'description'
}
}
}
}