11/*
22 * SPDX-License-Identifier: Apache-2.0
33 *
4- * Copyright 2018-2021 Agorapulse.
4+ * Copyright 2018-2025 Agorapulse.
55 *
66 * Licensed under the Apache License, Version 2.0 (the "License");
77 * you may not use this file except in compliance with the License.
@@ -20,14 +20,13 @@ plugins {
2020 id ' org.kordamp.gradle.checkstyle'
2121 id ' org.kordamp.gradle.codenarc'
2222 id ' org.kordamp.gradle.coveralls'
23- id ' io.github.gradle-nexus.publish-plugin'
2423}
2524
26- if (! project. hasProperty(' ossrhUsername ' )) ext. ossrhUsername = System . getenv(' SONATYPE_USERNAME' ) ?: ' **UNDEFINED**'
27- if (! project. hasProperty(' ossrhPassword ' )) ext. ossrhPassword = System . getenv(' SONATYPE_PASSWORD' ) ?: ' **UNDEFINED**'
28- if (! project. hasProperty(' signingKeyId ' )) ext. signingKeyId = System . getenv(' SIGNING_KEY_ID' ) ?: ' **UNDEFINED**'
29- if (! project. hasProperty(' signingPassword ' )) ext. signingPassword = System . getenv(' SIGNING_PASSWORD' ) ?: ' **UNDEFINED**'
30- if (! project. hasProperty(' signingSecretKey ' )) ext. signingSecretKey = System . getenv(' SIGNING_SECRET_KEY_PATH' ) ? rootProject. file(System . getenv(' SIGNING_SECRET_KEY_PATH' )). text : ' **UNDEFINED**'
25+ if (! project. hasProperty(' mavenCentralUsername ' )) ext. mavenCentralUsername = System . getenv(' SONATYPE_USERNAME' ) ?: ' **UNDEFINED**'
26+ if (! project. hasProperty(' mavenCentralPassword ' )) ext. mavenCentralPassword = System . getenv(' SONATYPE_PASSWORD' ) ?: ' **UNDEFINED**'
27+ if (! project. hasProperty(' signingInMemoryKeyId ' )) ext. signingInMemoryKeyId = System . getenv(' SIGNING_KEY_ID' ) ?: ' **UNDEFINED**'
28+ if (! project. hasProperty(' signingInMemoryKeyPassword ' )) ext. signingInMemoryKeyPassword = System . getenv(' SIGNING_PASSWORD' ) ?: ' **UNDEFINED**'
29+ if (! project. hasProperty(' signingInMemoryKey ' )) ext. signingInMemoryKey = System . getenv(' SIGNING_SECRET_KEY_PATH' ) ? rootProject. file(System . getenv(' SIGNING_SECRET_KEY_PATH' )). text : ' **UNDEFINED**'
3130
3231config {
3332 release = (rootProject. findProperty(' release' ) ?: false ). toBoolean()
@@ -74,13 +73,20 @@ config {
7473 publishing {
7574 enabled = false
7675 signing {
77- enabled = true
78- keyId = signingKeyId
79- secretKey = signingSecretKey
80- password = signingPassword
76+ enabled = false
77+ }
78+ }
79+
80+ artifacts {
81+ source {
82+ enabled = false
83+ }
84+ }
85+
86+ docs {
87+ javadoc {
88+ enabled = false
8189 }
82- releasesRepository = ' localRelease'
83- snapshotsRepository = ' localSnapshot'
8490 }
8591
8692 quality {
@@ -110,32 +116,15 @@ allprojects {
110116 }
111117}
112118
113- nexusPublishing {
114- repositories {
115- sonatype {
116- nexusUrl = uri(' https://s01.oss.sonatype.org/service/local/' )
117- snapshotRepositoryUrl = uri(' https://s01.oss.sonatype.org/content/repositories/snapshots/' )
118- username = ossrhUsername
119- password = ossrhPassword
120- }
121- }
122- }
123-
124119subprojects { Project subproject ->
125120 if (subproject. name == ' guide' ) return
126121
127122 apply plugin : ' groovy'
123+ apply plugin : ' com.vanniktech.maven.publish'
128124
129125 targetCompatibility = JavaVersion . VERSION_1_8
130126 sourceCompatibility = JavaVersion . VERSION_1_8
131127
132- config {
133- bintray {
134- name = subproject. name
135- githubRepo = " agorapulse/$rootProject . name "
136- }
137- }
138-
139128 test {
140129 systemProperty ' TEST_RESOURCES_FOLDER' , new File (subproject. projectDir, ' src/test/resources' ). canonicalPath
141130 systemProperty ' user.timezone' , ' UTC'
@@ -147,6 +136,42 @@ subprojects { Project subproject ->
147136 }
148137
149138 clean. dependsOn cleanOut
139+
140+ mavenPublishing {
141+ publishToMavenCentral(true )
142+ signAllPublications()
143+
144+ pom {
145+ name = " Agorapulse Testing Libraries"
146+ description = ' Set of useful testing libraries'
147+ inceptionYear = " 2018"
148+ url = " https://github.com/agorapulse/testing-libraries"
149+ licenses {
150+ license {
151+ name = " The Apache License, Version 2.0"
152+ url = " http://www.apache.org/licenses/LICENSE-2.0.txt"
153+ distribution = " http://www.apache.org/licenses/LICENSE-2.0.txt"
154+ }
155+ }
156+ developers {
157+ developer {
158+ id = " musketyr"
159+ name = " Vladimir Orany"
160+ url = " https://github.com/musketyr/"
161+ }
162+ }
163+ scm {
164+ url = " https://github.com/agorapulse/testing-libraries.git"
165+ connection = " scm:git:git://github.com/agorapulse/testing-libraries.git"
166+ developerConnection = " scm:git:ssh://git@github.com/agorapulse/testing-libraries.git"
167+ }
168+ }
169+ }
170+
171+ signing {
172+ useInMemoryPgpKeys(rootProject. ext. signingInMemoryKey, rootProject. ext. signingInMemoryKeyPassword)
173+ sign publishing. publications
174+ }
150175}
151176
152177check. dependsOn(' aggregateCheckstyle' , ' aggregateCodenarc' , ' aggregateAllTestReports' , ' coveralls' )
0 commit comments