Gradle: introduce gradle-tooling-extensions modules with respective classpath; expose scala project configuration for ProjectDataService usage

related issues:
* IDEA-119755 Integration between IJ13 & Gradle newer than from Jan 7, 2014 is broken
* IDEA-91901 Add extension point for Gradle to add possibility to change project files on Gradle project importing
This commit is contained in:
Vladislav.Soroka
2014-02-04 15:27:37 +04:00
parent 214cf0879f
commit 30292ae1bd
5 changed files with 0 additions and 324 deletions
@@ -1,47 +0,0 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.plugins.gradle.model.internal;
import org.gradle.tooling.model.DomainObjectSet;
import org.gradle.tooling.model.internal.ImmutableDomainObjectSet;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.plugins.gradle.model.BuildScriptClasspathModel;
import org.jetbrains.plugins.gradle.model.ClasspathEntryModel;
import java.util.ArrayList;
import java.util.List;
/**
* @author Vladislav.Soroka
* @since 12/20/13
*/
public class BuildScriptClasspathModelImpl implements BuildScriptClasspathModel {
private final List<ClasspathEntryModel> myClasspathEntries;
public BuildScriptClasspathModelImpl() {
myClasspathEntries = new ArrayList<ClasspathEntryModel>();
}
@Override
public DomainObjectSet<? extends ClasspathEntryModel> getClasspath() {
return ImmutableDomainObjectSet.of(myClasspathEntries);
}
public void add(@NotNull ClasspathEntryModel classpathEntryModel) {
myClasspathEntries.add(classpathEntryModel);
}
}
@@ -1,60 +0,0 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.plugins.gradle.model.internal;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.plugins.gradle.model.ClasspathEntryModel;
import java.io.File;
import java.io.Serializable;
/**
* @author Vladislav.Soroka
* @since 12/20/13
*/
public class ClasspathEntryModelImpl implements ClasspathEntryModel, Serializable {
@NotNull
private final File classesFile;
@Nullable
private final File sourcesFile;
@Nullable
private final File javadocFile;
public ClasspathEntryModelImpl(@NotNull File classesFile, @Nullable File sourcesFile, @Nullable File javadocFile) {
this.classesFile = classesFile;
this.sourcesFile = sourcesFile;
this.javadocFile = javadocFile;
}
@NotNull
@Override
public File getClassesFile() {
return classesFile;
}
@Nullable
@Override
public File getSourcesFile() {
return sourcesFile;
}
@Nullable
@Override
public File getJavadocFile() {
return javadocFile;
}
}
@@ -1,79 +0,0 @@
/*
* Copyright 2000-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.plugins.gradle.model.internal;
import org.gradle.tooling.model.DomainObjectSet;
import org.gradle.tooling.model.internal.ImmutableDomainObjectSet;
import org.jetbrains.plugins.gradle.model.ExtIdeaContentRoot;
import org.jetbrains.plugins.gradle.model.ModuleExtendedModel;
import java.io.File;
import java.util.Collections;
import java.util.List;
import java.util.Set;
/**
* @author Vladislav.Soroka
* @since 11/8/13
*/
public class ModuleExtendedModelImpl implements ModuleExtendedModel {
private final String myName;
private final String myGroup;
private final String myVersion;
private List<File> myArtifacts;
private Set<ExtIdeaContentRoot> myContentRoots;
public ModuleExtendedModelImpl(String name, String group, String version) {
myName = name;
myGroup = group;
myVersion = version;
myArtifacts = Collections.emptyList();
myContentRoots = Collections.emptySet();
}
@Override
public String getName() {
return myName;
}
@Override
public String getGroup() {
return myGroup;
}
@Override
public String getVersion() {
return myVersion;
}
@Override
public List<File> getArtifacts() {
return myArtifacts;
}
public void setArtifacts(List<File> artifacts) {
this.myArtifacts = artifacts == null ? Collections.<File>emptyList() : artifacts;
}
@Override
public DomainObjectSet<? extends ExtIdeaContentRoot> getContentRoots() {
return ImmutableDomainObjectSet.of(myContentRoots);
}
public void setContentRoots(Set<ExtIdeaContentRoot> contentRoots) {
myContentRoots = contentRoots == null ? Collections.<ExtIdeaContentRoot>emptySet() : contentRoots;
}
}
@@ -1,52 +0,0 @@
/*
* Copyright 2000-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.plugins.gradle.model.internal;
import org.gradle.tooling.model.idea.IdeaDependency;
import org.jetbrains.plugins.gradle.model.ProjectDependenciesModel;
import java.util.List;
/**
* @author Vladislav.Soroka
* @since 11/8/13
*/
public class ProjectDependenciesModelImpl implements ProjectDependenciesModel {
private final String projectName;
private final List<IdeaDependency> myDependencies;
public ProjectDependenciesModelImpl(String projectName, List<IdeaDependency> dependencies) {
this.projectName = projectName;
myDependencies = dependencies;
}
@Override
public String getProjectName() {
return projectName;
}
@Override
public List<IdeaDependency> getDependencies() {
return myDependencies;
}
@Override
public String toString() {
return "ProjectDependenciesModelImpl{" +
"projectName='" + projectName + '\'' +
'}';
}
}
@@ -1,86 +0,0 @@
/*
* Copyright 2000-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.plugins.gradle.model.internal;
import org.jetbrains.plugins.gradle.model.WarModel;
import java.io.File;
import java.util.Map;
import java.util.Set;
/**
* @author Vladislav.Soroka
* @since 11/5/13
*/
public class WarModelImpl implements WarModel {
private final String myWebAppDirName;
private final File myWebAppDir;
private File myWebXml;
private Map<String, Set<String>> myWebRoots;
private Set<File> myClasspath;
private String myManifestContent;
public WarModelImpl(String webAppDirName, File webAppDir) {
myWebAppDirName = webAppDirName;
myWebAppDir = webAppDir;
}
@Override
public String getWebAppDirName() {
return myWebAppDirName;
}
@Override
public File getWebAppDir() {
return myWebAppDir;
}
public void setWebXml(File webXml) {
myWebXml = webXml;
}
@Override
public File getWebXml() {
return myWebXml;
}
@Override
public Map<String, Set<String>> getWebRoots() {
return myWebRoots;
}
public void setWebRoots(Map<String, Set<String>> webRoots) {
myWebRoots = webRoots;
}
public void setClasspath(Set<File> classpath) {
myClasspath = classpath;
}
@Override
public Set<File> getClasspath() {
return myClasspath;
}
public void setManifestContent(String manifestContent) {
myManifestContent = manifestContent;
}
@Override
public String getManifestContent() {
return myManifestContent;
}
}