Hey guys! I'm using some Kotlin features in my `bu...
# gradle
c
Hey guys! I'm using some Kotlin features in my
build.gradle.kts
that are experimental and require a
RequiresOptIn
annotation like
@ExperimentalPathApi
. I'm using those in the build script with the
@OptIn
annotation. Problem/Issue now is a warning in the build script that I did not add the
RequiresOptIn
to the kotlin compiler options - but where do I add this compiler option for the Gradle script Kotlin compiler? An example of the issue can be seen here: https://github.com/chrimaeon/curriculumvitae/blob/03663b8ee32f3f83746536f7ac093df5a93a5953/app/build.gradle.kts#L40
👀 1
n
In this line like so
Copy code
kotlinOptions {
        freeCompilerArgs = freeCompilerArgs+=" -Xopt-in=kotlin.RequiresOptIn"
}
c
that will configure the Kotlin compile task for compiling sources but not the build script itself. I have it already in the root with the
allProjects
functions.