Android Extensions: Explicitly check if the Android plugin is enabled (EA-104651)
AndroidGradleOrderEnumerationHandler is defined in gradle.xml that doesn't depend on the Android plugin. So we need to additionally check if the Android plugin is installed/enabled.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||
* that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.idea.core
|
||||
|
||||
import com.intellij.facet.FacetManager
|
||||
import com.intellij.openapi.module.Module
|
||||
|
||||
fun Module.isAndroidModule(): Boolean {
|
||||
val facets = FacetManager.getInstance(this).allFacets
|
||||
return facets.any { it.javaClass.simpleName == "AndroidFacet" }
|
||||
}
|
||||
Reference in New Issue
Block a user