I am new to Gradle, and I'm trying to port my android groovy build script to kts.
I have a working build, however Android studio is complaining (all over the place) about my syntax.
For example:
defaultConfig: 'defaultConfig(kotlin.jvm.functions.Function1<? super com.android.build.api.dsl.ApplicationDefaultConfig,kotlin.Unit>)' is marked unstable with @Incubating
'setApplicationId(java.lang.String)' is declared in unstable 'com.android.build.api.dsl.ApplicationBaseFlavor' marked with @Incubating
this goes on & on. When I look at the documentation, I can see that it is incubating, but it doesn't say what to replace with it, etc.
android {
compileSdk = 31
defaultConfig {
applicationId = "myappId"
minSdk = 21
targetSdk = 31
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
Should I just ignore these warnings? If so why are they warnings?
I just opened the project, on another machine and do not see the warning. The machine is running the exact same version of Android Studio:
- JVM
- Kotlin
- Gradle
When i click on something like the defaultConfig and navigate to the source, i see that it comes from exact same module. And it is marked as @Incubating.
I also checked the settings>Editor>Inspections and they both have the same settings.