KotlinLeaner
09/16/2022, 1:33 PMtasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
freeCompilerArgs += [
"-Xuse-experimental=com.google.accompanist.permissions.ExperimentalPermissionsApi"
]
}
}
I tried this piece of code but it giving me error. Can anyone guide me what I am doing wrong hereKotlinLeaner
09/16/2022, 1:33 PMKotlinLeaner
09/16/2022, 1:35 PM// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
kotlin_version = '1.6.10'
accompanist_version = "0.23.1"
}
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven { url '<https://mobile-sdk.jumio.com>' }
maven { url '<https://jitpack.io>' }
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
freeCompilerArgs += [
"-Xuse-experimental=com.google.accompanist.permissions.ExperimentalPermissionsApi"
]
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Ciaran Sloan
09/16/2022, 1:35 PMOptIn
annotation to the class or function thats invoking the experimental APIKotlinLeaner
09/16/2022, 1:35 PMKotlinLeaner
09/16/2022, 1:36 PMJuliane Lehmann
09/16/2022, 1:41 PMCiaran Sloan
09/16/2022, 1:43 PM"-opt-in=com.google.accompanist.permissions.ExperimentalPermissionsApi"
KotlinLeaner
09/16/2022, 1:45 PM