Skip to content

Commit

Permalink
feat(build): plugin portal creds from env
Browse files Browse the repository at this point in the history
  • Loading branch information
Ingwersaft committed Mar 9, 2020
1 parent 5d11495 commit 3ac92a1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,19 @@ tasks {
val publish by existing
val publishToMavenLocal by existing
listOf(build.get(), publish.get(), publishToMavenLocal.get()).forEach { it.dependsOn(createVersionFile) }

val setupPluginsLogin by creating {
// see: https://github.com/gradle/gradle/issues/1246
val publishKey: String? = System.getenv("GRADLE_PUBLISH_KEY")
val publishSecret: String? = System.getenv("GRADLE_PUBLISH_SECRET")
if (publishKey != null && publishSecret != null) {
println("[setupPluginsLogin] seeting plugin portal credentials from env")
System.getProperties().setProperty("gradle.publish.key", publishKey)
System.getProperties().setProperty("gradle.publish.secret", publishSecret)
}
}
val publishPlugins by existing
publishPlugins.get().dependsOn(setupPluginsLogin)
}
publishing {
repositories {
Expand Down

0 comments on commit 3ac92a1

Please sign in to comment.