Permalink
Browse files

Add intellij-erlang to local and travis-ci builds

intellij-erlang's erlang.jar is necessary to access PSI classes
generated by intellij-erlang, but I don't want to check in their jar to
this repo, so I'll let ant get the jar.
  • Loading branch information...
1 parent ad4d58c commit f5fdbdefa5acee61cbc7ba064e8ce9d0199e5969 @KronicDeth committed Aug 10, 2015
Showing with 58 additions and 4 deletions.
  1. +9 −0 .idea/libraries/erlang.xml
  2. +1 −1 .travis.yml
  3. +1 −1 Makefile
  4. +3 −2 intellij-elixir.iml
  5. +4 −0 intellij-elixir.xml
  6. +40 −0 intellij-erlang.xml
@@ -0,0 +1,9 @@
+<component name="libraryTable">
+ <library name="erlang">
+ <CLASSES>
+ <root url="jar://$PROJECT_DIR$/cache/intellij-erlang/lib/erlang.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+</component>
View
@@ -6,6 +6,6 @@ language: elixir
before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
-install: ant -logger org.apache.tools.ant.listener.AnsiColorLogger -f intellij-elixir.xml get.idea release.intellij_elixir
+install: ant -logger org.apache.tools.ant.listener.AnsiColorLogger -f intellij-elixir.xml get.idea get.intellij-erlang release.intellij_elixir
script: ant -logger org.apache.tools.ant.listener.AnsiColorLogger -f intellij-elixir.xml test.modules
sudo: false
View
@@ -4,7 +4,7 @@ TARGET_XML=intellij-elixir.xml
all: install test build
install:
- ${ANT} -logger org.apache.tools.ant.listener.AnsiColorLogger -f ${TARGET_XML} get.idea release.intellij_elixir
+ ${ANT} -logger org.apache.tools.ant.listener.AnsiColorLogger -f ${TARGET_XML} get.idea get.intellij-erlang release.intellij_elixir
build:
${ANT} -logger org.apache.tools.ant.listener.AnsiColorLogger -f ${TARGET_XML} build.modules
View
@@ -5,10 +5,10 @@
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
- <sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/testData" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/res" type="java-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/bin" />
<excludeFolder url="file://$MODULE_DIR$/cache" />
<excludeFolder url="file://$MODULE_DIR$/dependencies" />
@@ -33,5 +33,6 @@
<orderEntry type="library" name="junit-4.11" level="project" />
<orderEntry type="module" module-name="jps-shared" />
<orderEntry type="module" module-name="jps-builder" />
+ <orderEntry type="library" scope="PROVIDED" name="erlang" level="project" />
</component>
-</module>
+</module>
View
@@ -57,6 +57,7 @@
</patternset>
<import file="${basedir}/idea.xml"/>
+ <import file="${basedir}/intellij-erlang.xml"/>
<!-- JDK definitions -->
<exec executable="elixir" outputproperty="elixir.code.lib.dir">
@@ -171,6 +172,9 @@
<include name="lib/xpp3-1.1.4-min.jar"/>
<include name="lib/xstream-1.4.3.jar"/>
</fileset>
+ <fileset dir="${intellij-erlang.cache}">
+ <include name="lib/erlang.jar"/>
+ </fileset>
<fileset dir="${basedir}/tests">
<include name="mockito-core-2.0.7-beta.jar"/>
<include name="objenesis.jar"/>
View
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project default="get.intellij-erlang" name="intellij-erlang">
+ <dirname property="intellij-erlang.basedir" file="${ant.file.intellij-erlang}"/>
+
+ <property name="intellij-erlang.output.dir" value="${intellij-erlang.basedir}/dependencies/intellij-erlang"/>
+ <property name="intellij-erlang.release" value="778"/>
+ <property name="intellij-erlang.zip" value="Erlang.${intellij-erlang.release}.zip"/>
+ <property name="intellij-erlang.cache" value="${intellij-erlang.basedir}/cache/intellij-erlang"/>
+ <property name="intellij-erlang.zip.root.basename" value="Erlang"/>
+
+ <property name="intellij-erlang.output.zip.root.dir" value="${intellij-erlang.output.dir}/${intellij-erlang.zip.root.basename}"/>
+ <available file="${intellij-erlang.output.zip.root.dir}" property="intellij-erlang.output.zip.root.available"/>
+
+ <available file="${intellij-erlang.output.dir}/${intellij-erlang.zip}" property="intellij-erlang.zip.available"/>
+
+ <target name="clean.intellij-erlang">
+ <delete quiet="true">
+ <fileset dir="${intellij-erlang.output.dir}"/>
+ <fileset dir="${intellij-erlang.cache}"/>
+ </delete>
+ </target>
+
+ <target name="get.intellij-erlang" depends="unpack.intellij-erlang.zip" description="Get intellij-erlang ${intellij-erlang.release} from Github">
+ <copy todir="${intellij-erlang.cache}">
+ <fileset dir="${intellij-erlang.output.zip.root.dir}"/>
+ </copy>
+ </target>
+
+ <target name="get.intellij-erlang.zip" description="Get intellij-erlang ${intellij-erlang.release} zip from Github" unless="intellij-erlang.zip.available">
+ <mkdir dir="${intellij-erlang.output.dir}"/>
+ <get dest="${intellij-erlang.output.dir}"
+ src="https://github.com/ignatov/intellij-erlang/releases/download/%23${intellij-erlang.release}/Erlang.${intellij-erlang.release}.zip"
+ usetimestamp="true"
+ verbose="true"/>
+ </target>
+
+ <target name="unpack.intellij-erlang.zip" depends="get.intellij-erlang.zip" description="unzip ${intellij-erlang.zip}" unless="intellij-erlang.output.zip.root.available">
+ <unzip src="${intellij-erlang.output.dir}/${intellij-erlang.zip}" dest="${intellij-erlang.output.dir}"/>
+ </target>
+</project>

0 comments on commit f5fdbde

Please sign in to comment.