Gradle: workaround the problem that getVariantDataManager is internal
This commit is contained in:
+2
-1
@@ -326,7 +326,8 @@ open class KotlinAndroidPlugin @Inject constructor(val scriptHandler: ScriptHand
|
||||
val plugin = (project.getPlugins().findPlugin("android")
|
||||
?: project.getPlugins().findPlugin("android-library")) as BasePlugin
|
||||
|
||||
processVariantData(plugin.getVariantManager().getVariantDataList(), project,
|
||||
val variantManager = AndroidGradleWrapper.getVariantDataManager(plugin)
|
||||
processVariantData(variantManager.getVariantDataList(), project,
|
||||
ext, plugin, aptConfigurations)
|
||||
}
|
||||
}
|
||||
|
||||
+5
@@ -5,6 +5,7 @@ import com.android.build.gradle.BasePlugin
|
||||
import com.android.build.gradle.api.ApkVariant
|
||||
import com.android.build.gradle.api.BaseVariant
|
||||
import com.android.build.gradle.api.TestVariant
|
||||
import com.android.build.gradle.internal.VariantManager
|
||||
import org.gradle.api.internal.DefaultDomainObjectSet
|
||||
import org.gradle.api.tasks.compile.AbstractCompile
|
||||
import org.gradle.api.tasks.util.PatternFilterable
|
||||
@@ -87,4 +88,8 @@ class AndroidGradleWrapper {
|
||||
}
|
||||
return list
|
||||
}
|
||||
|
||||
static def VariantManager getVariantDataManager(BasePlugin plugin) {
|
||||
return plugin.getVariantManager()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user