From 294f61818c33b2ceebccf51f52badd0f6c583083 Mon Sep 17 00:00:00 2001 From: mvicsokolova <82594708+mvicsokolova@users.noreply.github.com> Date: Thu, 14 Dec 2023 10:49:05 +0100 Subject: [PATCH] Change the order of atomicfu and kotlin plugins in the classpath (#3984) This commit changes the order of adding atomicfu and kotlin gradle plugin to the classpath. When `kotlin-gradle-plugin` is added first, `atomicfu-gradle-plugin` is not applied at all and this error is thrown: "e: Module kotlinx.atomicfu cannot be found in the module graph". The change of order fixes the issue. Should be properly investigated. This behaviour started to reproduce after this change in kotlinx-atomicfu (https://github.com/Kotlin/kotlinx-atomicfu/pull/377). Here is the corresponding issue in atomicfu: https://github.com/Kotlin/kotlinx-atomicfu/issues/384 (cherry picked from commit 605ec5619940021309cc319d52d570c542640ab8) --- build.gradle | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index aff2188b5b..e91f5cdd26 100644 --- a/build.gradle +++ b/build.gradle @@ -58,9 +58,11 @@ buildscript { } dependencies { + // Please ensure that atomicfu-gradle-plugin is added to the classpath first, do not change the order, for details see #3984. + // The corresponding issue in kotlinx-atomicfu: https://github.com/Kotlin/kotlinx-atomicfu/issues/384 + classpath "org.jetbrains.kotlinx:atomicfu-gradle-plugin:$atomicfu_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokka_version" - classpath "org.jetbrains.kotlinx:atomicfu-gradle-plugin:$atomicfu_version" classpath "org.jetbrains.kotlinx:kotlinx-knit:$knit_version" classpath "org.jetbrains.kotlinx:binary-compatibility-validator:$binary_compatibility_validator_version" classpath "ru.vyarus:gradle-animalsniffer-plugin:1.5.4" // Android API check