From a66b9bd38de97ea843dd5e8a7f3a5743b8135f3b Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Wed, 28 Aug 2019 13:20:01 +0200 Subject: [PATCH] feat: Add support for Kotlin 1.3.50 --- README.md | 5 +++-- build.gradle.kts | 4 ++-- .../kotlin/plugin/generated/compiler/GeneratedPlugin.kt | 2 +- .../kotlin/plugin/generated/gradle/GeneratedSubplugin.kt | 2 +- plugin-idea/build.gradle.kts | 4 ++-- .../kotlin/plugin/generated/idea/GeneratedImportHandler.kt | 2 +- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index b5285b8..4801802 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ To use the plugin, just apply the plugin in your `build.gradle`: ```groovy plugins { - id 'nl.fabianm.kotlin.plugin.generated' version '1.3.3' + id 'nl.fabianm.kotlin.plugin.generated' version '1.4.0' } ``` @@ -32,7 +32,8 @@ version you are using: | **Kotlin** | **Plugin** | |:----------:|:----------:| | 1.2.* | 1.0 | -| 1.3.* | 1.3.3 | +| 1.3.0+ | 1.3.3 | +| 1.3.50+| 1.4.0 | You can optionally configure the plugin as shown below: diff --git a/build.gradle.kts b/build.gradle.kts index 41d7701..f80f0f5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -15,14 +15,14 @@ */ plugins { - kotlin("jvm") version "1.3.31" apply false + kotlin("jvm") version "1.3.50" apply false id("org.jlleitschuh.gradle.ktlint") version "8.2.0" apply false id("com.github.johnrengelman.shadow") version "5.0.0" apply false } allprojects { group = "nl.fabianm.kotlin.plugin.generated" - version = "1.3.3" + version = "1.4.0" extra["junitJupiterVersion"] = "5.4.2" extra["junitPlatformVersion"] = "1.4.2" diff --git a/plugin-compiler/src/main/kotlin/nl/fabianm/kotlin/plugin/generated/compiler/GeneratedPlugin.kt b/plugin-compiler/src/main/kotlin/nl/fabianm/kotlin/plugin/generated/compiler/GeneratedPlugin.kt index 589b729..72b462c 100644 --- a/plugin-compiler/src/main/kotlin/nl/fabianm/kotlin/plugin/generated/compiler/GeneratedPlugin.kt +++ b/plugin-compiler/src/main/kotlin/nl/fabianm/kotlin/plugin/generated/compiler/GeneratedPlugin.kt @@ -109,5 +109,5 @@ fun ProjectExtensionDescriptor.registerExtensionAsFirst(project: Project, Extensions.getArea(project) .getExtensionPoint(extensionPointName) .let { it as ExtensionPointImpl } - .registerExtension(extension, LoadingOrder.LAST) + .registerExtension(extension, LoadingOrder.LAST) {} } diff --git a/plugin-gradle/src/main/kotlin/nl/fabianm/kotlin/plugin/generated/gradle/GeneratedSubplugin.kt b/plugin-gradle/src/main/kotlin/nl/fabianm/kotlin/plugin/generated/gradle/GeneratedSubplugin.kt index 34c8ecf..7478747 100644 --- a/plugin-gradle/src/main/kotlin/nl/fabianm/kotlin/plugin/generated/gradle/GeneratedSubplugin.kt +++ b/plugin-gradle/src/main/kotlin/nl/fabianm/kotlin/plugin/generated/gradle/GeneratedSubplugin.kt @@ -50,7 +50,7 @@ class GeneratedKotlinGradleSubplugin : KotlinGradleSubplugin { companion object { private const val GENERATED_ARTIFACT_NAME = "plugin-gradle" private const val GENERATED_GROUP_ID = "nl.fabianm.kotlin.plugin.generated" - private const val GENERATED_VERSION = "1.3.3" + private const val GENERATED_VERSION = "1.4.0" private const val GENERATED_COMPILER_PLUGIN_ID = "nl.fabianm.kotlin.plugin.generated" private val ANNOTATION_ARG_NAME = "annotation" private val VISIBLE_ARG_NAME = "visible" diff --git a/plugin-idea/build.gradle.kts b/plugin-idea/build.gradle.kts index 7dddb83..5a0872c 100644 --- a/plugin-idea/build.gradle.kts +++ b/plugin-idea/build.gradle.kts @@ -52,6 +52,6 @@ tasks.jar { /* IntelliJ */ intellij { pluginName = "kotlin-plugin-generated" - version = "2019.1" - setPlugins("gradle", "org.jetbrains.kotlin:1.3.31-release-IJ2019.1-1") + version = "2019.2" + setPlugins("gradle", "org.jetbrains.kotlin:1.3.50-release-IJ2019.2-1") } diff --git a/plugin-idea/src/main/kotlin/nl/fabianm/kotlin/plugin/generated/idea/GeneratedImportHandler.kt b/plugin-idea/src/main/kotlin/nl/fabianm/kotlin/plugin/generated/idea/GeneratedImportHandler.kt index 5f827e0..bb8b3ed 100644 --- a/plugin-idea/src/main/kotlin/nl/fabianm/kotlin/plugin/generated/idea/GeneratedImportHandler.kt +++ b/plugin-idea/src/main/kotlin/nl/fabianm/kotlin/plugin/generated/idea/GeneratedImportHandler.kt @@ -56,8 +56,8 @@ internal object GeneratedImportHandler { var isEnabled = false val oldPluginClasspaths = (commonArguments.pluginClasspaths ?: emptyArray()).filterTo(mutableListOf()) { val match = regex.matches(it) && validateJar(it, implementationTitle) - logger.info("$it [match=$match]") if (match) { + logger.info("$it [match=$match]") isEnabled = true } !match