File tree 5 files changed +28
-36
lines changed
5 files changed +28
-36
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,6 @@ signing.keyId=${signing_key: -8}
46
46
signing.password=${signing_password}
47
47
signing.secretKeyRingFile=${keyring_file}
48
48
49
- ossrhUsername =${maven_username}
50
- ossrhPassword =${maven_password}
49
+ sonatypeUsername =${maven_username}
50
+ sonatypePassword =${maven_password}
51
51
EOF
52
-
Original file line number Diff line number Diff line change @@ -193,10 +193,10 @@ if [[ "$CMD" == "release" ]]; then
193
193
194
194
if [[ " $DRY_RUN " = " true" ]]; then
195
195
echo " Dry run: building and publishing to the local repository"
196
- gradle_task=" java-client:publishAllPublicationsToBuildRepository "
196
+ gradle_task=" publishAllPublicationsToDryRunRepository "
197
197
else
198
198
echo " Releasing to Maven snapshot repo"
199
- gradle_task=" java-client:publishAllPublicationsToMavenCentralRepository "
199
+ gradle_task=" publishToSonatype closeAndReleaseStagingRepositories "
200
200
fi
201
201
docker run --rm --env VERSION=$VERSION -u " $( id -u) " \
202
202
$git_mount $src_mount $output_mount \
Original file line number Diff line number Diff line change 16
16
* specific language governing permissions and limitations
17
17
* under the License.
18
18
*/
19
+ plugins {
20
+ id(" io.github.gradle-nexus.publish-plugin" ) version " 2.0.0"
21
+ }
22
+
23
+ nexusPublishing {
24
+ repositories {
25
+ sonatype()
26
+ }
27
+ }
28
+
29
+ repositories {
30
+ mavenCentral()
31
+ }
32
+
33
+ group = " co.elastic.clients"
34
+ description = " Maven central release of the official elasticsearch java client"
35
+
36
+ subprojects {
37
+ group = rootProject.group
38
+ version = rootProject.version
39
+ }
19
40
20
41
allprojects {
21
42
group = " co.elastic.clients"
Original file line number Diff line number Diff line change @@ -25,8 +25,9 @@ import java.io.FileWriter
25
25
plugins {
26
26
java
27
27
`java- library`
28
- checkstyle
29
28
`maven- publish`
29
+ publishing
30
+ checkstyle
30
31
signing
31
32
id(" com.github.jk1.dependency-license-report" ) version " 2.2"
32
33
id(" de.thetaphi.forbiddenapis" ) version " 3.4"
@@ -129,21 +130,6 @@ publishing {
129
130
name = " Build"
130
131
url = uri(" ${rootProject.buildDir} /repository" )
131
132
}
132
-
133
- maven {
134
- name = " MavenCentral"
135
- url = uri(" https://oss.sonatype.org/service/local/staging/deploy/maven2/" )
136
- credentials {
137
- run {
138
- if (gradle.startParameter.taskNames.find { it.contains(" ToMavenCentralRepository" ) } != null ) {
139
- if (! providers.gradleProperty(" ossrhUsername" ).isPresent) logger.error(" ossrhUsername not set" )
140
- if (! providers.gradleProperty(" ossrhPassword" ).isPresent) logger.error(" ossrhPassword not set" )
141
- }
142
- }
143
- username = providers.gradleProperty(" ossrhUsername" ).orNull
144
- password = providers.gradleProperty(" ossrhPassword" ).orNull
145
- }
146
- }
147
133
}
148
134
149
135
publications {
Original file line number Diff line number Diff line change @@ -21,18 +21,4 @@ import java.nio.file.Paths
21
21
22
22
rootProject.name = " elasticsearch-java"
23
23
24
- // Include as subprojects all subdirectories that have a "build.gradle.kts" and no ".gradle-standalone"
25
- fun listFiles (dir : File ){
26
- (dir.listFiles() ? : arrayOf<File >()).
27
- filter { File (it, " build.gradle.kts" ).exists() }.
28
- filter { ! File (it, " .gradle-standalone" ).exists() }.
29
- filter { it.name != " buildSrc" }.
30
- toTypedArray().
31
- forEach { dir ->
32
- include(dir.name)
33
- project(" :" + dir.name).projectDir = dir
34
- }
35
- }
36
-
37
- listFiles(rootProject.projectDir)
38
- listFiles(Paths .get(rootProject.projectDir.path," examples" ).toFile())
24
+ include(" java-client" )
You can’t perform that action at this time.
0 commit comments