Publishing intellij plugin
Answered
So i wrote my plugin and now want to publish it in the market place,
https://plugins.jetbrains.com/docs/intellij/deployment.html
this article helps a lot however there are two things that aren't specified there.
1) the article states that the generated token should be set in an environment variable but it is not clarified where said environment variable is to be created and how?
2) it then states that in the gradle properties some default values for the environment variable should be set. Again how does this look like and how can it be done?
thanks in advance
Please sign in to leave a comment.
Hello,
re 1) "Start by defining an environment variable such as:" refers to system's console to define environment variable
re 2) you can simply add the entry in gradle.properties file with empty value
hello thanks for the reply.
1) do you have a link where i can se an example on how to do it?
2) so it would look like :
"task{
"EnvironmentVariableName" = ""
}
1) open Terminal/Console of your OS
2) no, gradle.properties, not the Gradle build file
Or use https://plugins.jetbrains.com/docs/intellij/deployment.html#using-parameters-for-the-gradle-task approach alternatively.
ok i created a gradle.properties file in my main directory and filled it with
token=<token_value>
also i chose to follow the route that i give the token as argument in the gradle task config rather than the environment variable
still i get following error
"Execution failed for task ':publishPlugin'.
> token property must be specified for plugin publishing"
did i miss a step or is the gradle.property value of the wrong name ?
also do i still need the line
token = System.getenv("ORG_GRADLE_PROJECT_intellijPublishToken") in the gradle task if i use argument instead of environment variable
Daniel, the starting point here is the Gradle configuration file with the following part:
This value you can pass to the Gradle using environment variables or properties:
Note, that storing a secret token in the gradle.properties file isn't a safe solution – it can be accidentally committed to the remote repository.
Thanks for clarifying
Jakub Chrzanowski In Github, should we keep the publishToken in the Secrets or Variables?