Skip to content

Commit

Permalink
fix(plugin): provide credentials for Gradle Plugins portal
Browse files Browse the repository at this point in the history
Closes #73
  • Loading branch information
grv87 committed Dec 1, 2018
1 parent 808be63 commit 6d5a7d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,8 @@ Should be provided in [standard Gradle ways
<tr><td><code>gpgKeyPassphrase</code></td> <td>Not required. Assumes no passphrase if not provided</td>
<tr><td><code>bintrayUser</code> </td><td rowspan="2"><code>org.fidata.base.jvm</code> for public releases</td><td rowspan="2">Release to Bintray</td><td>&nbsp;</td>
<tr><td><code>bintrayAPIKey</code></td> <td>&nbsp;</td>
<tr><td><code>gradlePluginsKey</code> </td><td rowspan="2"><code>org.fidata.plugin</code> for public releases</td><td rowspan="2">Release to Gradle Plugins portal</td><td>&nbsp;</td>
<tr><td><code>gradlePluginsSecret</code></td> <td>&nbsp;</td>
</tbody>
</table>

Expand Down
3 changes: 3 additions & 0 deletions src/main/groovy/org/fidata/gradle/GradlePluginPlugin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import static ProjectPlugin.ARTIFACTORY_URL
import static JVMBasePlugin.FUNCTIONAL_TEST_SOURCE_SET_NAME
import static JVMBasePlugin.FUNCTIONAL_TEST_TASK_NAME
import static org.gradle.internal.FileUtils.toSafeFileName
import com.gradle.publish.PublishTask
import org.fidata.gradle.utils.PathDirector
import java.nio.file.InvalidPathException
import org.fidata.gradle.utils.ReportPathDirectorException
Expand Down Expand Up @@ -101,6 +102,8 @@ final class GradlePluginPlugin extends AbstractProjectPlugin implements Property
ProjectConvention projectConvention = project.convention.getPlugin(ProjectConvention)
if (projectConvention.publicReleases) {
project.pluginManager.apply 'com.gradle.plugin-publish'
project.extensions.extraProperties[PublishTask.GRADLE_PUBLISH_KEY] = project.extensions.extraProperties['gradlePluginsKey']
project.extensions.extraProperties[PublishTask.GRADLE_PUBLISH_SECRET] = project.extensions.extraProperties['gradlePluginsSecret']
project.extensions.configure(PluginBundleExtension) { PluginBundleExtension extension ->
extension.with {
description = project.version.toString() == '1.0.0' ? project.description : rootProjectConvention.changeLogTxt.get().toString()
Expand Down

0 comments on commit 6d5a7d7

Please sign in to comment.