-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
109 lines (87 loc) · 2.2 KB
/
build.gradle
File metadata and controls
109 lines (87 loc) · 2.2 KB
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
plugins {
id 'build.core'
id 'build.asciidoc'
}
initProjectConfigure(project)
description = "Build for toolbox projects"
printer.info("Build $project.name")
allprojects { p ->
}
subprojects { p ->
initProjectConfigure(p)
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
def initProjectConfigure(p) {
def infos = newInfo()
p.ext["infos"] = infos
p.group = infos.group
p.version = infos.publish.isSnapshot ? "${infos.version}-SNAPSHOT" : infos.version
if (p == rootProject) {
printer.info("Configure project ${p.group}:${p.name}:${p.version} (root)")
} else {
printer.info("Configure project ${p.group}:${p.name}:${p.version}")
}
}
/**
* Project config infos.
*/
private static def newInfo() {
return [
//50: debug
//100: info
logLevel : 100,
//Version
version : "0.0.0",
//Group
group : "xyz.srclab.toolbox",
//Project url
url : "https://github.com/srclab-projects/srclab-toolbox",
//Project inception year
inceptionYear: "2020",
//Licenses
licenses : [
[
name: "The Apache License, Version 2.0",
url : "https://www.apache.org/licenses/LICENSE-2.0.txt",
],
],
//Developers
developers : [
[
id : "fredsuvn",
name : "孙谦",
email: "fredsuvn@163.com",
url : "https://github.com/fredsuvn",
],
[
id : "SrcLab",
name : "SrcLab Team",
email : "srclab@163.com",
organization : "SrcLab",
organizationUrl: "https://github.com/srclab-projects",
],
],
//Publish info
publish : [
//Whether publish
enablePublish: true,
//Whether publish as snapshot
isSnapshot : false,
//Snapshot id
snapshotId : "ossrh",
//Release id
releaseId : "ossrh",
//Whether signing
isSigning : false,
//Signing id
signingId : "gpg",
//Publish urls
urls : [
snapshot: "https://s01.oss.sonatype.org/content/repositories/snapshots",
release : "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2",
],
],
]
}