Upgrade plugin-repository-rest-client & use token auth
#KT-33338
This commit is contained in:
@@ -2,19 +2,17 @@ buildscript {
|
|||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
maven {
|
maven {
|
||||||
url('https://dl.bintray.com/jetbrains/plugin-repository-rest-client/')
|
url('https://dl.bintray.com/jetbrains/intellij-plugin-service')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'org.jetbrains.intellij:plugin-repository-rest-client:0.1.15'
|
classpath 'org.jetbrains.intellij:plugin-repository-rest-client:0.4.32'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task uploadPlugins {
|
task uploadPlugins {
|
||||||
doLast {
|
doLast {
|
||||||
def env = System.getenv()
|
def env = System.getenv()
|
||||||
def username = env['PLUGIN_REPOSITORY_USER']
|
|
||||||
def password = env['PLUGIN_REPOSITORY_PASSWORD']
|
|
||||||
def channel = env['PLUGIN_REPOSITORY_CHANNEL']
|
def channel = env['PLUGIN_REPOSITORY_CHANNEL']
|
||||||
if (channel == "_default_") {
|
if (channel == "_default_") {
|
||||||
channel = null
|
channel = null
|
||||||
@@ -23,9 +21,10 @@ task uploadPlugins {
|
|||||||
if (path == null) {
|
if (path == null) {
|
||||||
path = "."
|
path = "."
|
||||||
}
|
}
|
||||||
def repo = new org.jetbrains.intellij.pluginRepository.PluginRepositoryInstance(
|
|
||||||
"https://plugins.jetbrains.com/",
|
def token = project.property("plugins.repository.token")
|
||||||
username, password)
|
|
||||||
|
def repo = new org.jetbrains.intellij.pluginRepository.PluginRepositoryInstance("https://plugins.jetbrains.com/", token)
|
||||||
|
|
||||||
File[] files = new File(path).listFiles({ _, String filename ->
|
File[] files = new File(path).listFiles({ _, String filename ->
|
||||||
if (!filename.startsWith("kotlin-plugin") || !filename.endsWith(".zip")) false
|
if (!filename.startsWith("kotlin-plugin") || !filename.endsWith(".zip")) false
|
||||||
@@ -47,5 +46,3 @@ task uploadPlugins {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultTasks 'uploadPlugins'
|
|
||||||
|
|||||||
Reference in New Issue
Block a user