本文整理汇总了Java中org.gradle.api.artifacts.ResolutionStrategy类的典型用法代码示例。如果您正苦于以下问题:Java ResolutionStrategy类的具体用法?Java ResolutionStrategy怎么用?Java ResolutionStrategy使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ResolutionStrategy类属于org.gradle.api.artifacts包,在下文中一共展示了ResolutionStrategy类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: resolveArtifacts
import org.gradle.api.artifacts.ResolutionStrategy; //导入依赖的package包/类
/**
* Walks through the Gradle {@link Configuration} and initiates the build of source dependencies
*/
public void resolveArtifacts() {
if (configuration.isCanBeResolved()) {
configuration.resolutionStrategy(new Action<ResolutionStrategy>() {
@Override
public void execute(ResolutionStrategy strategy) {
strategy.eachDependency(dependencyAction);
}
});
} else {
log.warn("srcdeps: Configuration {} cannot be resolved", configuration);
}
}
示例2: failOnVersionConflict
import org.gradle.api.artifacts.ResolutionStrategy; //导入依赖的package包/类
public ResolutionStrategy failOnVersionConflict() {
mutationValidator.validateMutation(STRATEGY);
this.conflictResolution = new StrictConflictResolution();
return this;
}
示例3: eachDependency
import org.gradle.api.artifacts.ResolutionStrategy; //导入依赖的package包/类
public ResolutionStrategy eachDependency(Action<? super DependencyResolveDetails> rule) {
mutationValidator.validateMutation(STRATEGY);
dependencySubstitutions.allWithDependencyResolveDetails(rule);
return this;
}
示例4: componentSelection
import org.gradle.api.artifacts.ResolutionStrategy; //导入依赖的package包/类
public ResolutionStrategy componentSelection(Action<? super ComponentSelectionRules> action) {
action.execute(componentSelectionRules);
return this;
}
示例5: dependencySubstitution
import org.gradle.api.artifacts.ResolutionStrategy; //导入依赖的package包/类
public ResolutionStrategy dependencySubstitution(Action<? super DependencySubstitutions> action) {
action.execute(dependencySubstitutions);
return this;
}
示例6: resolutionStrategy
import org.gradle.api.artifacts.ResolutionStrategy; //导入依赖的package包/类
@Override
public Configuration resolutionStrategy(Action<? super ResolutionStrategy> action) {
action.execute(resolutionStrategy);
return this;
}
示例7: failOnVersionConflict
import org.gradle.api.artifacts.ResolutionStrategy; //导入依赖的package包/类
public ResolutionStrategy failOnVersionConflict() {
this.conflictResolution = new StrictConflictResolution();
return this;
}
示例8: eachDependency
import org.gradle.api.artifacts.ResolutionStrategy; //导入依赖的package包/类
public ResolutionStrategy eachDependency(Action<? super DependencyResolveDetails> rule) {
dependencyResolveRules.add(rule);
return this;
}