代码拉取完成,页面将自动刷新
import org.jetbrains.intellij.pluginRepository.PluginRepositoryInstance
buildscript {
repositories {
mavenCentral()
maven("https://dl.bintray.com/jetbrains/intellij-plugin-service")
}
dependencies {
classpath("org.jetbrains.intellij:plugin-repository-rest-client:0.4.32")
}
}
task("uploadPlugins") {
doLast {
val kotlinPluginId = 6954
val channel = (project.findProperty("plugins.repository.channel") as String?)
?.let { if (it == "_default_") null else it }
val path = project.findProperty("plugins.path") as String? ?: "."
val token = project.property("plugins.repository.token") as String
val repo = PluginRepositoryInstance("https://plugins.jetbrains.com/", token)
val pluginFiles = File(path)
.listFiles { _, fileName ->
fileName.toLowerCase().let {
it.startsWith("kotlin-plugin") &&
it.endsWith(".zip") &&
// don't publish CIDR plugins to IDEA channel
!it.contains("clion") &&
!it.contains("appcode")
}
}
pluginFiles
?.sorted()
?.forEach { pluginFile ->
println("Uploading ${pluginFile.name}")
repo.uploadPlugin(kotlinPluginId, pluginFile, channel)
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。