本文整理匯總了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;
}