forked from awslabs/aws-java-nio-spi-for-s3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
183 lines (162 loc) · 5.66 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
173
174
175
176
177
178
179
180
181
182
183
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java library project to get you started.
* For more details take a look at the 'Building Java & JVM projects' chapter in the Gradle
* User Manual available at https://docs.gradle.org/7.3.3/userguide/building_java_projects.html
*/
plugins {
// Apply the java-library plugin for API and implementation separation.
id 'java-library'
id 'signing'
id 'maven-publish'
id 'jacoco'
id 'jvm-test-suite'
id 'jacoco-report-aggregation'
id 'checkstyle'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'org.revapi.revapi-gradle-plugin' version '1.8.0'
}
repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
}
group = 'software.amazon.nio.s3'
archivesBaseName = 'nio-spi-for-s3'
version = '2.1.0'
java {
withSourcesJar()
withJavadocJar()
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
}
tasks.withType(JavaCompile).configureEach {
options.release.set(11)
options.compilerArgs += ['-Xlint:all,-serial']
}
sourceSets {
examples {
java {
}
}
}
dependencies {
implementation 'io.reactivex.rxjava3:rxjava:3.1.9'
implementation platform('software.amazon.awssdk:bom:2.28.18')
implementation('software.amazon.awssdk:s3') {
exclude group: 'software.amazon.awssdk', module: 'apache-client'
}
implementation('software.amazon.awssdk:s3-transfer-manager') {
exclude group: 'software.amazon.awssdk', module: 'apache-client'
}
implementation 'software.amazon.awssdk.crt:aws-crt:0.31.3'
implementation 'org.slf4j:slf4j-api:2.0.16'
implementation 'com.github.ben-manes.caffeine:caffeine:3.1.8'
examplesImplementation project
examplesImplementation 'org.slf4j:slf4j-api:2.0.16'
}
publishing {
publications {
maven(MavenPublication) {
from components.java
pom {
name = 'AWS Java NIO SPI for S3'
description = 'A Java NIO.2 service provider for S3, allowing Java NIO operations to be performed on paths using the `s3` scheme. This\n' +
'package implements the service provider interface (SPI) defined for Java NIO.2 in JDK 1.7 providing "plug-in" non-blocking\n' +
'access to S3 objects for Java applications using Java NIO.2 for file access.'
url = 'https://github.com/awslabs/aws-java-nio-spi-for-s3'
inceptionYear = '2022'
scm {
url = 'https://github.com/awslabs/aws-java-nio-spi-for-s3/tree/main'
connection = 'scm:git:ssh://[email protected]/awslabs/aws-java-nio-spi-for-s3.git'
developerConnection = 'scm:git:ssh://[email protected]/awslabs/aws-java-nio-spi-for-s3.git'
}
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
distribution = 'repo'
}
}
developers {
developer {
id = 'markjschreiber'
name = 'Mark Schreiber'
email = '[email protected]'
}
}
}
}
}
repositories {
maven {
def releasesRepoUrl = 'https://aws.oss.sonatype.org/service/local/staging/deploy/maven2/'
def snapshotsRepoUrl = 'https://aws.oss.sonatype.org/content/repositories/snapshots'
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials(PasswordCredentials)
}
}
}
signing {
sign publishing.publications.maven
}
javadoc {
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
// JVM test suite plugin https://docs.gradle.org/7.3.3/userguide/jvm_test_suite_plugin.html
testing {
suites {
integrationTest(JvmTestSuite) {
dependencies {
implementation project
implementation 'org.testcontainers:junit-jupiter:1.20.2'
implementation 'org.testcontainers:localstack:1.20.2'
implementation 'org.testcontainers:testcontainers:1.20.2'
}
}
withType(JvmTestSuite).configureEach {
useJUnitJupiter('5.10.0')
targets {
all {
testTask.configure {
systemProperty "aws.region", "us-east-1"
}
}
}
dependencies {
implementation 'org.assertj:assertj-core:3.26.3'
implementation 'org.mockito:mockito-core:5.14.1'
implementation 'org.mockito:mockito-junit-jupiter:5.14.1'
implementation 'com.github.stefanbirkner:system-lambda:1.2.1'
implementation 'ch.qos.logback:logback-classic:1.5.8'
}
}
}
}
reporting {
reports {
testFullCodeCoverageReport(JacocoCoverageReport) {
testType = 'full'
}
}
}
tasks.named('testFullCodeCoverageReport') {
dependsOn( testCodeCoverageReport, integrationTestCodeCoverageReport )
executionData fileTree( project.buildDir.absolutePath ).include( "jacoco/*.exec" )
}
jacocoTestReport {
dependsOn test
reports {
xml.required = true
xml.outputLocation = file("build/reports/coverage.xml")
}
}
checkstyle {
toolVersion = '10.12.5'
configDirectory.set(new File(projectDir, ".checkstyle"))
}