forked from hakanai/luceneupgrader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
101 lines (85 loc) · 2.69 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
version = "0.6.1-SNAPSHOT"
group = "garden.ephemeral.luceneupgrader"
description = "Lucene Index Upgrader"
plugins {
application
`maven-publish`
signing
`utf8-workarounds`
}
java {
sourceCompatibility = JavaVersion.VERSION_11
withJavadocJar()
withSourcesJar()
}
dependencies {
implementation("com.google.code.findbugs:jsr305:3.0.2")
testImplementation("junit:junit:4.13.2")
testImplementation("org.hamcrest:hamcrest-library:2.2")
}
application {
mainClass.set("org.trypticon.luceneupgrader.cli.Main")
}
tasks.javadoc {
exclude("**/internal/**/*.java")
}
tasks.jar {
manifest {
// Gradle's application plugin doesn't add this for us :(
attributes["Main-Class"] = application.mainClass.get()
}
}
publishing {
publications {
register("mavenJava", MavenPublication::class) {
from(components["java"])
pom {
name.set(project.name)
url.set("https://github.com/trejkaz/luceneupgrader")
description.set(project.description)
licenses {
license {
name.set("The Apache Software License, Version 2.0")
url.set("https://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
scm {
url.set("https://github.com/trejkaz/luceneupgrader")
connection.set("git@github.com:trejkaz/luceneupgrader")
developerConnection.set("scm:git:git@github.com:trejkaz/luceneupgrader")
}
issueManagement {
system.set("GitHub Issues")
url.set("https://github.com/trejkaz/luceneupgrader/issues")
}
developers {
developer {
name.set("Hakanai")
email.set("hakanai@ephemeral.garden")
roles.add("Project Lead")
}
}
}
}
}
repositories {
val repoUrl = if (version.toString().contains("SNAPSHOT")) {
"https://s01.oss.sonatype.org/content/repositories/snapshots/"
} else {
"https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
}
maven(repoUrl) {
val user = System.getenv("DEPLOY_USER")
val pass = System.getenv("DEPLOY_PASS")
if (user != null && pass != null) {
credentials {
username = user
password = pass
}
}
}
}
}
signing {
sign(publishing.publications["mavenJava"])
}