Skip to content

Commit e7bf19b

Browse files
committed
IJI-1751 Allow setting libs.space.pub as Gradle property
1 parent 27ecc28 commit e7bf19b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

buildSrc/src/main/kotlin/Publishing.kt

+3-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ fun MavenPom.configureMavenCentralMetadata(project: Project) {
4848
* dev build into 'https://maven.pkg.jetbrains.space/public/p/kotlinx-coroutines/maven' Maven repository.
4949
* In order to use it, pass the corresponding ENV to the TC 'Deploy' task.
5050
*/
51-
private val spacePublicationEnabled = System.getenv("libs.space.pub")?.equals("true") ?: false
51+
private val Project.spacePublicationEnabled: Boolean
52+
get() = getSensitiveProperty("libs.space.pub")?.equals("true") ?: false
5253

5354
fun Project.mavenRepositoryUri(): URI {
5455
if (spacePublicationEnabled) {
@@ -68,7 +69,7 @@ fun configureMavenPublication(rh: RepositoryHandler, project: Project) {
6869
rh.maven {
6970
url = project.mavenRepositoryUri()
7071
credentials {
71-
if (spacePublicationEnabled) {
72+
if (project.spacePublicationEnabled) {
7273
// Configure space credentials
7374
username = project.getSensitiveProperty("libs.space.user")
7475
password = project.getSensitiveProperty("libs.space.password")

0 commit comments

Comments
 (0)