Skip to content

Commit

Permalink
Merge branch 'master' of github.com:consulo/consulo-gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
VISTALL committed Aug 20, 2024
2 parents fc544ef + 6af7418 commit e5424bd
Show file tree
Hide file tree
Showing 89 changed files with 7,207 additions and 6,686 deletions.
45 changes: 45 additions & 0 deletions .consulo/runConfigurations/consulo_run_desktop_awt.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="consulo:run-desktop-awt" type="MavenRunConfiguration" factoryName="Maven" singleton="true">
<MavenSettings>
<option name="myGeneralSettings" />
<option name="myRunnerSettings">
<MavenRunnerSettings>
<option name="environmentProperties">
<map />
</option>
<option name="jreName" value="21" />
<option name="mavenProperties">
<map />
</option>
<option name="passParentEnv" value="true" />
<option name="runMavenInBackground" value="true" />
<option name="skipTests" value="false" />
<option name="vmOptions" value="--add-opens=java.desktop/sun.awt=ALL-UNNAMED --add-opens=java.desktop/sun.swing=ALL-UNNAMED --add-opens=java.desktop/sun.awt.image=ALL-UNNAMED --add-opens=java.desktop/sun.java2d=ALL-UNNAMED --add-opens=java.desktop/sun.font=ALL-UNNAMED --add-opens=java.desktop/java.awt=ALL-UNNAMED --add-opens=java.desktop/javax.swing=ALL-UNNAMED --add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED --add-opens=java.desktop/java.awt.peer=ALL-UNNAMED --add-opens=java.desktop/java.awt.event=ALL-UNNAMED" />
</MavenRunnerSettings>
</option>
<option name="myRunnerParameters">
<MavenRunnerParameters>
<option name="profiles">
<set />
</option>
<option name="goals">
<list>
<option value="consulo:run-desktop-awt" />
<option value="-pl" />
<option value=":org.jetbrains.plugins.gradle" />
</list>
</option>
<option name="profilesMap">
<map />
</option>
<option name="resolveToWorkspace" value="true" />
<option name="workingDirPath" value="$PROJECT_DIR$" />
</MavenRunnerParameters>
</option>
</MavenSettings>
<ConfigurationWrapper RunnerId="Debug" />
<method>
<option name="Maven.BeforeRunTask" enabled="true" file="$PROJECT_DIR$/pom.xml" goal="package" />
</method>
</configuration>
</component>
25 changes: 25 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: jdk21

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

env:
BUILD_NUMBER: 999999

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 21
uses: actions/setup-java@v1
with:
distribution: 'temurin'
java-version: 21
- name: Build with Maven
run: mvn -U -T 1C -Dmaven.javadoc.skip=true -B -V clean package
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/.consulo
!/.consulo/codeStyleSettings.xml
!/.consulo/runConfigurations
/out
/dep
.consulo/
target/
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import consulo.externalSystem.service.project.ProjectData;
import consulo.process.ExecutionException;
import consulo.process.cmd.SimpleJavaParameters;
import consulo.util.lang.Pair;
import consulo.util.lang.Couple;
import org.gradle.tooling.model.idea.IdeaModule;
import org.gradle.tooling.model.idea.IdeaProject;

Expand All @@ -40,139 +40,147 @@
* {@link AbstractProjectResolverExtension} provides dummy implementation of Gradle project resolver.
*
* @author Vladislav.Soroka
* @since 10/14/13
* @since 2013-10-14
*/
public abstract class AbstractProjectResolverExtension implements GradleProjectResolverExtension {

@Nonnull
protected ProjectResolverContext resolverCtx;
@Nonnull
protected GradleProjectResolverExtension nextResolver;

@Override
public void setProjectResolverContext(@Nonnull ProjectResolverContext projectResolverContext) {
resolverCtx = projectResolverContext;
}

@Override
public void setNext(@Nonnull GradleProjectResolverExtension next) {
// there always should be at least gradle basic resolver further in the chain
//noinspection ConstantConditions
assert next != null;
nextResolver = next;
}

@Nullable
@Override
public GradleProjectResolverExtension getNext() {
return nextResolver;
}

@Nonnull
@Override
public ProjectData createProject() {
return nextResolver.createProject();
}

@Nonnull
@Override
public JavaProjectData createJavaProjectData() {
return nextResolver.createJavaProjectData();
}

@Override
public void populateProjectExtraModels(@Nonnull IdeaProject gradleProject, @Nonnull DataNode<ProjectData> ideProject) {
nextResolver.populateProjectExtraModels(gradleProject, ideProject);
}

@Nonnull
@Override
public ModuleData createModule(@Nonnull IdeaModule gradleModule, @Nonnull ProjectData projectData) {
return nextResolver.createModule(gradleModule, projectData);
}

@Override
public void populateModuleExtraModels(@Nonnull IdeaModule gradleModule, @Nonnull DataNode<ModuleData> ideModule) {
nextResolver.populateModuleExtraModels(gradleModule, ideModule);
}

@Override
public void populateModuleContentRoots(@Nonnull IdeaModule gradleModule, @Nonnull DataNode<ModuleData> ideModule) {
nextResolver.populateModuleContentRoots(gradleModule, ideModule);
}


@Override
public void populateModuleCompileOutputSettings(@Nonnull IdeaModule gradleModule, @Nonnull DataNode<ModuleData> ideModule) {
nextResolver.populateModuleCompileOutputSettings(gradleModule, ideModule);
}

@Override
public void populateModuleDependencies(@Nonnull IdeaModule gradleModule, @Nonnull DataNode<ModuleData> ideModule,
@Nonnull DataNode<ProjectData> ideProject) {
nextResolver.populateModuleDependencies(gradleModule, ideModule, ideProject);
}

@Nonnull
@Override
public Collection<TaskData> populateModuleTasks(@Nonnull IdeaModule gradleModule, @Nonnull DataNode<ModuleData> ideModule,
@Nonnull DataNode<ProjectData> ideProject) throws IllegalArgumentException, IllegalStateException {
return nextResolver.populateModuleTasks(gradleModule, ideModule, ideProject);
}

@Nonnull
@Override
public Collection<TaskData> filterRootProjectTasks(@Nonnull List<TaskData> allTasks) {
return nextResolver.filterRootProjectTasks(allTasks);
}

@Nonnull
@Override
public Set<Class> getExtraProjectModelClasses() {
return Collections.emptySet();
}

@Nonnull
@Override
public Set<Class> getToolingExtensionsClasses() {
return Collections.emptySet();
}

@Nonnull
@Override
public List<Pair<String, String>> getExtraJvmArgs() {
return Collections.emptyList();
}

@Nonnull
@Override
public List<String> getExtraCommandLineArgs() {
return Collections.emptyList();
}

@Nonnull
@Override
public ExternalSystemException getUserFriendlyError(@Nonnull Throwable error,
@Nonnull String projectPath,
@Nullable String buildFilePath) {
return nextResolver.getUserFriendlyError(error, projectPath, buildFilePath);
}

@Override
public void enhanceRemoteProcessing(@Nonnull SimpleJavaParameters parameters) throws ExecutionException {
}

@Override
public void enhanceLocalProcessing(@Nonnull List<URL> urls) {
}

@Override
public void preImportCheck() {
}

@Override
public void enhanceTaskProcessing(@Nonnull List<String> taskNames,
@Nullable String debuggerSetup,
@Nonnull Consumer<String> initScriptConsumer) {
}
@Nonnull
protected ProjectResolverContext resolverCtx;
@Nonnull
protected GradleProjectResolverExtension nextResolver;

@Override
public void setProjectResolverContext(@Nonnull ProjectResolverContext projectResolverContext) {
resolverCtx = projectResolverContext;
}

@Override
public void setNext(@Nonnull GradleProjectResolverExtension next) {
// there always should be at least gradle basic resolver further in the chain
//noinspection ConstantConditions
assert next != null;
nextResolver = next;
}

@Nullable
@Override
public GradleProjectResolverExtension getNext() {
return nextResolver;
}

@Nonnull
@Override
public ProjectData createProject() {
return nextResolver.createProject();
}

@Nonnull
@Override
public JavaProjectData createJavaProjectData() {
return nextResolver.createJavaProjectData();
}

@Override
public void populateProjectExtraModels(@Nonnull IdeaProject gradleProject, @Nonnull DataNode<ProjectData> ideProject) {
nextResolver.populateProjectExtraModels(gradleProject, ideProject);
}

@Nonnull
@Override
public ModuleData createModule(@Nonnull IdeaModule gradleModule, @Nonnull ProjectData projectData) {
return nextResolver.createModule(gradleModule, projectData);
}

@Override
public void populateModuleExtraModels(@Nonnull IdeaModule gradleModule, @Nonnull DataNode<ModuleData> ideModule) {
nextResolver.populateModuleExtraModels(gradleModule, ideModule);
}

@Override
public void populateModuleContentRoots(@Nonnull IdeaModule gradleModule, @Nonnull DataNode<ModuleData> ideModule) {
nextResolver.populateModuleContentRoots(gradleModule, ideModule);
}


@Override
public void populateModuleCompileOutputSettings(@Nonnull IdeaModule gradleModule, @Nonnull DataNode<ModuleData> ideModule) {
nextResolver.populateModuleCompileOutputSettings(gradleModule, ideModule);
}

@Override
public void populateModuleDependencies(
@Nonnull IdeaModule gradleModule, @Nonnull DataNode<ModuleData> ideModule,
@Nonnull DataNode<ProjectData> ideProject
) {
nextResolver.populateModuleDependencies(gradleModule, ideModule, ideProject);
}

@Nonnull
@Override
public Collection<TaskData> populateModuleTasks(
@Nonnull IdeaModule gradleModule, @Nonnull DataNode<ModuleData> ideModule,
@Nonnull DataNode<ProjectData> ideProject
) throws IllegalArgumentException, IllegalStateException {
return nextResolver.populateModuleTasks(gradleModule, ideModule, ideProject);
}

@Nonnull
@Override
public Collection<TaskData> filterRootProjectTasks(@Nonnull List<TaskData> allTasks) {
return nextResolver.filterRootProjectTasks(allTasks);
}

@Nonnull
@Override
public Set<Class> getExtraProjectModelClasses() {
return Collections.emptySet();
}

@Nonnull
@Override
public Set<Class> getToolingExtensionsClasses() {
return Collections.emptySet();
}

@Nonnull
@Override
public List<Couple<String>> getExtraJvmArgs() {
return Collections.emptyList();
}

@Nonnull
@Override
public List<String> getExtraCommandLineArgs() {
return Collections.emptyList();
}

@Nonnull
@Override
public ExternalSystemException getUserFriendlyError(
@Nonnull Throwable error,
@Nonnull String projectPath,
@Nullable String buildFilePath
) {
return nextResolver.getUserFriendlyError(error, projectPath, buildFilePath);
}

@Override
public void enhanceRemoteProcessing(@Nonnull SimpleJavaParameters parameters) throws ExecutionException {
}

@Override
public void enhanceLocalProcessing(@Nonnull List<URL> urls) {
}

@Override
public void preImportCheck() {
}

@Override
public void enhanceTaskProcessing(
@Nonnull List<String> taskNames,
@Nullable String debuggerSetup,
@Nonnull Consumer<String> initScriptConsumer
) {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import consulo.externalSystem.rt.model.ExternalSystemException;
import consulo.externalSystem.service.ParametersEnhancer;
import consulo.externalSystem.service.project.ProjectData;
import consulo.util.lang.Pair;
import consulo.util.lang.Couple;
import org.gradle.tooling.model.idea.IdeaModule;
import org.gradle.tooling.model.idea.IdeaProject;

Expand Down Expand Up @@ -111,7 +111,7 @@ Collection<TaskData> populateModuleTasks(@Nonnull IdeaModule gradleModule, @Nonn
Set<Class> getToolingExtensionsClasses();

@Nonnull
List<Pair<String, String>> getExtraJvmArgs();
List<Couple<String>> getExtraJvmArgs();

@Nonnull
List<String> getExtraCommandLineArgs();
Expand Down
Loading

0 comments on commit e5424bd

Please sign in to comment.