Files
Justin Shapcott 3d1e6eccf9 Initial commit. Here's what I did:
- Figured out which OSS RoboVM repositories are needed for libGDX
- Put them into a single repository, much easier to maintain, but
  history got destroyed in the process. Can look up history in
  original repository if necessary
- Set the groupId of all artifacts to my domain com.mobidevelop
  so I can publish to Maven Central
- Set the version to 2.0.0-SNAPSHOT so there's zero chance of
  a collision with the original RoboVM releases
- Couldn't get native bits to compile, so updated minimum iOS
  and Mac OS X versions for toolchain in vm/CMakeFileList.txt
  and OS.java until it worked.
- Apps wouldn't link due to some missing c++ symbols. Removed linking
  to libstdc++ in IOSTarget.java. Not sure if that has any detrimental
  effects but it fixed linking.
- When opening a run configuration via the IDEA plugin, it would
  crash in DeviceType.java:113. It seems that the output of some
  command line tool is being parsed, and that returns error
  messages together with the data we need. Fixed via ugly
  hack.
- Updated to the latest commit of https://github.com/robovm/bwdgc.git
  Probably fixed some GC crashes since the release in October.
- Pulled in the IDE plugins for Eclipse and IDEA, the Gradle plugin
  and the templates project. We don't need the Maven plugin and junit
  stuff for libGDX. Everything's in the plugin/ directory
- Templates: removed the templates that i couldn't get to work, namely
  the ones relying on storyboards. Seems like the OSS RoboVM couldn't
  deal with those at all.
- IDEA plugin: removed the bridge to the interface builder functionality
  otherwise the plugin would crash since we miss the artifacts for that
- IDEA plugin: removed the whole setup stuff for Android and license
  checks. The former didn't work for me at all, and the latter would crash
  because it's missing the actual code.
- IDEA plugin: removed the templates in RoboVMTemplateFactory that aren't
  working.
- IDEA plugin: The RoboVmCompileTask doesn't seem to work with that as it can't find
  the robovm.xml file needed for compilation. Fixed in RoboVmPlugin.java
  with a very ugly hack.
- IDEA plugin: there was a huge memory leak in the compiler code of the
  plugin. It retained the AppCompiler instance, which was huge. Fixed
  by nulling that out at the appropriate time
- IDEA plugin: fixed template_build.gradle to use the new groupId
- Gradle plugin: it seems the Gradle plugin was kept up-to-date with
  the latest closed source RoboVM. Had to remove a bunch of stuff, like
  TvOS functionality, as we don't have to sources for that.
- Eclipse plugin: just fixed up the poms, don't know if it works.
2016-04-20 13:15:45 -07:00

205 lines
7.7 KiB
XML
Executable File

<project name="tests-libcore" default="run" basedir="." xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<condition property="arch" value="auto">
<not><isset property="arch"/></not>
</condition>
<condition property="os" value="auto">
<not><isset property="os"/></not>
</condition>
<xmlproperty file="../../pom.xml"/>
<property name="pom.version" value="${project.version}"/>
<property name="support.src" location="support/src/test/java"/>
<property name="luni.src" location="luni/src/test/java"/>
<property name="luni.resources" location="luni/src/test/resources"/>
<property name="dom.src" location="dom/src/test/java"/>
<property name="dom.resources" location="dom/src/test/resources"/>
<property name="json.src" location="json/src/test/java"/>
<property name="json.resources" location="json/src/test/resources"/>
<property name="expectations" location="expectations"/>
<property name="harmony.src" location="harmony-tests/src/test/java"/>
<property name="crypto.src" location="crypto/src/test/java"/>
<property name="mockwebserver.src" location="external/mockwebserver/src/main/java/"/>
<property name="build" location="target/classes"/>
<property name="reports.base" location="target/reports"/>
<property name="tmp" location="${java.io.tmpdir}/robovm.tests.libcore.${os}-${arch}.tmp"/>
<property name="install" location="${java.io.tmpdir}/robovm.tests.libcore.${os}-${arch}"/>
<property name="maven-ant-tasks.version" value="2.1.3" />
<path id="maven-ant-tasks.classpath"
path="${basedir}/maven-ant-tasks-${maven-ant-tasks.version}.jar" />
<typedef resource="org/apache/maven/artifact/ant/antlib.xml"
uri="antlib:org.apache.maven.artifact.ant"
classpathref="maven-ant-tasks.classpath" />
<artifact:dependencies pathId="deps.classpath">
<dependency groupId="junit" artifactId="junit" version="4.11" scope="test"/>
</artifact:dependencies>
<property name="jarjar.version" value="1.3" />
<artifact:dependencies pathId="jarjar.classpath">
<dependency groupId="com.googlecode.jarjar" artifactId="jarjar" version="${jarjar.version}" scope="test"/>
</artifact:dependencies>
<typedef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpathref="jarjar.classpath"/>
<path id="rt.classpath">
<pathelement location="${basedir}/../../rt/target/robovm-rt-${pom.version}.jar"/>
<pathelement location="${basedir}/../../rt/target/classes"/> <!-- For unmodified (not jarjar:ed) classes -->
</path>
<target name="init">
<mkdir dir="${build}"/>
<mkdir dir="${reports.base}"/>
</target>
<target name="compile" depends="init">
<javac sourcepath="" destdir="${build}" bootclasspathref="rt.classpath" debug="true">
<classpath>
<path refid="deps.classpath"/>
</classpath>
<src path="${support.src}"/>
<src path="${luni.src}"/>
<src path="${dom.src}"/>
<src path="${json.src}"/>
<src path="${harmony.src}"/>
<src path="${crypto.src}"/>
<src path="${mockwebserver.src}"/>
<exclude name="tests/support/Support_ClassLoader.java"/>
<exclude name="dalvik/system/DexClassLoaderTest.java"/>
<exclude name="dalvik/system/PathClassLoaderTest.java"/>
<exclude name="libcore/dalvik/system/PathClassLoaderTest.java"/>
<exclude name="libcore/java/lang/reflect/ClassLoaderReflectionTest.java"/>
<exclude name="libcore/java/lang/reflect/MissingClassesTest.java"/>
<exclude name="libcore/java/lang/reflect/ProxyTest.java"/>
</javac>
<copy todir="${build}">
<fileset dir="${luni.resources}">
<include name="**/*"/>
</fileset>
<fileset dir="${luni.src}">
<include name="**/*"/>
<exclude name="**/*.java"/>
</fileset>
<fileset dir="${support.src}">
<include name="**/*"/>
<exclude name="**/*.java"/>
</fileset>
<fileset dir="${dom.resources}">
<include name="**/*"/>
</fileset>
<fileset dir="${dom.src}">
<include name="**/*"/>
<exclude name="**/*.java"/>
</fileset>
<fileset dir="${json.src}">
<include name="**/*"/>
<exclude name="**/*.java"/>
</fileset>
<fileset dir="${harmony.src}">
<include name="**/*"/>
<exclude name="**/*.java"/>
</fileset>
</copy>
<!-- Use jarjar to change the package name org.conscrypt to com.android.org.conscrypt and save the result to target/jarjar.jar -->
<jarjar jarfile="${basedir}/target/jarjar.jar">
<fileset dir="${build}">
<include name="org/conscrypt/**"/>
</fileset>
<rule pattern="org.conscrypt.**" result="com.android.@0"/>
</jarjar>
<!-- Explode the jarjar jar to target/classes -->
<unzip src="${basedir}/target/jarjar.jar" dest="${build}">
<patternset>
<exclude name="META-INF/**" />
<exclude name="org/conscrypt/**" />
</patternset>
</unzip>
<!-- Delete the classes in org.conscrypt.** -->
<delete dir="${build}/org/conscrypt"/>
<copy todir="${build}" file="${basedir}/robovm-excluded-tests"/>
<pathconvert property="all-classes" dirsep="." pathsep="${line.separator}">
<path>
<fileset dir="${build}">
<include name="**/*.class"/>
<exclude name="**/*$*.class"/>
</fileset>
</path>
<map from="${build}${file.separator}" to=""/>
<mapper type="glob" from="*.class" to="*"/>
</pathconvert>
<echo message="${all-classes}" file="${build}/all-classes.txt"/>
<property name="all-classes" value=""/>
</target>
<target name="run" depends="compile">
<path id="cp">
<path refid="deps.classpath"/>
<pathelement location="${build}"/>
</path>
<tstamp>
<format property="newtimestamp" pattern="yyyyMMddHHmmss"/>
</tstamp>
<condition property="timestamp" value="${newtimestamp}">
<not><isset property="timestamp"/></not>
</condition>
<condition property="host" value="localhost">
<not><isset property="host"/></not>
</condition>
<condition property="include" value=".*">
<not><isset property="include"/></not>
</condition>
<condition property="exclude" value=" ">
<not><isset property="exclude"/></not>
</condition>
<condition property="run-excluded" value="false">
<not><isset property="tests"/></not>
</condition>
<echo message="Running tests matching '${include}' and not matching '${exclude}'"/>
<property name="work" location="/tmp/robovm-libcore.${os}.${arch}.${timestamp}/work"/>
<mkdir dir="${work}"/>
<property name="reports.tmp" location="${work}/reports"/>
<mkdir dir="${reports.tmp}"/>
<property name="reports" location="${reports.base}.${os}.${arch}.${timestamp}"/>
<mkdir dir="${reports}"/>
<junit fork="true" jvm="${basedir}/robovm-ant-junit-runner" printsummary="true" showoutput="true" tempdir="${work}">
<env key="ROBOVM_TESTS_INCLUDE_PATTERN" value="${include}"/>
<env key="ROBOVM_TESTS_EXCLUDE_PATTERN" value="${exclude}"/>
<env key="ROBOVM_TESTS_RUN_EXCLUDED" value="${run-excluded}"/>
<classpath>
<path refid="cp"/>
</classpath>
<jvmarg line="-os ${os}"/>
<jvmarg line="-arch ${arch}"/>
<jvmarg line="-timestamp ${timestamp}"/>
<jvmarg line="-host ${host}"/>
<formatter type="xml"/>
<test name="RoboVMAllTests" todir="${reports.tmp}"/>
</junit>
<copy todir="${reports}">
<fileset dir="${reports.tmp}"/>
</copy>
<junitreport todir="${reports}">
<fileset dir="${reports}">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" styledir="${basedir}" todir="${reports}/html"/>
</junitreport>
</target>
<target name="clean">
<delete dir="${build}"/>
</target>
</project>