-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
84 lines (75 loc) · 2.11 KB
/
build.gradle.kts
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 {
java
`java-library`
`maven-publish`
signing
id("io.freefair.lombok") version "4.1.6"
}
group = "cn.wenkang365t"
version = "0.1.0"
java {
withJavadocJar()
withSourcesJar()
}
repositories {
mavenCentral()
}
dependencies {
api("org.casbin", "jcasbin", "1.4.0")
api("io.etcd", "jetcd-core", "0.4.1")
implementation("cn.hutool", "hutool-core", "5.2.2")
implementation("cn.hutool", "hutool-db", "5.2.2")
testImplementation("junit", "junit", "4.12")
}
tasks.withType<JavaCompile>() {
options.encoding = "utf-8"
}
tasks.withType<Javadoc>() {
options.encoding = "utf-8"
}
val ossUsername: String by project;
val ossPassword: String by project;
publishing {
publications {
create<MavenPublication>("mavenJava") {
groupId = project.group.toString()
artifactId = project.name
version = project.version.toString()
from(components["java"])
pom {
url.set("https://github.com/fanlide/jcasbin-extra")
name.set(project.name)
description.set("JCasbin 的扩充,包含 HutoolDB Adapter,Etcd Watcher")
licenses {
license {
name.set("MIT License")
url.set("./LICENSE")
}
}
developers {
developer {
id.set("mufeng")
name.set("慕枫")
email.set("[email protected]")
}
}
scm {
connection.set("https://github.com/fanlide/jcasbin-extra.git")
url.set(pom.url)
}
}
}
repositories {
mavenCentral {
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2")
credentials {
username = ossUsername
password = ossPassword
}
}
}
}
}
signing {
sign(publishing.publications["mavenJava"])
}