You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use the release plugin in combination with official publish-plugin (to publish plugin on Gradle plugin portal).
I put credentials in HOME_DIR/.gradle/gradle.properties and it is working fine when I do ./gradlew publishPlugins.
But when trying to have release + publish in one run (adding afterReleaseBuild.dependsOn publishPlugins) it fails saying that credentials are not defined:
./gradlew release
:release
:gradle-sonarqube-plugin:createScmAdapter
:gradle-sonarqube-plugin:initScmAdapter
:gradle-sonarqube-plugin:checkCommitNeeded
:gradle-sonarqube-plugin:checkUpdateNeeded
:gradle-sonarqube-plugin:unSnapshotVersion
> Building 0% > :release > :gradle-sonarqube-plugin:confirmReleaseVersion
??> This release version: [1.1]
:gradle-sonarqube-plugin:confirmReleaseVersion
:gradle-sonarqube-plugin:checkSnapshotDependencies
:gradle-sonarqube-plugin:runBuildTasks
:gradle-sonarqube-plugin:beforeReleaseBuild UP-TO-DATE
:gradle-sonarqube-plugin:compileJava UP-TO-DATE
:gradle-sonarqube-plugin:compileGroovy UP-TO-DATE
:gradle-sonarqube-plugin:processResources UP-TO-DATE
:gradle-sonarqube-plugin:classes UP-TO-DATE
:gradle-sonarqube-plugin:jar UP-TO-DATE
:gradle-sonarqube-plugin:groovydoc UP-TO-DATE
:gradle-sonarqube-plugin:publishPluginGroovyDocsJar UP-TO-DATE
:gradle-sonarqube-plugin:publishPluginJar UP-TO-DATE
:gradle-sonarqube-plugin:javadoc UP-TO-DATE
:gradle-sonarqube-plugin:publishPluginJavaDocsJar UP-TO-DATE
:gradle-sonarqube-plugin:assemble UP-TO-DATE
:gradle-sonarqube-plugin:licenseMain UP-TO-DATE
:gradle-sonarqube-plugin:licenseTest UP-TO-DATE
:gradle-sonarqube-plugin:license UP-TO-DATE
:gradle-sonarqube-plugin:compileTestJava UP-TO-DATE
:gradle-sonarqube-plugin:compileTestGroovy UP-TO-DATE
:gradle-sonarqube-plugin:processTestResources UP-TO-DATE
:gradle-sonarqube-plugin:testClasses UP-TO-DATE
:gradle-sonarqube-plugin:test UP-TO-DATE
:gradle-sonarqube-plugin:check UP-TO-DATE
:gradle-sonarqube-plugin:build UP-TO-DATE
:gradle-sonarqube-plugin:publishPlugins
Publishing plugin org.sonarqube version 1.1
:gradle-sonarqube-plugin:publishPlugins FAILED
:gradle-sonarqube-plugin:runBuildTasks FAILED
:release FAILED
Release process failed, reverting back any changes made by Release Plugin.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':publishPlugins'.
> Missing publishing keys. Please set gradle.publish.key and gradle.publish.secret system properties or login using the login task.
The only solution I found was to pass properties directly on command line: ./gradlew release -Dgradle.publish.key=xxxxx -Dgradle.publish.secret=yyyyy
The text was updated successfully, but these errors were encountered:
I do exactly the same here in the release plugin vor the bintray credentials and it works fine.
The release plugin is not doing anything special in terms of loading/reading properties. All the subprocesses are started as the same user you start the initial release process.
I found this, which makes me think that something is wrong with the publish plugin. https://issues.gradle.org/browse/GRADLE-3281
You are right, I have added project local gradle.properties for the release plugin to work so this may be the cause of the issue. Thanks for the investigation!
Hi,
I'm trying to use the release plugin in combination with official publish-plugin (to publish plugin on Gradle plugin portal).
I put credentials in
HOME_DIR/.gradle/gradle.properties
and it is working fine when I do./gradlew publishPlugins
.But when trying to have release + publish in one run (adding
afterReleaseBuild.dependsOn publishPlugins
) it fails saying that credentials are not defined:The only solution I found was to pass properties directly on command line:
./gradlew release -Dgradle.publish.key=xxxxx -Dgradle.publish.secret=yyyyy
The text was updated successfully, but these errors were encountered: