本文整理汇总了Java中org.gradle.api.internal.file.FileResolver类的典型用法代码示例。如果您正苦于以下问题:Java FileResolver类的具体用法?Java FileResolver怎么用?Java FileResolver使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FileResolver类属于org.gradle.api.internal.file包,在下文中一共展示了FileResolver类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: generate
import org.gradle.api.internal.file.FileResolver; //导入依赖的package包/类
@TaskAction
void generate() {
File jarFileDestination = getJarFile();
File unixScript = getScriptFile();
FileResolver resolver = getFileLookup().getFileResolver(unixScript.getParentFile());
String jarFileRelativePath = resolver.resolveAsRelativePath(jarFileDestination);
writeProperties(getPropertiesFile());
writeWrapperTo(jarFileDestination);
StartScriptGenerator generator = new StartScriptGenerator();
generator.setApplicationName("Gradle");
generator.setMainClassName(GradleWrapperMain.class.getName());
generator.setClasspath(WrapUtil.toList(jarFileRelativePath));
generator.setOptsEnvironmentVar("GRADLE_OPTS");
generator.setExitEnvironmentVar("GRADLE_EXIT_CONSOLE");
generator.setAppNameSystemProperty("org.gradle.appname");
generator.setScriptRelPath(unixScript.getName());
generator.generateUnixScript(unixScript);
generator.generateWindowsScript(getBatchScript());
}
示例2: addToolChain
import org.gradle.api.internal.file.FileResolver; //导入依赖的package包/类
@Defaults
public static void addToolChain(NativeToolChainRegistryInternal toolChainRegistry, ServiceRegistry serviceRegistry) {
final FileResolver fileResolver = serviceRegistry.get(FileResolver.class);
final ExecActionFactory execActionFactory = serviceRegistry.get(ExecActionFactory.class);
final Instantiator instantiator = serviceRegistry.get(Instantiator.class);
final BuildOperationProcessor buildOperationProcessor = serviceRegistry.get(BuildOperationProcessor.class);
final CompilerMetaDataProviderFactory metaDataProviderFactory = serviceRegistry.get(CompilerMetaDataProviderFactory.class);
toolChainRegistry.registerFactory(Gcc.class, new NamedDomainObjectFactory<Gcc>() {
public Gcc create(String name) {
return instantiator.newInstance(GccToolChain.class, instantiator, name, buildOperationProcessor, OperatingSystem.current(), fileResolver, execActionFactory, metaDataProviderFactory);
}
});
toolChainRegistry.registerDefaultToolChain(GccToolChain.DEFAULT_NAME, Gcc.class);
}
示例3: createProject
import org.gradle.api.internal.file.FileResolver; //导入依赖的package包/类
public Project createProject(String name, File inputProjectDir, File gradleUserHomeDir) {
File projectDir = prepareProjectDir(inputProjectDir);
final File homeDir = new File(projectDir, "gradleHome");
StartParameter startParameter = new StartParameter();
File userHomeDir = gradleUserHomeDir == null ? new File(projectDir, "userHome") : FileUtils.canonicalize(gradleUserHomeDir);
startParameter.setGradleUserHomeDir(userHomeDir);
NativeServices.initialize(userHomeDir);
ServiceRegistry topLevelRegistry = new TestBuildScopeServices(getUserHomeServices(userHomeDir), startParameter, homeDir);
GradleInternal gradle = CLASS_GENERATOR.newInstance(DefaultGradle.class, null, startParameter, topLevelRegistry.get(ServiceRegistryFactory.class));
DefaultProjectDescriptor projectDescriptor = new DefaultProjectDescriptor(null, name, projectDir, new DefaultProjectDescriptorRegistry(),
topLevelRegistry.get(FileResolver.class));
ClassLoaderScope baseScope = gradle.getClassLoaderScope();
ClassLoaderScope rootProjectScope = baseScope.createChild("root-project");
ProjectInternal project = topLevelRegistry.get(IProjectFactory.class).createProject(projectDescriptor, null, gradle, rootProjectScope, baseScope);
gradle.setRootProject(project);
gradle.setDefaultProject(project);
return project;
}
示例4: DefaultPlayToolChain
import org.gradle.api.internal.file.FileResolver; //导入依赖的package包/类
public DefaultPlayToolChain(FileResolver fileResolver, WorkerDaemonManager compilerDaemonManager, ConfigurationContainer configurationContainer, DependencyHandler dependencyHandler, WorkerProcessFactory workerProcessBuilderFactory) {
this.fileResolver = fileResolver;
this.compilerDaemonManager = compilerDaemonManager;
this.configurationContainer = configurationContainer;
this.dependencyHandler = dependencyHandler;
this.workerProcessBuilderFactory = workerProcessBuilderFactory;
}
示例5: createScriptHandlerFactory
import org.gradle.api.internal.file.FileResolver; //导入依赖的package包/类
protected ScriptHandlerFactory createScriptHandlerFactory() {
return new DefaultScriptHandlerFactory(
get(DependencyManagementServices.class),
get(FileResolver.class),
get(DependencyMetaDataProvider.class)
);
}
示例6: visualStudio
import org.gradle.api.internal.file.FileResolver; //导入依赖的package包/类
@Model
public static VisualStudioExtensionInternal visualStudio(ServiceRegistry serviceRegistry, ProjectIdentifier projectIdentifier) {
Instantiator instantiator = serviceRegistry.get(Instantiator.class);
ProjectModelResolver projectModelResolver = serviceRegistry.get(ProjectModelResolver.class);
FileResolver fileResolver = serviceRegistry.get(FileResolver.class);
return instantiator.newInstance(DefaultVisualStudioExtension.class, projectIdentifier, instantiator, projectModelResolver, fileResolver);
}
示例7: DefaultMavenPomFactory
import org.gradle.api.internal.file.FileResolver; //导入依赖的package包/类
public DefaultMavenPomFactory(ConfigurationContainer configurationContainer, Conf2ScopeMappingContainer conf2ScopeMappingContainer, PomDependenciesConverter pomDependenciesConverter,
FileResolver fileResolver) {
this.configurationContainer = configurationContainer;
this.conf2ScopeMappingContainer = conf2ScopeMappingContainer;
this.pomDependenciesConverter = pomDependenciesConverter;
this.fileResolver = fileResolver;
}
示例8: DefaultDeployerFactory
import org.gradle.api.internal.file.FileResolver; //导入依赖的package包/类
public DefaultDeployerFactory(MavenFactory mavenFactory, Factory<LoggingManagerInternal> loggingManagerFactory, FileResolver fileResolver, MavenPomMetaInfoProvider pomMetaInfoProvider,
ConfigurationContainer configurationContainer, Conf2ScopeMappingContainer scopeMapping,
MavenSettingsProvider mavenSettingsProvider, LocalMavenRepositoryLocator mavenRepositoryLocator) {
this.mavenFactory = mavenFactory;
this.loggingManagerFactory = loggingManagerFactory;
this.fileResolver = fileResolver;
this.pomMetaInfoProvider = pomMetaInfoProvider;
this.configurationContainer = configurationContainer;
this.scopeMapping = scopeMapping;
this.mavenSettingsProvider = mavenSettingsProvider;
this.mavenRepositoryLocator = mavenRepositoryLocator;
}
示例9: MavenPublishPlugin
import org.gradle.api.internal.file.FileResolver; //导入依赖的package包/类
@Inject
public MavenPublishPlugin(Instantiator instantiator, DependencyMetaDataProvider dependencyMetaDataProvider, FileResolver fileResolver,
ProjectDependencyPublicationResolver projectDependencyResolver, FileCollectionFactory fileCollectionFactory) {
this.instantiator = instantiator;
this.dependencyMetaDataProvider = dependencyMetaDataProvider;
this.fileResolver = fileResolver;
this.projectDependencyResolver = projectDependencyResolver;
this.fileCollectionFactory = fileCollectionFactory;
}
示例10: MavenPlugin
import org.gradle.api.internal.file.FileResolver; //导入依赖的package包/类
@Inject
public MavenPlugin(Factory<LoggingManagerInternal> loggingManagerFactory, FileResolver fileResolver,
ProjectPublicationRegistry publicationRegistry, ProjectConfigurationActionContainer configurationActionContainer,
MavenSettingsProvider mavenSettingsProvider, LocalMavenRepositoryLocator mavenRepositoryLocator) {
this.loggingManagerFactory = loggingManagerFactory;
this.fileResolver = fileResolver;
this.publicationRegistry = publicationRegistry;
this.configurationActionContainer = configurationActionContainer;
this.mavenSettingsProvider = mavenSettingsProvider;
this.mavenRepositoryLocator = mavenRepositoryLocator;
}
示例11: JavaLibraryProjectInitDescriptor
import org.gradle.api.internal.file.FileResolver; //导入依赖的package包/类
public JavaLibraryProjectInitDescriptor(TemplateOperationFactory templateOperationFactory,
FileResolver fileResolver,
TemplateLibraryVersionProvider libraryVersionProvider,
ProjectInitDescriptor globalSettingsDescriptor,
DocumentationRegistry documentationRegistry) {
super(templateOperationFactory, fileResolver, libraryVersionProvider, globalSettingsDescriptor, documentationRegistry);
}
示例12: DefaultSourceSetContainer
import org.gradle.api.internal.file.FileResolver; //导入依赖的package包/类
public DefaultSourceSetContainer(FileResolver fileResolver, TaskResolver taskResolver, Instantiator classGenerator, SourceDirectorySetFactory sourceDirectorySetFactory) {
super(SourceSet.class, classGenerator, new Namer<SourceSet>() {
public String determineName(SourceSet ss) {
return ss.getName();
}
});
this.fileResolver = fileResolver;
this.taskResolver = taskResolver;
this.instantiator = classGenerator;
this.sourceDirectorySetFactory = sourceDirectorySetFactory;
}
示例13: DefaultPlayToolProvider
import org.gradle.api.internal.file.FileResolver; //导入依赖的package包/类
public DefaultPlayToolProvider(FileResolver fileResolver, WorkerDaemonManager compilerDaemonManager,
WorkerProcessFactory workerProcessBuilderFactory, PlayPlatform targetPlatform,
Set<File> twirlClasspath, Set<File> routesClasspath, Set<File> javaScriptClasspath) {
this.fileResolver = fileResolver;
this.compilerDaemonManager = compilerDaemonManager;
this.workerProcessBuilderFactory = workerProcessBuilderFactory;
this.targetPlatform = targetPlatform;
this.twirlClasspath = twirlClasspath;
this.routesClasspath = routesClasspath;
this.javaScriptClasspath = javaScriptClasspath;
// validate that the targetPlatform is valid
PlayMajorVersion.forPlatform(targetPlatform);
}
示例14: createPluginRepositoryFactory
import org.gradle.api.internal.file.FileResolver; //导入依赖的package包/类
DefaultPluginRepositoryFactory createPluginRepositoryFactory(PluginResolutionServiceResolver pluginResolutionServiceResolver, VersionSelectorScheme versionSelectorScheme,
final DependencyManagementServices dependencyManagementServices, final FileResolver fileResolver,
final DependencyMetaDataProvider dependencyMetaDataProvider, Instantiator instantiator,
final AuthenticationSchemeRegistry authenticationSchemeRegistry) {
final Factory<DependencyResolutionServices> dependencyResolutionServicesFactory = makeDependencyResolutionServicesFactory(
dependencyManagementServices, fileResolver, dependencyMetaDataProvider);
return instantiator.newInstance(
DefaultPluginRepositoryFactory.class, pluginResolutionServiceResolver,
dependencyResolutionServicesFactory, versionSelectorScheme, instantiator,
authenticationSchemeRegistry);
}
示例15: makeDependencyResolutionServicesFactory
import org.gradle.api.internal.file.FileResolver; //导入依赖的package包/类
private Factory<DependencyResolutionServices> makeDependencyResolutionServicesFactory(final DependencyManagementServices dependencyManagementServices, final FileResolver fileResolver, final DependencyMetaDataProvider dependencyMetaDataProvider) {
return new Factory<DependencyResolutionServices>() {
public DependencyResolutionServices create() {
return dependencyManagementServices.create(fileResolver, dependencyMetaDataProvider, makeUnknownProjectFinder(), new BasicDomainObjectContext());
}
};
}