[KPM] Document IdeaKotlinProjectModelBuilder
KT-51386
This commit is contained in:
committed by
Space
parent
cf19261173
commit
edbf5c5cd8
+53
-1
@@ -22,25 +22,77 @@ internal interface IdeaKotlinProjectModelBuildingContext {
|
||||
}
|
||||
|
||||
interface IdeaKotlinProjectModelBuilder {
|
||||
|
||||
/**
|
||||
* Any [IdeaKotlinDependencyResolver] has to be registered for a given dependency resolution phase in which it participates
|
||||
* The resolution phases will be executed in the order of their enum's ordinal.
|
||||
*/
|
||||
enum class DependencyResolutionPhase {
|
||||
/**
|
||||
* Generic phase intended to run before all other resolvers
|
||||
*/
|
||||
PreDependencyResolution,
|
||||
|
||||
/**
|
||||
* Resolution phase intended to resolve project to project (source) dependencies
|
||||
*/
|
||||
SourceDependencyResolution,
|
||||
|
||||
/**
|
||||
* Resolution phase intended to resolve binary dependencies (downloading and transforming from repositories)
|
||||
*/
|
||||
BinaryDependencyResolution,
|
||||
|
||||
/**
|
||||
* Generic phase intended to run after all other resolvers.
|
||||
*/
|
||||
PostDependencyResolution
|
||||
}
|
||||
|
||||
/**
|
||||
* Any [IdeaKotlinDependencyResolver] has to be registered specifying a certain resolution level.
|
||||
* Generally, all resolvers registered in a given resolution level will work collaboratively, meaning the dependency resolution
|
||||
* result is the aggregation of all resolvers running.
|
||||
*
|
||||
* However, only the resolvers in the highest resolution result will run e.g.
|
||||
* If resolvers with level [Overwrite] are found, then only those will contribute to the dependency resolution.
|
||||
* Otherwise, all [Default] resolvers will run.
|
||||
*/
|
||||
enum class DependencyResolutionLevel {
|
||||
Default, Overwrite
|
||||
}
|
||||
|
||||
/**
|
||||
* Any [IdeaKotlinDependencyTransformer] has to be registered for a given transformation phase.
|
||||
* The phases will be executed in the order of this enums ordinal.
|
||||
*/
|
||||
enum class DependencyTransformationPhase {
|
||||
/**
|
||||
* Generic dependency transformation phase, intended to run a transformation before all other transformers.
|
||||
*/
|
||||
PreDependencyTransformationPhase,
|
||||
|
||||
/**
|
||||
* Dependency transformation phase that is free entirely free in its transformation type.
|
||||
* Note: Adding dependencies to the resolution result might most likely better be modelled as [IdeaKotlinDependencyResolver]
|
||||
*/
|
||||
FreeDependencyTransformationPhase,
|
||||
|
||||
/**
|
||||
* Special dependency transformation phase intended for filtering dependencies.
|
||||
* This phase is guaranteed to run after the [FreeDependencyTransformationPhase] alongside other dependency filtering
|
||||
* transformations. Adding filters here is the safest.
|
||||
*/
|
||||
DependencyFilteringPhase,
|
||||
|
||||
/**
|
||||
* Generic dependency transformation phase, intended to run a transformation after all other transformers
|
||||
*/
|
||||
PostDependencyTransformationPhase
|
||||
}
|
||||
|
||||
/**
|
||||
* Used for scoping [IdeaKotlinDependencyResolver], [IdeaKotlinDependencyTransformer] and [IdeaKotlinDependencyEffect]
|
||||
*/
|
||||
fun interface FragmentConstraint {
|
||||
operator fun invoke(fragment: KotlinGradleFragment): Boolean
|
||||
|
||||
|
||||
Reference in New Issue
Block a user