本文整理汇总了Java中org.gradle.api.internal.file.FileResolver类的典型用法代码示例。如果您正苦于以下问题:Java FileResolver类的具体用法?Java FileResolver怎么用?Java FileResolver使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FileResolver类属于org.gradle.api.internal.file包,在下文中一共展示了FileResolver类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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());
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:22,代码来源:Wrapper.java
示例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);
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:18,代码来源:GccCompilerPlugin.java
示例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;
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:26,代码来源:ProjectBuilderImpl.java
示例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;
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:8,代码来源:DefaultPlayToolChain.java
示例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)
);
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:8,代码来源:BuildScopeServices.java
示例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);
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:9,代码来源:VisualStudioPlugin.java
示例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;
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:8,代码来源:DefaultMavenPomFactory.java
示例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;
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:13,代码来源:DefaultDeployerFactory.java
示例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;
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:10,代码来源:MavenPublishPlugin.java
示例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;
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:12,代码来源:MavenPlugin.java
示例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);
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:8,代码来源:JavaLibraryProjectInitDescriptor.java
示例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;
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:12,代码来源:DefaultSourceSetContainer.java
示例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);
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:14,代码来源:DefaultPlayToolProvider.java
示例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);
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:13,代码来源:PluginUsePluginServiceRegistry.java
示例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());
}
};
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:8,代码来源:PluginUsePluginServiceRegistry.java
示例16: maven
import org.gradle.api.internal.file.FileResolver; //导入依赖的package包/类
@Override
public MavenPluginRepository maven(Action<? super MavenPluginRepository> configurationAction, FileResolver fileResolver) {
AuthenticationContainer authenticationContainer = makeAuthenticationContainer(instantiator, authenticationSchemeRegistry);
AuthenticationSupportedInternal delegate = new AuthenticationSupporter(instantiator, authenticationContainer);
DefaultMavenPluginRepository mavenPluginRepository = instantiator.newInstance(
DefaultMavenPluginRepository.class, fileResolver, dependencyResolutionServicesFactory.create(), versionSelectorScheme, delegate);
configurationAction.execute(mavenPluginRepository);
return mavenPluginRepository;
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:10,代码来源:DefaultPluginRepositoryFactory.java
示例17: ivy
import org.gradle.api.internal.file.FileResolver; //导入依赖的package包/类
@Override
public IvyPluginRepository ivy(Action<? super IvyPluginRepository> configurationAction, FileResolver fileResolver) {
AuthenticationContainer authenticationContainer = makeAuthenticationContainer(instantiator, authenticationSchemeRegistry);
AuthenticationSupportedInternal delegate = new AuthenticationSupporter(instantiator, authenticationContainer);
DefaultIvyPluginRepository ivyPluginRepository = instantiator.newInstance(
DefaultIvyPluginRepository.class, fileResolver, dependencyResolutionServicesFactory.create(), versionSelectorScheme, delegate);
configurationAction.execute(ivyPluginRepository);
return ivyPluginRepository;
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:10,代码来源:DefaultPluginRepositoryFactory.java
示例18: AbstractPluginRepository
import org.gradle.api.internal.file.FileResolver; //导入依赖的package包/类
AbstractPluginRepository(
String defaultName, FileResolver fileResolver, DependencyResolutionServices dependencyResolutionServices,
VersionSelectorScheme versionSelectorScheme, AuthenticationSupportedInternal authenticationSupport) {
this.authenticationSupport = authenticationSupport;
this.fileResolver = fileResolver;
this.dependencyResolutionServices = dependencyResolutionServices;
this.versionSelectorScheme = versionSelectorScheme;
this.name = defaultName;
this.hasYieldedArtifactRepository = new AtomicBoolean(false);
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:11,代码来源:AbstractPluginRepository.java
示例19: DefaultIvyArtifactRepository
import org.gradle.api.internal.file.FileResolver; //导入依赖的package包/类
public DefaultIvyArtifactRepository(FileResolver fileResolver, RepositoryTransportFactory transportFactory,
LocallyAvailableResourceFinder<ModuleComponentArtifactMetadata> locallyAvailableResourceFinder, Instantiator instantiator,
FileStore<ModuleComponentArtifactIdentifier> artifactFileStore, AuthenticationContainer authenticationContainer,
IvyContextManager ivyContextManager) {
super(instantiator, authenticationContainer);
this.fileResolver = fileResolver;
this.transportFactory = transportFactory;
this.locallyAvailableResourceFinder = locallyAvailableResourceFinder;
this.artifactFileStore = artifactFileStore;
this.additionalPatternsLayout = new AdditionalPatternsRepositoryLayout(fileResolver);
this.layout = new GradleRepositoryLayout();
this.metaDataProvider = new MetaDataProvider();
this.instantiator = instantiator;
this.ivyContextManager = ivyContextManager;
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:16,代码来源:DefaultIvyArtifactRepository.java
示例20: DefaultMavenArtifactRepository
import org.gradle.api.internal.file.FileResolver; //导入依赖的package包/类
public DefaultMavenArtifactRepository(FileResolver fileResolver, RepositoryTransportFactory transportFactory,
LocallyAvailableResourceFinder<ModuleComponentArtifactMetadata> locallyAvailableResourceFinder,
Instantiator instantiator,
FileStore<ModuleComponentArtifactIdentifier> artifactFileStore,
MetaDataParser<MutableMavenModuleResolveMetadata> pomParser,
AuthenticationContainer authenticationContainer) {
super(instantiator, authenticationContainer);
this.fileResolver = fileResolver;
this.transportFactory = transportFactory;
this.locallyAvailableResourceFinder = locallyAvailableResourceFinder;
this.artifactFileStore = artifactFileStore;
this.pomParser = pomParser;
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:14,代码来源:DefaultMavenArtifactRepository.java
注:本文中的org.gradle.api.internal.file.FileResolver类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论