Permalink
Browse files

Merge pull request #19 from jonnyzzz/jars

More polishing of project structure and building
  • Loading branch information...
2 parents 926d1e0 + 4b2859b commit 1ead4bb5cae313a7011d05d30d491e44942547d6 @ajselvig ajselvig committed Mar 12, 2013
View
@@ -1,6 +1,3 @@
-bin/
-obj/
-_ReSharper.*
out/*
*.csproj.user
*.resharper.user
@@ -17,3 +14,6 @@ KaraDemo/bin/*
.idea/workspace.xml
kara-SNAPSHOT.zip
lib/kotlin-runtime.jar
+**/kotlin-runtime.jar
+samples/KaraDemo/bin
+
View
@@ -1,16 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AntConfiguration">
- <defaultAnt bundledAnt="true" />
- <buildFile url="file://$PROJECT_DIR$/build.xml">
- <additionalClassPath />
- <antReference projectDefault="true" />
- <customJdkName value="" />
- <maximumHeapSize value="128" />
- <maximumStackSize value="2" />
- <properties />
- <executeOn event="afterCompilation" target="jars" />
+ <buildFile url="file://$PROJECT_DIR$/build/build-artifacts.xml">
+ <antReference name="Apache Ant version 1.8.2" />
</buildFile>
+ <buildFile url="file://$PROJECT_DIR$/build/build.xml" />
</component>
</project>
@@ -1,9 +1,15 @@
<component name="ArtifactManager">
<artifact name="kara-dist">
<output-path>$PROJECT_DIR$/out/artifacts/kara_dist</output-path>
+ <properties id="ant-postprocessing">
+ <options enabled="true">
+ <file>file://$PROJECT_DIR$/build/build-artifacts.xml</file>
+ <target>kara-dist-post</target>
+ </options>
+ </properties>
<root id="root">
- <element id="file-copy" path="$PROJECT_DIR$/kara.bat" />
- <element id="file-copy" path="$PROJECT_DIR$/kara" />
+ <element id="file-copy" path="$PROJECT_DIR$/bin/kara.bat" />
+ <element id="file-copy" path="$PROJECT_DIR$/bin/kara" />
<element id="file-copy" path="$PROJECT_DIR$/README.md" />
<element id="directory" name="lib">
<element id="library" level="project" name="javax.servlet-3.0.0.v201112011016" />
View
@@ -6,7 +6,6 @@
<module fileurl="file://$PROJECT_DIR$/src/KaraExec/KaraExec.iml" filepath="$PROJECT_DIR$/src/KaraExec/KaraExec.iml" />
<module fileurl="file://$PROJECT_DIR$/src/KaraLib/KaraLib.iml" filepath="$PROJECT_DIR$/src/KaraLib/KaraLib.iml" />
<module fileurl="file://$PROJECT_DIR$/src/KaraTests/KaraTests.iml" filepath="$PROJECT_DIR$/src/KaraTests/KaraTests.iml" />
- <module fileurl="file://$PROJECT_DIR$/kara.iml" filepath="$PROJECT_DIR$/kara.iml" />
</modules>
</component>
</project>
View
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
- <mapping directory="" vcs="" />
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
View
0 kara → bin/kara 100755 → 100644
File renamed without changes.
View
28 kara.bat → bin/kara.bat 100755 → 100644
@@ -1,14 +1,14 @@
-@echo off
-setLocal EnableDelayedExpansion
-
-set kara_home=%~dp0
-
-set jars=%kara_home%lib\*.jar
-
-for %%j in (%jars%) do (
- set cp_jars=%%j;!cp_jars!
-)
-
-set cp_jars=!cp_jars!
-
-java -DKARA_HOME=%kara_home% -classpath %cp_jars% kara.KaraPackage %*
+@echo off
+setLocal EnableDelayedExpansion
+
+set kara_home=%~dp0
+
+set jars=%kara_home%lib\*.jar
+
+for %%j in (%jars%) do (
+ set cp_jars=%%j;!cp_jars!
+)
+
+set cp_jars=!cp_jars!
+
+java -DKARA_HOME=%kara_home% -classpath %cp_jars% kara.KaraPackage %*
View
@@ -0,0 +1,25 @@
+<project name="kara artifacts hook">
+ <!-- this build file is called by IDEA as artifact post target -->
+
+ <tstamp>
+ <format property="snapshot" pattern="yyyy-dd-MM-HH-mm-ss"/>
+ </tstamp>
+
+ <!-- this would only work if no property was set from outside -->
+ <property name="build.number" value="snapshot-${snapshot}"/>
+ <property name="home" value="${artifact.output.path}"/>
+
+ <target name="kara-dist-post" depends="create-build-number-file, fix-crlf"/>
+
+ <target name="fix-crlf">
+ <!-- this is highly necessary to avoid issues in windows/unix builds -->
+ <fixcrlf srcdir="${home}" includes="kara" eol="lf" eof="remove"/>
+ <fixcrlf srcdir="${home}" includes="kara.bat" eol="crlf" eof="remove"/>
+ </target>
+
+ <target name="create-build-number-file">
+ <echo file="${home}/BUILD">build ${build.number} on ${snapshot}</echo>
+ </target>
+
+
+</project>
File renamed without changes.
File renamed without changes.
View
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="JAVA_MODULE" version="4">
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$" />
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="library" name="KotlinRuntime" level="project" />
- </component>
-</module>
-

0 comments on commit 1ead4bb

Please sign in to comment.