本文整理汇总了Java中org.jetbrains.jps.incremental.ModuleBuildTarget类的典型用法代码示例。如果您正苦于以下问题:Java ModuleBuildTarget类的具体用法?Java ModuleBuildTarget怎么用?Java ModuleBuildTarget使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ModuleBuildTarget类属于org.jetbrains.jps.incremental包,在下文中一共展示了ModuleBuildTarget类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: isTargetDirty
import org.jetbrains.jps.incremental.ModuleBuildTarget; //导入依赖的package包/类
public boolean isTargetDirty(CompileContext context) {
final String currentState = getCurrentState(context);
if (!currentState.equals(myConfiguration)) {
LOG.debug(myTarget + " configuration was changed:");
LOG.debug("Old:");
LOG.debug(myConfiguration);
LOG.debug("New:");
LOG.debug(currentState);
LOG.debug(myTarget + " will be recompiled");
if (myTarget instanceof ModuleBuildTarget) {
final JpsModule module = ((ModuleBuildTarget)myTarget).getModule();
synchronized (MODULES_WITH_TARGET_CONFIG_CHANGED_KEY) {
Set<JpsModule> modules = MODULES_WITH_TARGET_CONFIG_CHANGED_KEY.get(context);
if (modules == null) {
MODULES_WITH_TARGET_CONFIG_CHANGED_KEY.set(context, modules = new THashSet<JpsModule>());
}
modules.add(module);
}
}
return true;
}
return false;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:BuildTargetConfiguration.java
示例2: getAdditionalRoots
import org.jetbrains.jps.incremental.ModuleBuildTarget; //导入依赖的package包/类
@NotNull
@Override
public List<JavaSourceRootDescriptor> getAdditionalRoots(@NotNull BuildTarget<JavaSourceRootDescriptor> target, BuildDataPaths dataPaths) {
ModuleBuildTarget buildTarget = (ModuleBuildTarget)target;
final File generatedSourcesRoot = AndroidJpsUtil.getGeneratedSourcesStorage(buildTarget.getModule(), dataPaths);
final List<JavaSourceRootDescriptor> result = new ArrayList<JavaSourceRootDescriptor>();
addRoot(result, buildTarget, new File(generatedSourcesRoot, AndroidJpsUtil.AAPT_GENERATED_SOURCE_ROOT_NAME));
addRoot(result, buildTarget, new File(generatedSourcesRoot, AndroidJpsUtil.AIDL_GENERATED_SOURCE_ROOT_NAME));
addRoot(result, buildTarget, new File(generatedSourcesRoot, AndroidJpsUtil.RENDERSCRIPT_GENERATED_SOURCE_ROOT_NAME));
addRoot(result, buildTarget, new File(generatedSourcesRoot, AndroidJpsUtil.BUILD_CONFIG_GENERATED_SOURCE_ROOT_NAME));
addRoot(result, buildTarget, AndroidJpsUtil.getCopiedSourcesStorage(buildTarget.getModule(), dataPaths));
return result;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:AndroidAdditionalRootProviderService.java
示例3: ModuleChunk
import org.jetbrains.jps.incremental.ModuleBuildTarget; //导入依赖的package包/类
public ModuleChunk(Set<ModuleBuildTarget> targets) {
boolean containsTests = false;
myTargets = targets;
myModules = new LinkedHashSet<JpsModule>();
for (ModuleBuildTarget target : targets) {
myModules.add(target.getModule());
containsTests |= target.isTests();
}
myContainsTests = containsTests;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:ModuleChunk.java
示例4: getDependencies
import org.jetbrains.jps.incremental.ModuleBuildTarget; //导入依赖的package包/类
@Override
public Collection<? extends BuildTarget<?>> getDependencies(@NotNull JpsProductionModuleOutputPackagingElement element,
TargetOutputIndex outputIndex) {
JpsModule module = element.getModuleReference().resolve();
if (module != null) {
return Collections.singletonList(new ModuleBuildTarget(module, JavaModuleBuildTargetType.PRODUCTION));
}
return Collections.emptyList();
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:LayoutElementBuildersRegistry.java
示例5: computeAllTargets
import org.jetbrains.jps.incremental.ModuleBuildTarget; //导入依赖的package包/类
@NotNull
@Override
public List<ModuleBuildTarget> computeAllTargets(@NotNull JpsModel model) {
List<JpsModule> modules = model.getProject().getModules();
List<ModuleBuildTarget> targets = new ArrayList<ModuleBuildTarget>(modules.size());
for (JpsModule module : modules) {
targets.add(new ModuleBuildTarget(module, this));
}
return targets;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:JavaModuleBuildTargetType.java
示例6: JavaSourceRootDescriptor
import org.jetbrains.jps.incremental.ModuleBuildTarget; //导入依赖的package包/类
public JavaSourceRootDescriptor(@NotNull File root,
@NotNull ModuleBuildTarget target,
boolean isGenerated,
boolean isTemp,
@NotNull String packagePrefix,
@NotNull Set<File> excludes) {
this.root = root;
this.target = target;
this.isGeneratedSources = isGenerated;
this.isTemp = isTemp;
myPackagePrefix = packagePrefix;
myExcludes = excludes;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:JavaSourceRootDescriptor.java
示例7: build
import org.jetbrains.jps.incremental.ModuleBuildTarget; //导入依赖的package包/类
/**
* It does nothing.
*
* @return {@link ExitCode#OK} if the modules to build are Gradle ones, otherwise it returns {@link ExitCode#NOTHING_DONE}.
*/
@NotNull
@Override
public ExitCode build(CompileContext context,
ModuleChunk chunk,
DirtyFilesHolder<JavaSourceRootDescriptor, ModuleBuildTarget> dirtyFilesHolder,
OutputConsumer outputConsumer) {
JpsAndroidGradleModuleExtension extension = AndroidGradleJps.getFirstExtension(chunk);
if (extension == null) {
return ExitCode.NOTHING_DONE;
}
return ExitCode.OK;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:AndroidGradleBuilder.java
示例8: computeDependencies
import org.jetbrains.jps.incremental.ModuleBuildTarget; //导入依赖的package包/类
@Override
public Collection<BuildTarget<?>> computeDependencies(final BuildTargetRegistry registry, TargetOutputIndex outputIndex) {
final List<BuildTarget<?>> result = new ArrayList<BuildTarget<?>>(3);
fillDependencies(result);
result.add(new ModuleBuildTarget(myModule, JavaModuleBuildTargetType.PRODUCTION));
final JpsAndroidModuleExtension extension = AndroidJpsUtil.getExtension(myModule);
if (extension != null && extension.isPackTestCode()) {
result.add(new ModuleBuildTarget(myModule, JavaModuleBuildTargetType.TEST));
}
return result;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:AndroidBuildTarget.java
示例9: computeDependencies
import org.jetbrains.jps.incremental.ModuleBuildTarget; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public final Collection<BuildTarget<?>> computeDependencies(
final BuildTargetRegistry buildTargetRegistry,
final TargetOutputIndex targetOutputIndex) {
final List<BuildTarget<?>> dependencies = new ArrayList<>();
dependencies.add(new ModuleBuildTarget(super.myModule, JavaModuleBuildTargetType.PRODUCTION));
dependencies.add(this.preTargetType.createTarget(super.myModule));
return dependencies;
}
开发者ID:metaborg,项目名称:spoofax-intellij,代码行数:13,代码来源:SpoofaxPostTarget.java
示例10: getSourcesToRecompile
import org.jetbrains.jps.incremental.ModuleBuildTarget; //导入依赖的package包/类
@Override
public Map<BuildRootDescriptor, Set<File>> getSourcesToRecompile(@NotNull CompileContext context, BuildTarget<?> target) {
if (target instanceof ModuleBuildTarget) {
// multiple compilation rounds are applicable to ModuleBuildTarget only
final FilesDelta lastRoundDelta = getRoundDelta(LAST_ROUND_DELTA_KEY, context);
if (lastRoundDelta != null) {
return lastRoundDelta.getSourcesToRecompile();
}
}
return super.getSourcesToRecompile(context, target);
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:12,代码来源:BuildFSState.java
示例11: getTargets
import org.jetbrains.jps.incremental.ModuleBuildTarget; //导入依赖的package包/类
public Set<ModuleBuildTarget> getTargets() {
return myTargets;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:ModuleChunk.java
示例12: representativeTarget
import org.jetbrains.jps.incremental.ModuleBuildTarget; //导入依赖的package包/类
public ModuleBuildTarget representativeTarget() {
return myTargets.iterator().next();
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:ModuleChunk.java
示例13: createTarget
import org.jetbrains.jps.incremental.ModuleBuildTarget; //导入依赖的package包/类
@Nullable
@Override
public ModuleBuildTarget createTarget(@NotNull String targetId) {
JpsModule module = myModules.get(targetId);
return module != null ? new ModuleBuildTarget(module, JavaModuleBuildTargetType.this) : null;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:JavaModuleBuildTargetType.java
示例14: getTarget
import org.jetbrains.jps.incremental.ModuleBuildTarget; //导入依赖的package包/类
@Override
public ModuleBuildTarget getTarget() {
return target;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:JavaSourceRootDescriptor.java
示例15: isDummy
import org.jetbrains.jps.incremental.ModuleBuildTarget; //导入依赖的package包/类
@Override
public boolean isDummy(@NotNull BuildTarget<?> target) {
return (target instanceof ModuleBuildTarget || target instanceof ResourcesTarget) //todo[nik] introduce method in BuildTarget instead
&& myBuildRootIndex.getTargetRoots(target, null).isEmpty();
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:BuildTargetIndexImpl.java
示例16: registerOutputDirectory
import org.jetbrains.jps.incremental.ModuleBuildTarget; //导入依赖的package包/类
@Override
public void registerOutputDirectory(@NotNull File outputDir, @NotNull Collection<String> sourcePaths) throws IOException {
LOG.assertTrue(!(myTarget instanceof ModuleBuildTarget) && !(myTarget instanceof ArtifactBuildTarget),
"'registerOutputDirectory' method cannot be used for target " + myTarget + ", it will break incremental compilation");
registerOutput(outputDir, true, sourcePaths);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:BuildOutputConsumerImpl.java
示例17: addRoot
import org.jetbrains.jps.incremental.ModuleBuildTarget; //导入依赖的package包/类
private static void addRoot(List<JavaSourceRootDescriptor> result, ModuleBuildTarget buildTarget, final File file) {
result.add(new JavaSourceRootDescriptor(file, buildTarget, true, false, "", Collections.<File>emptySet()));
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:AndroidAdditionalRootProviderService.java
示例18: representativeTarget
import org.jetbrains.jps.incremental.ModuleBuildTarget; //导入依赖的package包/类
public ModuleBuildTarget representativeTarget() {
return null;
}
开发者ID:maxifier,项目名称:mxcache,代码行数:4,代码来源:ModuleChunk.java
示例19: computeDependencies
import org.jetbrains.jps.incremental.ModuleBuildTarget; //导入依赖的package包/类
@Override
public Collection<BuildTarget<?>> computeDependencies(BuildTargetRegistry targetRegistry,
TargetOutputIndex outputIndex) {
return Collections.singleton(new ModuleBuildTarget(myModule, JavaModuleBuildTargetType.PRODUCTION));
}
开发者ID:konsoletyper,项目名称:teavm,代码行数:6,代码来源:TeaVMBuildTarget.java
注:本文中的org.jetbrains.jps.incremental.ModuleBuildTarget类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论