-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
172 lines (152 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
plugins {
id 'java-library'
id 'maven-publish'
id 'maven'
id 'signing'
}
group = 'se.solrike.spring-aws-extras'
version = '0.0.4'
sourceCompatibility = '11'
java {
withSourcesJar()
withJavadocJar()
}
artifacts {
archives javadocJar, sourcesJar
}
signing {
sign configurations.archives
}
repositories {
mavenCentral()
// maven {
// name 'github'
// url 'https://maven.pkg.github.com/lucas3oo/spring-aws-extras'
// credentials {
// username System.getenv("USERNAME")
// password System.getenv("TOKEN")
// }
// }
}
dependencies {
def awsSdkVersion = '1.11.928'
api "com.amazonaws:aws-java-sdk-core:$awsSdkVersion"
api "com.amazonaws:aws-java-sdk-s3:$awsSdkVersion"
api 'org.springframework:spring-context:5.3.5'
api 'org.springframework:spring-core:5.3.5'
implementation 'org.slf4j:slf4j-api:1.7.30'
implementation ('io.awspring.cloud:spring-cloud-aws-core:2.3.0') {
exclude group: 'com.amazonaws'
}
runtimeOnly "com.amazonaws:aws-java-sdk-kms:$awsSdkVersion"
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0'
testImplementation 'org.mockito:mockito-core:3.7.7'
testImplementation 'org.mockito:mockito-junit-jupiter:3.7.7'
testImplementation 'org.springframework.boot:spring-boot-starter-test:2.4.4'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0'
}
test {
useJUnitPlatform()
}
// to publish run "./gradlew clean build publish"
publishing {
repositories {
maven {
// change to point to your repo, e.g. http://my.org/repo
url = "$buildDir/repo"
}
// maven {
// name = "GitHubPackages"
// url = uri("https://maven.pkg.github.com/lucas3oo/spring-aws-extras")
// credentials {
// username = project.findProperty("gpr.user") ?: System.getenv("USERNAME")
// password = project.findProperty("gpr.key") ?: System.getenv("TOKEN")
// }
// }
}
publications {
gpr(MavenPublication) {
artifactId = 'spring-aws-extras'
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = 'spring-aws-extras'
description = 'Util classes to glue Spring and AWS together.'
url = 'https://github.com/Lucas3oo/spring-aws-extras'
licenses {
license {
name = 'MIT License'
url = 'https://github.com/Lucas3oo/spring-aws-extras/blob/main/LICENSE'
}
}
developers {
developer {
id = 'Lucas3oo'
name = 'Lucas Persson'
email = '[email protected]'
organization = 'Lucas Persson'
organizationUrl = 'https://github.com/Lucas3oo'
}
}
scm {
connection = 'scm:git:https://github.com/Lucas3oo/spring-aws-extras.git'
developerConnection = 'scm:git:[email protected]:Lucas3oo/spring-aws-extras.git'
url = 'https://github.com/Lucas3oo/spring-aws-extras'
}
}
}
}
}
// https://central.sonatype.org/pages/ossrh-guide.html#deployment
// https://central.sonatype.org/pages/gradle.html
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
pom.project {
name 'spring-aws-extras'
packaging 'jar'
// optionally artifactId can be defined here
description 'Util classes to glue Spring and AWS together.'
url 'https://github.com/Lucas3oo/spring-aws-extras'
licenses {
license {
name 'MIT License'
url 'https://github.com/Lucas3oo/spring-aws-extras/blob/main/LICENSE'
}
}
developers {
developer {
id 'Lucas3oo'
name 'Lucas Persson'
email '[email protected]'
organization 'Lucas Persson'
organizationUrl 'https://github.com/Lucas3oo'
}
}
scm {
connection 'scm:git:https://github.com/Lucas3oo/spring-aws-extras.git'
developerConnection 'scm:git:[email protected]:Lucas3oo/spring-aws-extras.git'
url 'https://github.com/Lucas3oo/spring-aws-extras'
}
}
}
}
}
// to upgrade the metainfo about which gradle version we shall use. Run ./gradlew wrapper after you have updated the version. The commit the new wrapper files except the gradlew.bat
wrapper {
gradleVersion = '6.8.2'
}