-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
172 lines (141 loc) · 4.87 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
import com.github.jk1.license.filter.LicenseBundleNormalizer
import com.github.jk1.license.render.InventoryHtmlReportRenderer
buildscript {
repositories {
mavenLocal()
mavenCentral()
}
}
plugins {
id 'jacoco'
id 'java-library'
id 'io.freefair.lombok' version '8.4'
id 'org.cadixdev.licenser' version '0.6.1'
id 'com.github.jk1.dependency-license-report' version '2.5'
id 'com.github.ben-manes.versions' version '0.51.0'
id 'signing'
id 'maven-publish'
id 'io.codearte.nexus-staging' version '0.30.0'
}
repositories {
mavenLocal()
mavenCentral()
}
group 'ru.oleg-cherednik.zip4jvm'
version '1.12'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
options.compilerArgs += ['-Xlint:unchecked']
}
configurations {
jar.archiveFileName = "${rootProject.name}-${version}.jar"
}
apply from: "${projectDir}/gradle/checkstyle.gradle"
apply from: "${projectDir}/gradle/pmd.gradle"
dependencies {
annotationProcessor "org.projectlombok:lombok:${property('lombok.version')}"
implementation 'org.slf4j:slf4j-api:2.1.0-alpha1'
implementation 'commons-io:commons-io:2.17.0'
implementation 'org.apache.commons:commons-lang3:3.17.0'
implementation 'org.apache.commons:commons-collections4:4.5.0-M2'
implementation 'commons-codec:commons-codec:1.17.1'
implementation 'com.github.luben:zstd-jni:1.5.6-6'
testAnnotationProcessor "org.projectlombok:lombok:${property('lombok.version')}"
//noinspection VulnerableLibrariesLocal
testImplementation 'org.testng:testng:7.4.0'
testImplementation 'org.assertj:assertj-core:3.26.3'
testImplementation 'org.mockito:mockito-core:4.11.0'
testImplementation 'org.apache.commons:commons-compress:1.27.1'
testImplementation 'net.sf.sevenzipjbinding:sevenzipjbinding:16.02-2.01'
testImplementation 'net.sf.sevenzipjbinding:sevenzipjbinding-all-platforms:16.02-2.01'
testImplementation 'net.lingala.zip4j:zip4j:2.11.5'
//noinspection VulnerableLibrariesLocal
testImplementation('de.idyl:winzipaes:1.0.1') {
exclude group: 'org.bouncycastle', module: 'bcprov-jdk16'
}
testImplementation 'org.tukaani:xz:1.10'
}
jacocoTestReport {
reports {
xml.required = true
html.required = true
}
}
javadoc {
options.addBooleanOption('Xdoclint:-missing', true)
}
//check.finalizedBy(checkLicense)
check.finalizedBy(generateLicenseReport)
check.finalizedBy(jacocoTestReport)
test {
dependsOn('jar')
useTestNG()
}
license {
header rootProject.file('APACHE.txt')
include '**/*.java'
newLine false
}
licenseReport {
configurations = ['compileClasspath', 'runtimeClasspath', 'testCompileClasspath', 'testRuntimeClasspath']
renderers = [new InventoryHtmlReportRenderer()]
allowedLicensesFile = new File("$projectDir/misc/license/allowed-licenses.json")
filters = [new LicenseBundleNormalizer(bundlePath: "$projectDir/misc/license/license-normalizer-bundle.json")]
}
signing {
sign publishing.publications
}
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
maven(MavenPublication) {
from components.java
pom {
name = rootProject.name
description = 'Zip files support for JDK application'
url = 'https://github.com/oleg-cherednik/zip4jvm'
inceptionYear = '2019'
licenses {
license {
name = 'The Apache Software License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution = 'repo'
}
}
developers {
developer {
id = 'oleg.cherednik'
name = 'Oleg Cherednik'
email = '[email protected]'
}
}
scm {
url = 'https://github.com/oleg-cherednik/zip4jvm'
connection = 'scm:https://github.com/oleg-cherednik/zip4jvm.git'
developerConnection = 'scm:[email protected]:oleg-cherednik/zip4jvm.git'
}
}
}
}
repositories {
maven {
name = 'ossrh'
url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
credentials {
username = findProperty('ossrhToken') as String
password = findProperty('ossrhTokenPassword') as String
}
}
}
}
nexusStaging {
serverUrl = 'https://oss.sonatype.org/service/local/'
packageGroup = 'ru.oleg-cherednik'
username = findProperty('ossrhToken') as String
password = findProperty('ossrhTokenPassword') as String
}