-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
148 lines (117 loc) · 4.3 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
allprojects {
group 'io.github.slince'
version findProperty('projectVersion') ?: System.getenv('PROJECT_VERSION')
}
subprojects {
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'signing'
sourceCompatibility = 1.8
targetCompatibility = 1.8
task sourcesJar(type: Jar) {
archiveClassifier.set('sources')
from sourceSets.main.allJava
}
task javadocJar(type: Jar) {
archiveClassifier.set('javadoc')
from javadoc.destinationDir
}
task projectDetail {
afterEvaluate {
println project.name
println project.group
println project.version
println project.description
}
}
javadoc {
afterEvaluate {
description = project.description
}
options.memberLevel = JavadocMemberLevel.PROTECTED
options.author = true
options.version = true
options.header = project.name
options.addStringOption('Xdoclint:none', '-quiet')
// suppress warnings due to cross-module @see and @link references;
// note that global 'api' task does display all warnings.
logging.captureStandardError LogLevel.INFO
logging.captureStandardOutput LogLevel.INFO // suppress "## warnings" message
options.encoding = "UTF-8"
options.charSet = 'UTF-8'
}
artifacts {
archives javadocJar, sourcesJar
}
repositories {
mavenLocal()
mavenCentral()
}
publishing {
repositories {
maven {
def releasesRepoUrl = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
def snapshotsRepoUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username findProperty("sonatypeUsername") ?: System.getenv("SONATYPE_USERNAME")
password findProperty("sonatypePassword") ?: System.getenv("SONATYPE_PASSWORD")
}
}
}
publications {
mavenJava(MavenPublication) {
from components.java
afterEvaluate {
artifactId = jar.baseName
}
artifact sourcesJar
artifact javadocJar
pom {
name = jar.baseName
afterEvaluate {
description = project.description
}
url = 'https://github.com/slince/expression-language'
licenses {
license {
name = "The Apache Software License, Version 2.0"
url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
distribution = "repo"
}
}
scm {
url = 'scm:git:git://github.com/slince/expression-language.git'
connection = 'scm:git:git://github.com/slince/expression-language.git'
developerConnection = 'scm:git:git://github.com/slince/expression-language.git'
}
developers {
developer {
id = 'slinc'
name = 'Slince'
email = '[email protected]'
}
}
}
}
}
}
signing {
sign publishing.publications.mavenJava
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
implementation("org.apache.commons:commons-lang3:3.12.0")
implementation('org.apache.commons:commons-collections4:4.3')
compileOnly 'org.projectlombok:lombok:1.18.24'
annotationProcessor 'org.projectlombok:lombok:1.18.24'
testCompileOnly 'org.projectlombok:lombok:1.18.24'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.24'
}
test {
useJUnitPlatform()
}
}