1

The use of kotlinCompilerVersions in composeOptions was deprecated, after which compose just used the kotlin version defined in the project level build file. Now, even that seems to be deprecated, since as of compose 1.0.1, there is no kotlin version specified in the buildScript. How to update it now? In fact, 'where' to? I am unable to build project.

This is all there is in my project-level build

task clean(type: Delete) {
    delete rootProject.buildDir
}

buildscript {
    ext {
        compose_version = '1.0.1'
    }
}

As is clear, there IS no kotlin version defined anywhere (the same is true for the app level build), but it is clear that the version IS being picked up from somewhere, leading to the compiler error. That is what I want to know - From where the version is being picked up, and if, and how I can modify the same.

I am getting this error currently

e: This version (1.0.1) of the Compose Compiler requires Kotlin version 1.5.21 but you appear to be using Kotlin version 1.5.10 which is not known to be compatible.  Please fix your configuration (or `suppressKotlinVersionCompatibilityCheck` but don't say I didn't warn you!).

Well, I do not want to suppress the warning. If there's another solution, I'd appreciate your help

Thanks!

Richard Onslow Roper
  • 5,477
  • 2
  • 11
  • 42

1 Answers1

3

Finally found where it is. There's a file named settings.gradle(Project). The version was pre-defined in the plugins block

Here it is

pluginManagement {
    repositories {
        gradlePluginPortal()
        google()
        mavenCentral()
    }
    plugins {
        id 'com.android.application' version '7.1.0-alpha06'
        id 'com.android.library' version '7.1.0-alpha06'
        id 'org.jetbrains.kotlin.android' version '1.5.10' // Right here 
    }
}
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
    }
}
rootProject.name = "OrgFarm"
include ':app'

Richard Onslow Roper
  • 5,477
  • 2
  • 11
  • 42
  • 1
    just for the next tine, as you're looking for a declaration of dependency with version "1.5.10", most of time you can find it using "find in files" of your project root directory. don't forget check out for type filter/other search settings if it shows nothing – Phil Dukhov Aug 07 '21 at 11:31
  • 1
    Great Idea! Thanks, but I'll tell you honestly, I was not expecting it to be declared in a file as a dependency. As mentioned in the question itself, I thought it might be somewhere in the project structure or a part of the internal IDE values, which could possibly be found through settings, but yeah it does make sense to think of it your way. Since the PSD itself is just a helper which in turn modifies files and dependencies in the end so... Thanks! Nice piece of advise – Richard Onslow Roper Aug 07 '21 at 11:40
  • Advice*, as a noun – Richard Onslow Roper Aug 07 '21 at 19:41