Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

[PT-563] Consume gradle plugins repo credentials from env #78

Merged
merged 2 commits into from
Feb 8, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions gradle/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ publishGhPages.dependsOn prepareGhCredentials

task prepareGradlePluginsRepoRelease {
doLast {
// force evaluation of properties to check whether they're there or not
buildProperties.secrets['gradle.publish.key'].string
buildProperties.secrets['gradle.publish.secret'].string
System.properties['com.gradle.login.properties.file'] = rootProject.file('secrets.properties')
String key = buildProperties.env['GRADLE_PLUGINS_REPO_KEY'].or(buildProperties.secrets['gradle.publish.key']).string
String secret = buildProperties.env['GRADLE_PLUGINS_REPO_SECRET'].or(buildProperties.secrets['gradle.publish.secret']).string
project.setProperty('gradle.publish.key', key)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should that be rootProject? 🤔

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think project because we apply the publish plugin to project not root. I may be wrong :)

project.setProperty('gradle.publish.secret', secret)
}
}

Expand Down