-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbuild.gradle
117 lines (105 loc) · 3.63 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
allprojects {
group = 'site.zido'
version = '1.0.0-SNAPSHOT'
}
description = "Elise - 简单/强大/流畅的爬虫框架"
buildscript {
repositories {
maven { url "https://maven.aliyun.com/nexus/content/groups/public" }
maven { url "https://maven.aliyun.com/nexus/content/repositories/gradle-plugin" }
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
}
ext {
configuration = [
javaVersion = JavaVersion.VERSION_1_8
]
}
subprojects {
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'signing'
sourceCompatibility = "${javaVersion}"
targetCompatibility = "${javaVersion}"
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
options.deprecation = true
options.compilerArgs += ["-parameters"]
}
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
archiveClassifier.set("sources")
}
task javadocJar(type: Jar) {
from javadoc
archiveClassifier.set("javadoc")
}
repositories {
mavenLocal()
maven { url "https://maven.aliyun.com/repository/public" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
jcenter()
}
publishing {
publications {
mavenJava(MavenPublication) {
// groupId = project.group
// artifactId = project.name
// version = project.version
from components.java
artifact sourcesJar
artifact javadocJar
pom {
name = 'Elise-builder'
description = 'A Simple Spider Framework'
url = 'https://elise.zido.site'
licenses {
license {
name = 'The MIT License (MIT)'
url = 'https://raw.githubusercontent.com/zidoshare/Elise/master/LICENSE'
}
}
developers {
developer {
name = 'zido'
email = 'wuhongxu1208@gmail.com'
}
}
scm {
url = 'https://github.com/zidoshare/Elise'
connection = 'scm:git:git://github.com/zidoshare/Elise.git'
developerConnection = 'scm:git:ssh://git@github.com:zidoshare/Elise.git'
}
}
}
}
repositories {
maven {
name "oss"
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username sonatypeUsername
password sonatypePassword
}
}
}
}
signing {
sign publishing.publications.mavenJava
}
javadoc {
description = "Generates project-level javadoc for use in -javadoc jar"
options.memberLevel = JavadocMemberLevel.PROTECTED
options.author = true
options.version = true
options.header = project.name
options.addStringOption('Xdoclint:none', '-quiet')
logging.captureStandardError LogLevel.INFO
logging.captureStandardOutput LogLevel.INFO
options.encoding = "UTF-8"
options.charSet = 'UTF-8'
}
}