Status Update
Comments
uc...@google.com <uc...@google.com>
tn...@google.com <tn...@google.com> #2
When we moved buildFeatures to be specific per plugin (app, library, etc..) this was moved out of BaseExtension, and into the CommonExtension + specific extension. This works in Groovy but fails in kts and strangely we don't have any kts based tests for this.
tn...@google.com <tn...@google.com> #3
So actually this works fine in a normal DSL in a KTS file. It fails because you are keeping hold of the extension as its base class and trying to apply the DSL on it.
However BaseExtension does not have this method because each plugin specific extension has a custom version of it (with different subclass for BuildFeatures. So you will have to cast BaseExtension to a mode specific class to make this work.
We are working on new interfaces for the extension that should make this work better in your case, but in the mean time I can add a buildFeatures getter that will return the base version.
However BaseExtension does not have this method because each plugin specific extension has a custom version of it (with different subclass for BuildFeatures. So you will have to cast BaseExtension to a mode specific class to make this work.
We are working on new interfaces for the extension that should make this work better in your case, but in the mean time I can add a buildFeatures getter that will return the base version.
tn...@google.com <tn...@google.com> #4
I am able to set the buildFeatures via
```
if (this is com.android.build.gradle.LibraryExtension){
buildFeatures {
// Set flags
}
}
```
But the same technique does not work for AppExtension
if (this is com.android.build.gradle.AppExtension){
buildFeatures { // buildFeatures can't be found here
}
}
I am sorry I can't easily see the source code of com.android.build.gradle 4.0.0-alpha08
```
if (this is com.android.build.gradle.LibraryExtension){
buildFeatures {
// Set flags
}
}
```
But the same technique does not work for AppExtension
if (this is com.android.build.gradle.AppExtension){
buildFeatures { // buildFeatures can't be found here
}
}
I am sorry I can't easily see the source code of com.android.build.gradle 4.0.0-alpha08
al...@lyft.com <al...@lyft.com> #5
You will need to use BaseAppModuleExtension
For dynamic feature it's DynamicFeatureExtension
A future 4.0 will have a getBuildFeature() getter on BaseExtension.
For dynamic feature it's DynamicFeatureExtension
A future 4.0 will have a getBuildFeature() getter on BaseExtension.
Description
It sounds like a good generic check if Lint would verify that a given XML tag (expect `fragment` and few others) has a corresponding Class in the classpath that extends `android.view.View`.