1 Star 0 Fork 0

xuanfeng92/kotlin

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
upload_plugins.gradle.kts 1.41 KB
一键复制 编辑 原始数据 按行查看 历史
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)
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xuanfeng92/kotlin.git
git@gitee.com:xuanfeng92/kotlin.git
xuanfeng92
kotlin
kotlin
master

搜索帮助