From b4e88988f65031321bc04e2679dfa6a7aa924d00 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Fri, 17 Feb 2017 23:16:16 +0300 Subject: [PATCH] Build IDEA plugin via Maven --- .idea/runConfigurations/IDEA.xml | 9 + .idea/runConfigurations/JPS_repack.xml | 26 -- pom.xml | 2 + tools/idea/idea-artifacts/.gitignore | 1 + tools/idea/idea-artifacts/dep-pom.xml | 264 ++++++++++++++++++ tools/idea/idea-artifacts/pom.xml | 72 +++++ .../idea-artifacts/teavm-idea-artifacts.iml | 12 + tools/idea/jps-common/pom.xml | 108 +++---- tools/idea/jps-common/teavm-jps-common.iml | 25 +- tools/idea/jps-plugin/pom.xml | 95 +++++++ tools/idea/jps-plugin/teavm-jps-plugin.iml | 14 +- tools/idea/plugin/pom.xml | 144 ++++++++++ tools/idea/plugin/src/assembly/plugin.xml | 56 ++++ .../teavm/idea/TeaVMConfigurationStorage.java | 0 .../main/java/org/teavm/idea/TeaVMFacet.java | 0 .../teavm/idea/TeaVMFacetConfiguration.java | 0 .../java/org/teavm/idea/TeaVMFacetType.java | 0 .../org/teavm/idea/TeaVMJPSConfigurator.java | 0 .../org/teavm/idea/TeaVMJPSRemoteService.java | 11 +- .../teavm/idea/TeaVMWebAssemblyFacetType.java | 0 .../idea/debug/TeaVMDebugConfiguration.java | 0 .../debug/TeaVMDebugConfigurationType.java | 0 .../teavm/idea/debug/TeaVMDebugProcess.java | 0 .../teavm/idea/debug/TeaVMDebugRunner.java | 0 .../debug/TeaVMDebuggerEditorsProvider.java | 0 .../teavm/idea/debug/TeaVMExecutionStack.java | 0 .../debug/TeaVMLineBreakpointHandler.java | 0 .../org/teavm/idea/debug/TeaVMRunState.java | 0 .../org/teavm/idea/debug/TeaVMStackFrame.java | 0 .../teavm/idea/debug/TeaVMSuspendContext.java | 0 .../java/org/teavm/idea/debug/TeaVMValue.java | 0 .../debug/ui/TeaVMDebugSettingsEditor.java | 0 .../debug/ui/TeaVMDebugSettingsPanel.java | 0 .../teavm/idea/maven/TeaVMMavenImporter.java | 0 .../org/teavm/idea/ui/TeaVMConfigurable.java | 0 .../idea/ui/TeaVMConfigurationPanel.java | 0 .../teavm/idea/ui/TeaVMFacetEditorTab.java | 0 .../src/main/resources/META-INF/plugin.xml | 6 +- .../src/main/resources/teavm-16.png | Bin .../teavm-idea.iml} | 16 +- tools/idea/pom.xml | 50 ++++ tools/idea/teavm-idea-parent.iml | 12 + tools/idea/teavm/pom.xml | 90 ++++++ tools/idea/teavm/teavm-idea-jps-repack.iml | 47 ++++ 44 files changed, 954 insertions(+), 106 deletions(-) create mode 100644 .idea/runConfigurations/IDEA.xml delete mode 100644 .idea/runConfigurations/JPS_repack.xml create mode 100644 tools/idea/idea-artifacts/.gitignore create mode 100644 tools/idea/idea-artifacts/dep-pom.xml create mode 100644 tools/idea/idea-artifacts/pom.xml create mode 100644 tools/idea/idea-artifacts/teavm-idea-artifacts.iml create mode 100644 tools/idea/jps-plugin/pom.xml create mode 100644 tools/idea/plugin/pom.xml create mode 100644 tools/idea/plugin/src/assembly/plugin.xml rename tools/idea/{ => plugin}/src/main/java/org/teavm/idea/TeaVMConfigurationStorage.java (100%) rename tools/idea/{ => plugin}/src/main/java/org/teavm/idea/TeaVMFacet.java (100%) rename tools/idea/{ => plugin}/src/main/java/org/teavm/idea/TeaVMFacetConfiguration.java (100%) rename tools/idea/{ => plugin}/src/main/java/org/teavm/idea/TeaVMFacetType.java (100%) rename tools/idea/{ => plugin}/src/main/java/org/teavm/idea/TeaVMJPSConfigurator.java (100%) rename tools/idea/{ => plugin}/src/main/java/org/teavm/idea/TeaVMJPSRemoteService.java (93%) rename tools/idea/{ => plugin}/src/main/java/org/teavm/idea/TeaVMWebAssemblyFacetType.java (100%) rename tools/idea/{ => plugin}/src/main/java/org/teavm/idea/debug/TeaVMDebugConfiguration.java (100%) rename tools/idea/{ => plugin}/src/main/java/org/teavm/idea/debug/TeaVMDebugConfigurationType.java (100%) rename tools/idea/{ => plugin}/src/main/java/org/teavm/idea/debug/TeaVMDebugProcess.java (100%) rename tools/idea/{ => plugin}/src/main/java/org/teavm/idea/debug/TeaVMDebugRunner.java (100%) rename tools/idea/{ => plugin}/src/main/java/org/teavm/idea/debug/TeaVMDebuggerEditorsProvider.java (100%) rename tools/idea/{ => plugin}/src/main/java/org/teavm/idea/debug/TeaVMExecutionStack.java (100%) rename tools/idea/{ => plugin}/src/main/java/org/teavm/idea/debug/TeaVMLineBreakpointHandler.java (100%) rename tools/idea/{ => plugin}/src/main/java/org/teavm/idea/debug/TeaVMRunState.java (100%) rename tools/idea/{ => plugin}/src/main/java/org/teavm/idea/debug/TeaVMStackFrame.java (100%) rename tools/idea/{ => plugin}/src/main/java/org/teavm/idea/debug/TeaVMSuspendContext.java (100%) rename tools/idea/{ => plugin}/src/main/java/org/teavm/idea/debug/TeaVMValue.java (100%) rename tools/idea/{ => plugin}/src/main/java/org/teavm/idea/debug/ui/TeaVMDebugSettingsEditor.java (100%) rename tools/idea/{ => plugin}/src/main/java/org/teavm/idea/debug/ui/TeaVMDebugSettingsPanel.java (100%) rename tools/idea/{ => plugin}/src/main/java/org/teavm/idea/maven/TeaVMMavenImporter.java (100%) rename tools/idea/{ => plugin}/src/main/java/org/teavm/idea/ui/TeaVMConfigurable.java (100%) rename tools/idea/{ => plugin}/src/main/java/org/teavm/idea/ui/TeaVMConfigurationPanel.java (100%) rename tools/idea/{ => plugin}/src/main/java/org/teavm/idea/ui/TeaVMFacetEditorTab.java (100%) rename tools/idea/{ => plugin}/src/main/resources/META-INF/plugin.xml (92%) rename tools/idea/{ => plugin}/src/main/resources/teavm-16.png (100%) rename tools/idea/{teavm-idea-plugin.iml => plugin/teavm-idea.iml} (64%) create mode 100644 tools/idea/pom.xml create mode 100644 tools/idea/teavm-idea-parent.iml create mode 100644 tools/idea/teavm/pom.xml create mode 100644 tools/idea/teavm/teavm-idea-jps-repack.iml diff --git a/.idea/runConfigurations/IDEA.xml b/.idea/runConfigurations/IDEA.xml new file mode 100644 index 000000000..8c476306b --- /dev/null +++ b/.idea/runConfigurations/IDEA.xml @@ -0,0 +1,9 @@ + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations/JPS_repack.xml b/.idea/runConfigurations/JPS_repack.xml deleted file mode 100644 index b1bedeec4..000000000 --- a/.idea/runConfigurations/JPS_repack.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/pom.xml b/pom.xml index 21ef62019..a0661c59b 100644 --- a/pom.xml +++ b/pom.xml @@ -71,6 +71,7 @@ 1.7.7 2.47.2 2.6.2 + 2016.3.4 false 1 @@ -296,6 +297,7 @@ samples + tools/idea diff --git a/tools/idea/idea-artifacts/.gitignore b/tools/idea/idea-artifacts/.gitignore new file mode 100644 index 000000000..44b111e53 --- /dev/null +++ b/tools/idea/idea-artifacts/.gitignore @@ -0,0 +1 @@ +/dependencies \ No newline at end of file diff --git a/tools/idea/idea-artifacts/dep-pom.xml b/tools/idea/idea-artifacts/dep-pom.xml new file mode 100644 index 000000000..55c8e213d --- /dev/null +++ b/tools/idea/idea-artifacts/dep-pom.xml @@ -0,0 +1,264 @@ + + + + + + 4.0.0 + org.teavm + teavm-idea-dependencies + 1.0.0-SNAPSHOT + + + + idea-releases + https://www.jetbrains.com/intellij-repository/releases + + + + + + com.jetbrains.intellij.idea + ideaIC + ${idea.version} + zip + provided + + + + org.teavm + teavm-tooling + ${project.version} + + + org.slf4j + slf4j-api + + + + + org.teavm + teavm-chrome-rdp + ${project.version} + + + org.slf4j + slf4j-api + + + + + org.teavm + teavm-metaprogramming-impl + ${project.version} + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 3.0.0 + + + unpack-idea + compile + + unpack-dependencies + + + com.jetbrains.intellij.idea + ideaIC + ${basedir}/dependencies/idea + + + + + + + org.apache.maven.plugins + maven-shade-plugin + 3.0.0 + + + package + + shade + + + + + com.jetbrains.intellij.idea:ideaIC:zip:* + + + + + org.objectweb.asm + org.teavm.asm + + + org.objectweb.asm + org.teavm.asm + + + false + dependencies/teavm.jar + + + + + + + org.apache.maven.plugins + maven-install-plugin + 2.5.2 + + + teavm + + install-file + + install + + dependencies/teavm.jar + teavm + ${teavm.version} + + + + openapi + + install-file + + prepare-package + + dependencies/idea/lib/openapi.jar + openapi + + + + util + + install-file + + prepare-package + + dependencies/idea/lib/util.jar + util + + + + extensions + + install-file + + prepare-package + + dependencies/idea/lib/extensions.jar + extensions + + + + annotations + + install-file + + prepare-package + + dependencies/idea/lib/annotations.jar + annotations + + + + jdom + + install-file + + prepare-package + + dependencies/idea/lib/jdom.jar + jdom + + + + maven + + install-file + + prepare-package + + dependencies/idea/plugins/maven/lib/maven.jar + maven + + + + maven-server-api + + install-file + + prepare-package + + dependencies/idea/plugins/maven/lib/maven-server-api.jar + maven-server-api + + + + idea + + install-file + + prepare-package + + dependencies/idea/lib/idea.jar + idea + + + + jps-model + + install-file + + prepare-package + + dependencies/idea/lib/jps-model.jar + jps-model + + + + jps-builders + + install-file + + prepare-package + + dependencies/idea/lib/jps-builders.jar + jps-builders + + + + + dependencies/maven + org.teavm.idea + ${idea.version} + jar + + + + + \ No newline at end of file diff --git a/tools/idea/idea-artifacts/pom.xml b/tools/idea/idea-artifacts/pom.xml new file mode 100644 index 000000000..5b231c5c5 --- /dev/null +++ b/tools/idea/idea-artifacts/pom.xml @@ -0,0 +1,72 @@ + + + + + + org.teavm + teavm-idea-parent + 0.5.0-SNAPSHOT + ../pom.xml + + 4.0.0 + + teavm-idea-artifacts + TeaVM IDEA artifacts + pom + + + + download-dependencies + + + dependencies/teavm.jar + + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.3.2 + + + copy-dependencies + initialize + + exec + + + mvn + + -f + dep-pom.xml + install + -Didea.version=${idea.version} + -Dteavm.version=${project.version} + + + + + + + + + + \ No newline at end of file diff --git a/tools/idea/idea-artifacts/teavm-idea-artifacts.iml b/tools/idea/idea-artifacts/teavm-idea-artifacts.iml new file mode 100644 index 000000000..66b3d797e --- /dev/null +++ b/tools/idea/idea-artifacts/teavm-idea-artifacts.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/tools/idea/jps-common/pom.xml b/tools/idea/jps-common/pom.xml index 50f43b681..a50203e47 100644 --- a/tools/idea/jps-common/pom.xml +++ b/tools/idea/jps-common/pom.xml @@ -1,5 +1,7 @@ + + + + + teavm-idea-parent + org.teavm + 0.5.0-SNAPSHOT + ../pom.xml + 4.0.0 - - org.teavm - teavm - 0.5.0-SNAPSHOT - ../../.. - - pom + teavm-jps-common + TeaVM IDEA JPS common artifact - teavm-jps-repack + + ${basedir}/.. + - org.teavm - teavm-tooling - ${project.version} - - - org.slf4j - slf4j-api - - + org.teavm.idea + openapi + ${idea.version} + provided - org.teavm - teavm-chrome-rdp - ${project.version} - - - org.slf4j - slf4j-api - - + org.teavm.idea + annotations + ${idea.version} + provided - org.teavm - teavm-metaprogramming-impl + org.teavm.idea + jdom + ${idea.version} + provided + + + org.teavm.idea + util + ${idea.version} + provided + + + org.teavm.idea + jps-model + ${idea.version} + provided + + + org.teavm.idea + jps-builders + ${idea.version} + provided + + + + org.teavm.idea + teavm ${project.version} @@ -62,30 +83,13 @@ org.apache.maven.plugins - maven-shade-plugin - 2.4.3 - - - package - - shade - - - lib/teavm-all.jar - - - org.objectweb.asm - org.teavm.asm - - - org.objectweb.asm - org.teavm.asm - - - - - + maven-checkstyle-plugin + + ../../checkstyle.xml + config_loc=${basedir}/../../../ + + \ No newline at end of file diff --git a/tools/idea/jps-common/teavm-jps-common.iml b/tools/idea/jps-common/teavm-jps-common.iml index c5cba2620..d123bbdab 100644 --- a/tools/idea/jps-common/teavm-jps-common.iml +++ b/tools/idea/jps-common/teavm-jps-common.iml @@ -1,26 +1,21 @@ - - + + - + - - - - - - - - - - - - + + + + + + +