Skip to content

Commit

Permalink
Configure publication only if project has maven publishing plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Schahen committed Apr 19, 2021
1 parent 556ac1d commit 8040ca6
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions ci/docker/compose-web/init.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,6 @@ rootProject {
apply plugin: com.dorongold.gradle.tasktree.TaskTreePlugin
}

publishing {
repositories {
maven {
url "https://maven.pkg.jetbrains.space/public/p/compose/dev"
credentials {
username = project.hasProperty("COMPOSE_REPO_USERNAME") ? "$COMPOSE_REPO_USERNAME" : ""
password = project.hasProperty("COMPOSE_REPO_KEY") ? "$COMPOSE_REPO_KEY" : ""
}
}
}
}

settingsEvaluated { settings ->
settings.pluginManagement {
Expand All @@ -39,6 +28,21 @@ settingsEvaluated { settings ->
}

allprojects {

pluginManager.withPlugin("maven-publish") {
publishing {
repositories {
maven {
url "https://maven.pkg.jetbrains.space/public/p/compose/dev"
credentials {
username = project.hasProperty("COMPOSE_REPO_USERNAME") ? "$COMPOSE_REPO_USERNAME" : ""
password = project.hasProperty("COMPOSE_REPO_KEY") ? "$COMPOSE_REPO_KEY" : ""
}
}
}
}
}

buildscript {
repositories {
mavenCentral()
Expand Down

0 comments on commit 8040ca6

Please sign in to comment.