forked from slugify/slugify
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
146 lines (120 loc) · 3.6 KB
/
build.gradle
File metadata and controls
146 lines (120 loc) · 3.6 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
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
plugins {
id 'checkstyle'
id 'java-library'
id 'maven-publish'
id 'pmd'
id 'signing'
alias(libs.plugins.jmh)
alias(libs.plugins.lombok)
alias(libs.plugins.nexusStaging)
alias(libs.plugins.reckon)
alias(libs.plugins.versions)
}
repositories {
mavenCentral()
}
group = 'com.github.slugify'
checkstyle {
toolVersion = '10.9.3'
}
compileJava {
targetCompatibility = JavaVersion.VERSION_11
}
jmh {
jmhVersion = '1.36'
resultFormat = 'JSON'
}
pmd {
consoleOutput = true
toolVersion = '6.55.0'
ruleSetFiles = fileTree('config/pmd').filter { it.file && it.name.endsWith('.xml') }
ruleSets = []
}
reckon {
stages('milestone', 'rc', 'final')
snapshots()
scopeCalc = calcScopeFromProp()
stageCalc = calcStageFromProp()
}
java {
registerFeature('transliterator') {
usingSourceSet sourceSets.main
}
withJavadocJar()
withSourcesJar()
}
javadoc {
options.addBooleanOption("Xdoclint:all", true)
options.addBooleanOption('html5', true)
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
pom {
name = 'Slugify'
description = 'SEO-friendly URLs with Slugify'
url = 'https://github.com/slugify/slugify'
developers {
developer {
id = 'dtrunk90'
name = 'Danny Trunk'
email = 'dtrunk90@gmail.com'
}
}
issueManagement {
system = 'GitHub'
url = 'https://github.com/slugify/slugify/issues'
}
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
scm {
connection = 'scm:git:git://github.com/slugify/slugify.git'
developerConnection = 'scm:git:ssh://github.com/slugify/slugify.git'
url = 'https://github.com/slugify/slugify'
}
}
repositories {
maven {
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 project.findProperty('ossrhUsername')
password project.findProperty('ossrhPassword')
}
}
}
}
}
}
signing {
sign publishing.publications.mavenJava
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
if (signingKey && signingPassword) {
useInMemoryPgpKeys(signingKey, signingPassword)
}
}
test {
useJUnitPlatform()
}
tasks.named('dependencyUpdates').configure {
gradleReleaseChannel = 'current'
rejectVersionIf {
def version = it.candidate.version
def stableKeyword = ['RELEASE', 'FINAL', 'GA'].any { keyword -> version.toUpperCase().contains(keyword) }
def regex = /^[0-9,.v-]+(-r)?$/
return !stableKeyword && !(version ==~ regex)
}
}
dependencies {
transliteratorImplementation libs.icu4j
testImplementation libs.icu4j
testImplementation libs.junit
}
reckonTagCreate.dependsOn check