I try to convert gradle file into kotlin script file:
build.gradle
buildscript {
ext {
compose_version = '1.2.0'
}
}
plugins {
id("com.android.application") version "7.4.0" apply false
id("com.android.library") version "7.4.0" apply false
id("org.jetbrains.kotlin.android") version "1.7.0" apply false
}
I refer to this answer:
build.gradle.kts
buildscript {
extra.apply{
set("compose_version", "1.2.0")
}
}
but not working:
A problem occurred evaluating root project 'Sage'.
> Could not get unknown property 'extra' for object of type org.gradle.api.internal.initialization.DefaultScriptHandler.