mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
ExtendedBuildModel now exposes the project's build directory.
Change-Id: I174de21c907ed1b3ca046cc5b9b58543c50ecc39
This commit is contained in:
committed by
Vladislav.Soroka
parent
9786fa2d20
commit
bfd4b28aba
+7
@@ -60,4 +60,11 @@ public interface ModuleExtendedModel extends Serializable {
|
||||
* @return content roots
|
||||
*/
|
||||
DomainObjectSet<? extends ExtIdeaContentRoot> getContentRoots();
|
||||
|
||||
/**
|
||||
* The build directory.
|
||||
*
|
||||
* @return the build directory.
|
||||
*/
|
||||
File getBuildDir();
|
||||
}
|
||||
|
||||
+2
-1
@@ -59,8 +59,9 @@ public class ModuleExtendedModelBuilderImpl implements ModelBuilderService {
|
||||
final String moduleName = project.getName();
|
||||
final String moduleGroup = project.getGroup().toString();
|
||||
final String moduleVersion = project.getVersion().toString();
|
||||
final File buildDir = project.getBuildDir();
|
||||
|
||||
final ModuleExtendedModelImpl moduleVersionModel = new ModuleExtendedModelImpl(moduleName, moduleGroup, moduleVersion);
|
||||
final ModuleExtendedModelImpl moduleVersionModel = new ModuleExtendedModelImpl(moduleName, moduleGroup, moduleVersion, buildDir);
|
||||
|
||||
final List<File> artifacts = new ArrayList<File>();
|
||||
for (Task task : project.getTasks()) {
|
||||
|
||||
+8
-1
@@ -33,13 +33,15 @@ public class ModuleExtendedModelImpl implements ModuleExtendedModel {
|
||||
private final String myName;
|
||||
private final String myGroup;
|
||||
private final String myVersion;
|
||||
private final File myBuildDir;
|
||||
private List<File> myArtifacts;
|
||||
private Set<ExtIdeaContentRoot> myContentRoots;
|
||||
|
||||
public ModuleExtendedModelImpl(String name, String group, String version) {
|
||||
public ModuleExtendedModelImpl(String name, String group, String version, File buildDir) {
|
||||
myName = name;
|
||||
myGroup = group;
|
||||
myVersion = version;
|
||||
myBuildDir = buildDir;
|
||||
myArtifacts = Collections.emptyList();
|
||||
myContentRoots = Collections.emptySet();
|
||||
}
|
||||
@@ -73,6 +75,11 @@ public class ModuleExtendedModelImpl implements ModuleExtendedModel {
|
||||
return ImmutableDomainObjectSet.of(myContentRoots);
|
||||
}
|
||||
|
||||
@Override
|
||||
public File getBuildDir() {
|
||||
return myBuildDir;
|
||||
}
|
||||
|
||||
public void setContentRoots(Set<ExtIdeaContentRoot> contentRoots) {
|
||||
myContentRoots = contentRoots == null ? Collections.<ExtIdeaContentRoot>emptySet() : contentRoots;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user