• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java ModuleExcludeIndex类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.jetbrains.jps.indices.ModuleExcludeIndex的典型用法代码示例。如果您正苦于以下问题:Java ModuleExcludeIndex类的具体用法?Java ModuleExcludeIndex怎么用?Java ModuleExcludeIndex使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ModuleExcludeIndex类属于org.jetbrains.jps.indices包,在下文中一共展示了ModuleExcludeIndex类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: computeRootDescriptors

import org.jetbrains.jps.indices.ModuleExcludeIndex; //导入依赖的package包/类
@NotNull
@Override
public List<JavaSourceRootDescriptor> computeRootDescriptors(JpsModel model, ModuleExcludeIndex index, IgnoredFileIndex ignoredFileIndex, BuildDataPaths dataPaths) {
  List<JavaSourceRootDescriptor> roots = new ArrayList<JavaSourceRootDescriptor>();
  JavaSourceRootType type = isTests() ? JavaSourceRootType.TEST_SOURCE : JavaSourceRootType.SOURCE;
  Iterable<ExcludedJavaSourceRootProvider> excludedRootProviders = JpsServiceManager.getInstance().getExtensions(ExcludedJavaSourceRootProvider.class);
  final Set<File> moduleExcludes = new THashSet<File>(FileUtil.FILE_HASHING_STRATEGY);
  moduleExcludes.addAll(index.getModuleExcludes(myModule));

  roots_loop:
  for (JpsTypedModuleSourceRoot<JavaSourceRootProperties> sourceRoot : myModule.getSourceRoots(type)) {
    if (JpsPathUtil.isUnder(moduleExcludes, sourceRoot.getFile())) {
      continue;
    }
    for (ExcludedJavaSourceRootProvider provider : excludedRootProviders) {
      if (provider.isExcludedFromCompilation(myModule, sourceRoot)) {
        continue roots_loop;
      }
    }
    final String packagePrefix = sourceRoot.getProperties().getPackagePrefix();
    roots.add(new JavaSourceRootDescriptor(sourceRoot.getFile(), this, false, false, packagePrefix,
                                           computeRootExcludes(sourceRoot.getFile(), index)));
  }
  return roots;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:ModuleBuildTarget.java


示例2: addRoots

import org.jetbrains.jps.indices.ModuleExcludeIndex; //导入依赖的package包/类
private <R extends BuildRootDescriptor> void addRoots(BuildDataPaths dataPaths, Iterable<AdditionalRootsProviderService> rootsProviders,
                                                      BuildTarget<R> target,
                                                      JpsModel model,
                                                      ModuleExcludeIndex index,
                                                      IgnoredFileIndex ignoredFileIndex) {
  List<R> descriptors = target.computeRootDescriptors(model, index, ignoredFileIndex, dataPaths);
  for (AdditionalRootsProviderService<?> provider : rootsProviders) {
    if (provider.getTargetTypes().contains(target.getTargetType())) {
      //noinspection unchecked
      AdditionalRootsProviderService<R> providerService = (AdditionalRootsProviderService<R>)provider;
      final List<R> additionalRoots = providerService.getAdditionalRoots(target, dataPaths);
      if (!additionalRoots.isEmpty()) {
        descriptors = new ArrayList<R>(descriptors);
        descriptors.addAll(additionalRoots);
      }
    }
  }
  for (BuildRootDescriptor descriptor : descriptors) {
    registerDescriptor(descriptor);
  }
  if (descriptors instanceof ArrayList<?>) {
    ((ArrayList)descriptors).trimToSize();
  }
  myRootsByTarget.put(target, descriptors);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:BuildRootIndexImpl.java


示例3: createProjectDescriptor

import org.jetbrains.jps.indices.ModuleExcludeIndex; //导入依赖的package包/类
protected ProjectDescriptor createProjectDescriptor(final BuildLoggingManager buildLoggingManager) {
  try {
    BuildTargetRegistryImpl targetRegistry = new BuildTargetRegistryImpl(myModel);
    ModuleExcludeIndex index = new ModuleExcludeIndexImpl(myModel);
    IgnoredFileIndexImpl ignoredFileIndex = new IgnoredFileIndexImpl(myModel);
    BuildDataPaths dataPaths = new BuildDataPathsImpl(myDataStorageRoot);
    BuildRootIndexImpl buildRootIndex = new BuildRootIndexImpl(targetRegistry, myModel, index, dataPaths, ignoredFileIndex);
    BuildTargetIndexImpl targetIndex = new BuildTargetIndexImpl(targetRegistry, buildRootIndex);
    BuildTargetsState targetsState = new BuildTargetsState(dataPaths, myModel, buildRootIndex);
    ProjectTimestamps timestamps = new ProjectTimestamps(myDataStorageRoot, targetsState);
    BuildDataManager dataManager = new BuildDataManager(dataPaths, targetsState, true);
    return new ProjectDescriptor(myModel, new BuildFSState(true), timestamps, dataManager, buildLoggingManager, index, targetsState,
                                 targetIndex, buildRootIndex, ignoredFileIndex);
  }
  catch (IOException e) {
    throw new RuntimeException(e);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:JpsBuildTestCase.java


示例4: computeRootDescriptors

import org.jetbrains.jps.indices.ModuleExcludeIndex; //导入依赖的package包/类
@NotNull
@Override
public List<MyRootDescriptor> computeRootDescriptors(JpsModel model,
                                                        ModuleExcludeIndex index,
                                                        IgnoredFileIndex ignoredFileIndex,
                                                        BuildDataPaths dataPaths) {
  final JpsAndroidModuleExtension extension = AndroidJpsUtil.getExtension(myModule);
  assert extension != null;
  final List<MyRootDescriptor> result = new ArrayList<MyRootDescriptor>();

  final File manifestFile = AndroidJpsUtil.getManifestFileForCompilationPath(extension);

  if (manifestFile != null) {
    result.add(new MyRootDescriptor(this, manifestFile, false));
  }

  for (JpsAndroidModuleExtension libExtension : AndroidJpsUtil.getAllAndroidDependencies(myModule, true)) {
    final File libManifest = AndroidJpsUtil.getManifestFileForCompilationPath(libExtension);

    if (libManifest != null && libManifest.exists()) {
      result.add(new MyRootDescriptor(this, libManifest, true));
    }
  }
  return result;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:AndroidManifestMergingTarget.java


示例5: doComputeRootDescriptors

import org.jetbrains.jps.indices.ModuleExcludeIndex; //导入依赖的package包/类
@NotNull
@Override
protected List<BuildRootDescriptor> doComputeRootDescriptors(JpsModel model,
                                                             ModuleExcludeIndex index,
                                                             IgnoredFileIndex ignoredFileIndex,
                                                             BuildDataPaths dataPaths) {
  final File moduleOutputDir = ProjectPaths.getModuleOutputDir(myModule, false);

  if (moduleOutputDir != null) {
    return Collections.<BuildRootDescriptor>singletonList(
      new AndroidClassesDirBuildRootDescriptor(this, moduleOutputDir));
  }
  else {
    return Collections.emptyList();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:AndroidLibraryPackagingTarget.java


示例6: doComputeRootDescriptors

import org.jetbrains.jps.indices.ModuleExcludeIndex; //导入依赖的package包/类
@NotNull
@Override
protected List<BuildRootDescriptor> doComputeRootDescriptors(JpsModel model,
                                                             ModuleExcludeIndex index,
                                                             IgnoredFileIndex ignoredFileIndex,
                                                             BuildDataPaths dataPaths) {
  final Set<JpsLibrary> libraries = JpsJavaExtensionService.getInstance().enumerateDependencies(
    Collections.singleton(myModule)).runtimeOnly().productionOnly().getLibraries();
  final List<BuildRootDescriptor> result = new ArrayList<BuildRootDescriptor>();

  for (JpsLibrary library : libraries) {
    final Pair<File, List<File>> pair = AndroidJpsUtil.getResDirAndJarsIfAar(library);
    final List<File> jars = pair != null ? pair.getSecond() : null;

    if (jars != null) {
      for (File jar : jars) {
        result.add(new BuildRootDescriptorImpl(this, jar));
      }
    }
  }
  return result;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:AndroidAarDepsBuildTarget.java


示例7: computeRootDescriptors

import org.jetbrains.jps.indices.ModuleExcludeIndex; //导入依赖的package包/类
@NotNull
@Override
public List<GradleResourceRootDescriptor> computeRootDescriptors(JpsModel model, ModuleExcludeIndex index, IgnoredFileIndex ignoredFileIndex, BuildDataPaths dataPaths) {
  final List<GradleResourceRootDescriptor> result = new ArrayList<GradleResourceRootDescriptor>();

  GradleProjectConfiguration projectConfig = JpsGradleExtensionService.getInstance().getGradleProjectConfiguration(dataPaths);
  GradleModuleResourceConfiguration moduleConfig = projectConfig.moduleConfigurations.get(myModule.getName());
  if (moduleConfig == null) return Collections.emptyList();

  int i = 0;

  for (ResourceRootConfiguration resource : getRootConfigurations(moduleConfig)) {
    result.add(new GradleResourceRootDescriptor(this, resource, i++, moduleConfig.overwrite));
  }
  return result;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:GradleResourcesTarget.java


示例8: computeRootDescriptors

import org.jetbrains.jps.indices.ModuleExcludeIndex; //导入依赖的package包/类
@NotNull
@Override
public List<MavenResourceRootDescriptor> computeRootDescriptors(JpsModel model, ModuleExcludeIndex index, IgnoredFileIndex ignoredFileIndex, BuildDataPaths dataPaths) {
  // todo: should we honor ignored and excluded roots here?
  final List<MavenResourceRootDescriptor> result = new ArrayList<MavenResourceRootDescriptor>();

  MavenModuleResourceConfiguration moduleConfig = getModuleResourcesConfiguration(dataPaths);
  if (moduleConfig == null) return Collections.emptyList();

  int i = 0;

  for (ResourceRootConfiguration resource : getRootConfigurations(moduleConfig)) {
    result.add(new MavenResourceRootDescriptor(this, resource, i++, moduleConfig.overwrite));
  }
  return result;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:MavenResourcesTarget.java


示例9: computeRootDescriptors

import org.jetbrains.jps.indices.ModuleExcludeIndex; //导入依赖的package包/类
@NotNull
@Override
public List<JavaSourceRootDescriptor> computeRootDescriptors(JpsModel model, ModuleExcludeIndex index, IgnoredFileIndex ignoredFileIndex, BuildDataPaths dataPaths) {
  List<JavaSourceRootDescriptor> roots = new ArrayList<JavaSourceRootDescriptor>();
  JavaSourceRootType type = isTests() ? JavaSourceRootType.TEST_SOURCE : JavaSourceRootType.SOURCE;
  Iterable<ExcludedJavaSourceRootProvider> excludedRootProviders = JpsServiceManager.getInstance().getExtensions(ExcludedJavaSourceRootProvider.class);
  final Set<File> moduleExcludes = new THashSet<File>(FileUtil.FILE_HASHING_STRATEGY);
  moduleExcludes.addAll(index.getModuleExcludes(myModule));

  roots_loop:
  for (JpsTypedModuleSourceRoot<JpsSimpleElement<JavaSourceRootProperties>> sourceRoot : myModule.getSourceRoots(type)) {
    if (JpsPathUtil.isUnder(moduleExcludes, sourceRoot.getFile())) {
      continue;
    }
    for (ExcludedJavaSourceRootProvider provider : excludedRootProviders) {
      if (provider.isExcludedFromCompilation(myModule, sourceRoot)) {
        continue roots_loop;
      }
    }
    final String packagePrefix = sourceRoot.getProperties().getData().getPackagePrefix();
    roots.add(new JavaSourceRootDescriptor(sourceRoot.getFile(), this, false, false, packagePrefix,
                                           computeRootExcludes(sourceRoot.getFile(), index)));
  }
  return roots;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:26,代码来源:ModuleBuildTarget.java


示例10: computeRootDescriptors

import org.jetbrains.jps.indices.ModuleExcludeIndex; //导入依赖的package包/类
@NotNull
@Override
public List<ResourceRootDescriptor> computeRootDescriptors(JpsModel model, ModuleExcludeIndex index, IgnoredFileIndex ignoredFileIndex, BuildDataPaths dataPaths) {
  List<ResourceRootDescriptor> roots = new ArrayList<ResourceRootDescriptor>();
  JavaSourceRootType type = isTests() ? JavaSourceRootType.TEST_SOURCE : JavaSourceRootType.SOURCE;
  Iterable<ExcludedJavaSourceRootProvider> excludedRootProviders = JpsServiceManager.getInstance().getExtensions(ExcludedJavaSourceRootProvider.class);

  roots_loop:
  for (JpsTypedModuleSourceRoot<JpsSimpleElement<JavaSourceRootProperties>> sourceRoot : myModule.getSourceRoots(type)) {
    for (ExcludedJavaSourceRootProvider provider : excludedRootProviders) {
      if (provider.isExcludedFromCompilation(myModule, sourceRoot)) {
        continue roots_loop;
      }
    }
    final String packagePrefix = sourceRoot.getProperties().getData().getPackagePrefix();
    final File rootFile = sourceRoot.getFile();
    roots.add(new ResourceRootDescriptor(rootFile, this, false, packagePrefix, computeRootExcludes(rootFile, index)));
  }

  return roots;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:22,代码来源:ResourcesTarget.java


示例11: addRoots

import org.jetbrains.jps.indices.ModuleExcludeIndex; //导入依赖的package包/类
private <R extends BuildRootDescriptor> void addRoots(BuildDataPaths dataPaths, Iterable<AdditionalRootsProviderService> rootsProviders,
                                                      BuildTarget<R> target,
                                                      JpsModel model,
                                                      ModuleExcludeIndex index,
                                                      IgnoredFileIndex ignoredFileIndex) {
  List<R> descriptors = target.computeRootDescriptors(model, index, ignoredFileIndex, dataPaths);
  for (AdditionalRootsProviderService<?> provider : rootsProviders) {
    if (provider.getTargetTypes().contains(target.getTargetType())) {
      //noinspection unchecked
      AdditionalRootsProviderService<R> providerService = (AdditionalRootsProviderService<R>)provider;
      final List<R> additionalRoots = providerService.getAdditionalRoots(target, dataPaths);
      if (!additionalRoots.isEmpty()) {
        descriptors = new ArrayList<R>(descriptors);
        descriptors.addAll(additionalRoots);
      }
    }
  }
  for (BuildRootDescriptor descriptor : descriptors) {
    registerDescriptor(descriptor);
  }
  myRootsByTarget.put(target, descriptors);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:23,代码来源:BuildRootIndexImpl.java


示例12: createProjectDescriptor

import org.jetbrains.jps.indices.ModuleExcludeIndex; //导入依赖的package包/类
protected ProjectDescriptor createProjectDescriptor(final BuildLoggingManager buildLoggingManager) {
  try {
    BuildTargetIndexImpl targetIndex = new BuildTargetIndexImpl(myModel);
    ModuleExcludeIndex index = new ModuleExcludeIndexImpl(myModel);
    IgnoredFileIndexImpl ignoredFileIndex = new IgnoredFileIndexImpl(myModel);
    BuildDataPaths dataPaths = new BuildDataPathsImpl(myDataStorageRoot);
    BuildRootIndexImpl buildRootIndex = new BuildRootIndexImpl(targetIndex, myModel, index, dataPaths, ignoredFileIndex);
    BuildTargetsState targetsState = new BuildTargetsState(dataPaths, myModel, buildRootIndex);
    ProjectTimestamps timestamps = new ProjectTimestamps(myDataStorageRoot, targetsState);
    BuildDataManager dataManager = new BuildDataManager(dataPaths, targetsState, true);
    return new ProjectDescriptor(myModel, new BuildFSState(true), timestamps, dataManager, buildLoggingManager, index, targetsState,
                                 targetIndex, buildRootIndex, ignoredFileIndex);
  }
  catch (IOException e) {
    throw new RuntimeException(e);
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:18,代码来源:JpsBuildTestCase.java


示例13: computeRootDescriptors

import org.jetbrains.jps.indices.ModuleExcludeIndex; //导入依赖的package包/类
@NotNull
@Override
public List<ArtifactRootDescriptor> computeRootDescriptors(JpsModel model,
                                                           ModuleExcludeIndex index,
                                                           IgnoredFileIndex ignoredFileIndex,
                                                           BuildDataPaths dataPaths) {
  ArtifactInstructionsBuilderImpl builder = new ArtifactInstructionsBuilderImpl(index, ignoredFileIndex, this, model, dataPaths);
  ArtifactInstructionsBuilderContext context = new ArtifactInstructionsBuilderContextImpl(model, dataPaths);
  String outputPath = StringUtil.notNullize(myArtifact.getOutputPath());
  final CopyToDirectoryInstructionCreator instructionCreator = new CopyToDirectoryInstructionCreator(builder, outputPath);
  LayoutElementBuildersRegistry.getInstance().generateInstructions(myArtifact, instructionCreator, context);
  return builder.getDescriptors();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:ArtifactBuildTarget.java


示例14: ArtifactInstructionsBuilderImpl

import org.jetbrains.jps.indices.ModuleExcludeIndex; //导入依赖的package包/类
public ArtifactInstructionsBuilderImpl(@NotNull ModuleExcludeIndex rootsIndex,
                                       @NotNull IgnoredFileIndex ignoredFileIndex,
                                       @NotNull ArtifactBuildTarget target,
                                       @NotNull JpsModel model, @NotNull BuildDataPaths dataPaths) {
  myRootsIndex = rootsIndex;
  myIgnoredFileIndex = ignoredFileIndex;
  myBuildTarget = target;
  myModel = model;
  myBuildDataPaths = dataPaths;
  myJarByPath = new HashMap<String, JarInfo>();
  myDescriptors = new ArrayList<ArtifactRootDescriptor>();
  myCopyingHandlerProviders = JpsServiceManager.getInstance().getExtensions(ArtifactRootCopyingHandlerProvider.class);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:ArtifactInstructionsBuilderImpl.java


示例15: SourceFileFilterImpl

import org.jetbrains.jps.indices.ModuleExcludeIndex; //导入依赖的package包/类
private SourceFileFilterImpl(@Nullable SourceFileFilter baseFilter,
                             @NotNull ModuleExcludeIndex rootsIndex,
                             IgnoredFileIndex patterns,
                             boolean includeExcluded) {
  myBaseFilter = baseFilter;
  myRootsIndex = rootsIndex;
  myIgnoredFileIndex = patterns;
  myIncludeExcluded = includeExcluded;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:ArtifactCompilerInstructionCreatorBase.java


示例16: computeRootExcludes

import org.jetbrains.jps.indices.ModuleExcludeIndex; //导入依赖的package包/类
@NotNull
protected Set<File> computeRootExcludes(File root, ModuleExcludeIndex index) {
  final Collection<File> moduleExcludes = index.getModuleExcludes(getModule());
  if (moduleExcludes.isEmpty()) {
    return Collections.emptySet();
  }
  final Set<File> excludes = new THashSet<File>(FileUtil.FILE_HASHING_STRATEGY);
  for (File excluded : moduleExcludes) {
    if (FileUtil.isAncestor(root, excluded, true)) {
      excludes.add(excluded);
    }
  }
  return excludes;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:JVMModuleBuildTarget.java


示例17: BuildRootIndexImpl

import org.jetbrains.jps.indices.ModuleExcludeIndex; //导入依赖的package包/类
public BuildRootIndexImpl(BuildTargetRegistry targetRegistry, JpsModel model, ModuleExcludeIndex index,
                          BuildDataPaths dataPaths, final IgnoredFileIndex ignoredFileIndex) {
  myIgnoredFileIndex = ignoredFileIndex;
  myRootsByTarget = new HashMap<BuildTarget<?>, List<? extends BuildRootDescriptor>>();
  myRootToDescriptors = new THashMap<File, List<BuildRootDescriptor>>(FileUtil.FILE_HASHING_STRATEGY);
  myFileFilters = new ConcurrentHashMap<BuildRootDescriptor, FileFilter>(16, 0.75f, 1);
  final Iterable<AdditionalRootsProviderService> rootsProviders = JpsServiceManager.getInstance().getExtensions(AdditionalRootsProviderService.class);
  for (BuildTargetType<?> targetType : TargetTypeRegistry.getInstance().getTargetTypes()) {
    for (BuildTarget<?> target : targetRegistry.getAllTargets(targetType)) {
      addRoots(dataPaths, rootsProviders, target, model, index, ignoredFileIndex);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:BuildRootIndexImpl.java


示例18: ProjectDescriptor

import org.jetbrains.jps.indices.ModuleExcludeIndex; //导入依赖的package包/类
public ProjectDescriptor(JpsModel model,
                         BuildFSState fsState,
                         ProjectTimestamps timestamps,
                         BuildDataManager dataManager,
                         BuildLoggingManager loggingManager,
                         final ModuleExcludeIndex moduleExcludeIndex,
                         final BuildTargetsState targetsState,
                         final BuildTargetIndex buildTargetIndex, final BuildRootIndex buildRootIndex, IgnoredFileIndex ignoredFileIndex) {
  myModel = model;
  myIgnoredFileIndex = ignoredFileIndex;
  myProject = model.getProject();
  this.fsState = fsState;
  this.timestamps = timestamps;
  this.dataManager = dataManager;
  myBuildTargetIndex = buildTargetIndex;
  myBuildRootIndex = buildRootIndex;
  myLoggingManager = loggingManager;
  myModuleExcludeIndex = moduleExcludeIndex;
  myProjectJavaSdks = new HashSet<JpsSdk<?>>();
  myEncodingConfiguration = new CompilerEncodingConfiguration(model, buildRootIndex);
  for (JpsModule module : myProject.getModules()) {
    final JpsSdk<?> sdk = module.getSdk(JpsJavaSdkType.INSTANCE);
    if (sdk != null && !myProjectJavaSdks.contains(sdk) && sdk.getVersionString() != null && sdk.getHomePath() != null) {
      myProjectJavaSdks.add(sdk);
    }
  }
  myTargetsState = targetsState;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:ProjectDescriptor.java


示例19: computeRootDescriptors

import org.jetbrains.jps.indices.ModuleExcludeIndex; //导入依赖的package包/类
@Override
@NotNull
public List<RootDescriptor> computeRootDescriptors(JpsModel model,
                                                   ModuleExcludeIndex index,
                                                   IgnoredFileIndex ignoredFileIndex,
                                                   BuildDataPaths dataPaths) {
  return Collections.emptyList();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:AndroidGradleBuildTarget.java


示例20: computeRootDescriptors

import org.jetbrains.jps.indices.ModuleExcludeIndex; //导入依赖的package包/类
@NotNull
@Override
public List<AndroidPreDexBuildTarget.MyRootDescriptor> computeRootDescriptors(JpsModel model,
                                                        ModuleExcludeIndex index,
                                                        IgnoredFileIndex ignoredFileIndex,
                                                        BuildDataPaths dataPaths) {
  final List<AndroidPreDexBuildTarget.MyRootDescriptor> result =
    new ArrayList<AndroidPreDexBuildTarget.MyRootDescriptor>();
  final Set<JpsModule> libModules = new HashSet<JpsModule>();
  final Set<String> externalJars = new HashSet<String>();

  for (JpsModule module : myProject.getModules()) {
    final JpsAndroidModuleExtension extension = AndroidJpsUtil.getExtension(module);

    if (extension != null && !extension.isLibrary() && extension.isPreDexingEnabled()) {
      final AndroidPlatform platform = AndroidJpsUtil.getAndroidPlatform(module, null, null);

      if (platform != null) {
        fillDepsRecursively(module, libModules, externalJars, dataPaths, platform);
      }
    }
  }

  for (JpsModule libModule : libModules) {
    final File classesJarFile = new AndroidLibraryPackagingTarget(libModule).getOutputFile(dataPaths);
    result.add(new MyRootDescriptor(this, classesJarFile, libModule.getName()));
  }

  for (String externalJarPath : externalJars) {
    result.add(new MyRootDescriptor(this, new File(externalJarPath), null));
  }
  return result;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:34,代码来源:AndroidPreDexBuildTarget.java



注:本文中的org.jetbrains.jps.indices.ModuleExcludeIndex类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java RSAPublicKey类代码示例发布时间:2022-05-22
下一篇:
Java BarrelManager类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap