-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle
More file actions
85 lines (71 loc) · 2.29 KB
/
build.gradle
File metadata and controls
85 lines (71 loc) · 2.29 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
plugins {
id 'java'
id 'maven-publish'
}
version = project.sdk_version
group = project.maven_group
def targetJavaVersion = 8
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
it.options.release = targetJavaVersion
}
}
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
archivesBaseName = project.archives_base_name
}
repositories {
mavenCentral()
}
dependencies {
compileOnly 'org.projectlombok:lombok:1.18.24'
compileOnly 'com.google.code.gson:gson:2.10.1'
compileOnly 'org.jetbrains:annotations:20.1.0'
compileOnly 'org.slf4j:slf4j-api:2.0.1'
annotationProcessor 'org.projectlombok:lombok:1.18.24'
annotationProcessor 'com.google.code.gson:gson:2.10.1'
}
publishing {
publications {
shadow(MavenPublication) { publication ->
from components.java
version = "${project.sdk_version}"
artifactId = "${project.archives_base_name}"
groupId = "${project.maven_group}"
pom {
name = 'OneBot SDK'
description = '基于 [OneBot] 标准的通用 SDK'
url = 'https://github.com/cnlimiter/onebot-sdk'
licenses {
license {
name = 'AGPLV3'
url = 'https://www.gnu.org/licenses/gpl-3.0.html'
}
}
developers {
developer {
id = 'cnlimiter'
name = 'cnlimiter'
email = 'cnlimiter@163.com'
}
}
}
}
}
repositories {
if (System.getenv('MAVEN_USERNAME') != null && System.getenv('MAVEN_PASSWORD') != null) {
maven {
name 's3'
url = 'https://maven.nova-committee.cn/releases'
credentials {
username System.getenv('MAVEN_USERNAME')
password System.getenv('MAVEN_PASSWORD')
}
}
}
}
}