I successfully upgraded my project to Kotlin 1.6.2...
# gradle
n
I successfully upgraded my project to Kotlin 1.6.21, but after changing
plugins { id "org.jetbrains.kotlin.jvm" version "1.6.0" }
to
plugins { id "org.jetbrains.kotlin.jvm" version "1.6.21" }
I now get: "DefaultTaskContainer#register(String, Class, Object...) on task set cannot be executed in the current context." This is with Gradle 6.9.2. Any idea what I'm doing wrong?
t
Could you provide full stacktrace?
n
Sure. Line 713 in my
build.gradle
is:
Copy code
161  subprojects { subproject ->
   162
   163      if (name in excludedProjectNames) {
   164          // skip applying 'gradle' plugins
   165          // to avoid the creation of empty jars
   166          return
   167      }
   168
   169      apply plugin: 'java-library'
   170      apply plugin: 'eclipse'
   171      apply plugin: 'maven'
   172      apply plugin: 'jacoco'
   173      apply plugin: 'org.jetbrains.kotlin.jvm'
   174      apply plugin: 'org.jlleitschuh.gradle.ktlint'
   175      apply plugin: 'io.gitlab.arturbosch.detekt'
and
settings.gradle
contains:
Copy code
1  pluginManagement {
     2      repositories {
     3          gradlePluginPortal()
     4          maven {
     5              name "ext-release-local"
     6              url "<https://artifactory.rnd.metricstream.com/artifactory/ext-release-local>"
     7          }
     8      }
     9
    10      plugins {
    11          id "com.gradle.enterprise" version "3.7.1"
    12          id "org.sonarqube" version "2.8"
    13          id "de.fayard.buildSrcVersions" version "0.7.0"
    14          //id "com.palantir.jacoco-full-report" version "0.4.0"
    15          id "com.github.voplex95.lesscompiler" version "1.0.3"
    16          id "com.moowork.node" version "1.1.1"
    17          id "com.moowork.grunt" version "1.2.0"
    18          id "com.bmuschko.cargo" version "2.1"
    19          id "org.jetbrains.kotlin.jvm" version "1.6.21"
    20          id "org.jlleitschuh.gradle.ktlint" version "9.4.1"
    21          id "io.gitlab.arturbosch.detekt" version "1.16.0"
    22          id 'net.ltgt.errorprone' version "1.2.1"
    23          id "nebula.lint" version "17.1.0"
    24      }
    25  }
    26
t
Could you try with just released KGP version
1.7.0-Beta
and if it is still failing - open a new issue with repro?
n
It works with
id "org.jetbrains.kotlin.jvm" version "1.7.0-Beta"
. However, I cannot use beta versions right now. So should I stick with
1.6.0
for the time? What are the downsides of using plugin
1.6.0
with version
1.6.21
for the rest (stdlib, embeddable-compiler, reflect, ...)?
t
yep, then just stick with
1.6.0
. We would not release
1.6.22
version, so you have to wait for final
1.7.0
release
What are the downsides of using plugin
1.6.0
with version
1.6.21
for the rest (stdlib, embeddable-compiler, reflect, ...)?
Theoretically should be no downsides or issues
n
I will quote you on that 🙂
🙂 1
thx for your help. BTW: I was not able to find the
1.7.0-Beta
tag in github (was curious to compare the 2 versions)
t
release is still in the progress. Should appear soon