[Gradle|Sync] cleanup: the isCompilerOutputInherited property name and field name are consistent

GitOrigin-RevId: dae2b9a27d5cb1763022a7e1dfe4c4237e3f8e6b
This commit is contained in:
Sergei Vorobyov
2024-06-18 14:39:14 +02:00
committed by intellij-monorepo-bot
parent 35313a5b67
commit 876be2a7c1
4 changed files with 16 additions and 16 deletions

View File

@@ -593,7 +593,7 @@ public class GradleSourceSetModelBuilder extends AbstractModelBuilderService {
if (sourceDirectorySet.getGradleOutputDirs().isEmpty()) {
sourceDirectorySet.setGradleOutputDirs(Collections.singleton(GradleProjectUtil.getBuildDirectory(project)));
}
sourceDirectorySet.setInheritedCompilerOutput(sourceSetResolutionContext.isIdeaInheritOutputDirs);
sourceDirectorySet.setCompilerOutputPathInherited(sourceSetResolutionContext.isIdeaInheritOutputDirs);
DefaultExternalSourceDirectorySet resourcesDirectorySet = new DefaultExternalSourceDirectorySet();
resourcesDirectorySet.setName(sourceSet.getResources().getName());
@@ -606,7 +606,7 @@ public class GradleSourceSetModelBuilder extends AbstractModelBuilderService {
if (resourcesDirectorySet.getGradleOutputDirs().isEmpty()) {
resourcesDirectorySet.setGradleOutputDirs(sourceDirectorySet.getGradleOutputDirs());
}
resourcesDirectorySet.setInheritedCompilerOutput(sourceSetResolutionContext.isIdeaInheritOutputDirs);
resourcesDirectorySet.setCompilerOutputPathInherited(sourceSetResolutionContext.isIdeaInheritOutputDirs);
DefaultExternalSourceDirectorySet generatedSourceDirectorySet = null;
Set<File> generatedSourceDirs = new LinkedHashSet<>(sourceDirectorySet.getSrcDirs());
@@ -619,7 +619,7 @@ public class GradleSourceSetModelBuilder extends AbstractModelBuilderService {
generatedSourceDirectorySet.setName("generated " + sourceDirectorySet.getName());
generatedSourceDirectorySet.setSrcDirs(generatedSourceDirs);
generatedSourceDirectorySet.setGradleOutputDirs(sourceDirectorySet.getGradleOutputDirs());
generatedSourceDirectorySet.setInheritedCompilerOutput(sourceDirectorySet.isCompilerOutputPathInherited());
generatedSourceDirectorySet.setCompilerOutputPathInherited(sourceDirectorySet.isCompilerOutputPathInherited());
}
boolean isIdeaTestSourceSet = sourceSetResolutionContext.ideaTestSourceDirs.containsAll(sourceDirectorySet.getSrcDirs());
@@ -707,7 +707,7 @@ public class GradleSourceSetModelBuilder extends AbstractModelBuilderService {
else {
testSourceDirectorySet.setOutputDir(new File(project.getProjectDir(), "out/test/classes"));
}
testSourceDirectorySet.setInheritedCompilerOutput(sourceDirectorySet.isCompilerOutputPathInherited());
testSourceDirectorySet.setCompilerOutputPathInherited(sourceDirectorySet.isCompilerOutputPathInherited());
externalSourceSet.addSource(ExternalSystemSourceType.TEST, testSourceDirectorySet);
}
@@ -729,7 +729,7 @@ public class GradleSourceSetModelBuilder extends AbstractModelBuilderService {
else {
testResourcesDirectorySet.setOutputDir(new File(project.getProjectDir(), "out/test/resources"));
}
testResourcesDirectorySet.setInheritedCompilerOutput(resourcesDirectorySet.isCompilerOutputPathInherited());
testResourcesDirectorySet.setCompilerOutputPathInherited(resourcesDirectorySet.isCompilerOutputPathInherited());
externalSourceSet.addSource(ExternalSystemSourceType.TEST_RESOURCE, testResourcesDirectorySet);
}
@@ -746,7 +746,7 @@ public class GradleSourceSetModelBuilder extends AbstractModelBuilderService {
testGeneratedDirectorySet.setSrcDirs(testGeneratedSourceDirs);
testGeneratedDirectorySet.setGradleOutputDirs(Collections.singleton(generatedSourceDirectorySet.getOutputDir()));
testGeneratedDirectorySet.setOutputDir(generatedSourceDirectorySet.getOutputDir());
testGeneratedDirectorySet.setInheritedCompilerOutput(generatedSourceDirectorySet.isCompilerOutputPathInherited());
testGeneratedDirectorySet.setCompilerOutputPathInherited(generatedSourceDirectorySet.isCompilerOutputPathInherited());
externalSourceSet.addSource(ExternalSystemSourceType.TEST_GENERATED, testGeneratedDirectorySet);
}
@@ -832,7 +832,7 @@ public class GradleSourceSetModelBuilder extends AbstractModelBuilderService {
if (sourceDirectorySet != null) {
generatedDirectorySet.setGradleOutputDirs(Collections.singleton(sourceDirectorySet.getOutputDir()));
generatedDirectorySet.setOutputDir(sourceDirectorySet.getOutputDir());
generatedDirectorySet.setInheritedCompilerOutput(sourceDirectorySet.isCompilerOutputPathInherited());
generatedDirectorySet.setCompilerOutputPathInherited(sourceDirectorySet.isCompilerOutputPathInherited());
}
externalSourceSet.addSource(generatedSourceType, generatedDirectorySet);
}

View File

@@ -19,7 +19,7 @@ public final class DefaultExternalSourceDirectorySet implements ExternalSourceDi
private final FilePatternSetImpl patterns;
private @NotNull List<DefaultExternalFilter> filters;
private boolean inheritedCompilerOutput;
private boolean isCompilerOutputInherited;
public DefaultExternalSourceDirectorySet() {
srcDirs = new HashSet<>(0);
@@ -70,7 +70,11 @@ public final class DefaultExternalSourceDirectorySet implements ExternalSourceDi
@Override
public boolean isCompilerOutputPathInherited() {
return inheritedCompilerOutput;
return isCompilerOutputInherited;
}
public void setCompilerOutputPathInherited(boolean isCompilerOutputInherited) {
this.isCompilerOutputInherited = isCompilerOutputInherited;
}
@NotNull
@@ -104,10 +108,6 @@ public final class DefaultExternalSourceDirectorySet implements ExternalSourceDi
this.patterns.setExcludes(patterns.getExcludes());
}
public void setInheritedCompilerOutput(boolean inheritedCompilerOutput) {
this.inheritedCompilerOutput = inheritedCompilerOutput;
}
@NotNull
@Override
public List<? extends ExternalFilter> getFilters() {

View File

@@ -371,7 +371,7 @@ public final class ExternalProjectSerializationService implements SerializationS
directorySet.setSrcDirs(readFileSet(reader, SOURCE_DIRECTORY_SRC_DIRS_FIELD));
directorySet.setGradleOutputDirs(readFileList(reader, SOURCE_DIRECTORY_GRADLE_OUTPUTS_FIELD));
directorySet.setOutputDir(assertNotNull(readFile(reader, SOURCE_DIRECTORY_OUTPUT_DIR_FIELD)));
directorySet.setInheritedCompilerOutput(readBoolean(reader, SOURCE_DIRECTORY_INHERIT_COMPILER_OUTPUT_FIELD));
directorySet.setCompilerOutputPathInherited(readBoolean(reader, SOURCE_DIRECTORY_INHERIT_COMPILER_OUTPUT_FIELD));
directorySet.setPatterns(readPatterns(reader));
directorySet.setFilters(readFilters(reader));
reader.stepOut();

View File

@@ -439,7 +439,7 @@ private fun createExternalSourceSet(
dirSet.outputDir = effectiveClassesDir
dirSet.srcDirs = compilation.declaredSourceSets.flatMapTo(LinkedHashSet()) { it.sourceDirs }
dirSet.gradleOutputDirs = compilation.output.classesDirs
dirSet.setInheritedCompilerOutput(false)
dirSet.isCompilerOutputPathInherited = false
}
}
if (resourcesDir != null) {
@@ -447,7 +447,7 @@ private fun createExternalSourceSet(
dirSet.outputDir = resourcesDir
dirSet.srcDirs = compilation.declaredSourceSets.flatMapTo(LinkedHashSet()) { it.resourceDirs }
dirSet.gradleOutputDirs = listOf(resourcesDir)
dirSet.setInheritedCompilerOutput(false)
dirSet.isCompilerOutputPathInherited = false
}
}