HMPP: import flag indicating that the project uses HMPP feature
This commit is contained in:
@@ -128,6 +128,7 @@ interface KotlinTarget : Serializable {
|
||||
|
||||
interface ExtraFeatures : Serializable {
|
||||
val coroutinesState: String?
|
||||
val isHMPPEnabled: Boolean
|
||||
}
|
||||
|
||||
interface KotlinMPPGradleModel : Serializable {
|
||||
|
||||
@@ -52,7 +52,7 @@ class KotlinMPPGradleModelBuilder : ModelBuilderService {
|
||||
val coroutinesState = getCoroutinesState(project)
|
||||
reportUnresolvedDependencies(targets)
|
||||
val kotlinNativeHome = KotlinNativeHomeEvaluator.getKotlinNativeHome(project) ?: NO_KOTLIN_NATIVE_HOME
|
||||
return KotlinMPPGradleModelImpl(sourceSetMap, targets, ExtraFeaturesImpl(coroutinesState), kotlinNativeHome)
|
||||
return KotlinMPPGradleModelImpl(sourceSetMap, targets, ExtraFeaturesImpl(coroutinesState, isHMPPEnabled(project)), kotlinNativeHome)
|
||||
}
|
||||
|
||||
private fun isHMPPEnabled(project: Project): Boolean {
|
||||
|
||||
@@ -147,7 +147,8 @@ data class KotlinTargetImpl(
|
||||
}
|
||||
|
||||
data class ExtraFeaturesImpl(
|
||||
override val coroutinesState: String?
|
||||
override val coroutinesState: String?,
|
||||
override val isHMPPEnabled: Boolean
|
||||
) : ExtraFeatures
|
||||
|
||||
data class KotlinMPPGradleModelImpl(
|
||||
@@ -169,7 +170,7 @@ data class KotlinMPPGradleModelImpl(
|
||||
cloningCache[initialTarget] = it
|
||||
}
|
||||
}.toList(),
|
||||
ExtraFeaturesImpl(mppModel.extraFeatures.coroutinesState),
|
||||
ExtraFeaturesImpl(mppModel.extraFeatures.coroutinesState, mppModel.extraFeatures.isHMPPEnabled),
|
||||
mppModel.kotlinNativeHome
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user