Update gradle-intellij-plugin to 1.1

This commit is contained in:
Him188 2021-07-02 01:44:57 +08:00
parent d8023fd82f
commit 823193f1bb

View File

@ -31,26 +31,32 @@ kotlin.target.compilations.forEach { kotlinCompilation ->
// See https://github.com/JetBrains/gradle-intellij-plugin/ // See https://github.com/JetBrains/gradle-intellij-plugin/
intellij { intellij {
version = Versions.intellij version.set(Versions.intellij)
isDownloadSources = true downloadSources.set(true)
updateSinceUntilBuild = false updateSinceUntilBuild.set(false)
sandboxDirectory = projectDir.resolve("run/idea-sandbox").absolutePath sandboxDir.set(projectDir.resolve("run/idea-sandbox").absolutePath)
setPlugins( plugins.set(
"org.jetbrains.kotlin:${Versions.kotlinIntellijPlugin}", // @eap listOf(
"java", "org.jetbrains.kotlin:${Versions.kotlinIntellijPlugin}", // @eap
"gradle" "java",
"gradle"
)
) )
} }
project.extra.set("javaTarget", JavaVersion.VERSION_11) // see build.gradle.kts:213 in root project afterEvaluate {
java {
tasks.getByName("publishPlugin", org.jetbrains.intellij.tasks.PublishTask::class) { sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
}
tasks.getByName("publishPlugin", org.jetbrains.intellij.tasks.PublishPluginTask::class) {
val pluginKey = project.findProperty("jetbrains.hub.key")?.toString() val pluginKey = project.findProperty("jetbrains.hub.key")?.toString()
if (pluginKey != null) { if (pluginKey != null) {
logger.info("Found jetbrains.hub.key") logger.info("Found jetbrains.hub.key")
setToken(pluginKey) token.set(pluginKey)
} else { } else {
logger.info("jetbrains.hub.key not found") logger.info("jetbrains.hub.key not found")
} }
@ -64,13 +70,14 @@ kotlin.target.compilations.all {
kotlinOptions { kotlinOptions {
apiVersion = "1.4" apiVersion = "1.4"
languageVersion = "1.4" languageVersion = "1.4"
jvmTarget = "11"
} }
} }
tasks.withType<org.jetbrains.intellij.tasks.PatchPluginXmlTask> { tasks.withType<org.jetbrains.intellij.tasks.PatchPluginXmlTask> {
sinceBuild("201.*") sinceBuild.set("201.*")
untilBuild("215.*") untilBuild.set("215.*")
pluginDescription( pluginDescription.set(
""" """
Plugin development support for <a href='https://github.com/mamoe/mirai-console'>Mirai Console</a> Plugin development support for <a href='https://github.com/mamoe/mirai-console'>Mirai Console</a>
@ -82,7 +89,7 @@ tasks.withType<org.jetbrains.intellij.tasks.PatchPluginXmlTask> {
</ul> </ul>
""".trimIndent() """.trimIndent()
) )
changeNotes( changeNotes.set(
""" """
See <a href="https://github.com/mamoe/mirai-console/releases">https://github.com/mamoe/mirai-console/releases</a> See <a href="https://github.com/mamoe/mirai-console/releases">https://github.com/mamoe/mirai-console/releases</a>
""".trimIndent() """.trimIndent()