Skip to content

Commit cd7e9b8

Browse files
committed
Parcelable: Download Robolectric artifacts in order to use them in tests
1 parent fa88fb7 commit cd7e9b8

File tree

2 files changed

+97
-1
lines changed

2 files changed

+97
-1
lines changed

.idea/libraries/robolectric.xml

Lines changed: 59 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

update_dependencies.xml

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@
6767
idea.maven.version="${ideaVersion}"/>
6868
</target>
6969

70+
<target name="get-ivy-library">
71+
<get-maven-library prefix="org/apache/ivy" lib="ivy" version="2.4.0" target.jar.name.base="ivy" server="https://repo1.maven.org/maven2"/>
72+
</target>
73+
7074
<macrodef name="get-maven-library">
7175
<attribute name="prefix"/>
7276
<attribute name="lib"/>
@@ -93,6 +97,34 @@
9397
</sequential>
9498
</macrodef>
9599

100+
<!--
101+
This doesn't download sources, see https://issues.apache.org/jira/browse/IVY-1003.
102+
Please download sources manually if you need them.
103+
-->
104+
<macrodef name="get-maven-library-with-dependencies">
105+
<attribute name="group"/>
106+
<attribute name="artifact"/>
107+
<attribute name="version"/>
108+
<attribute name="target.dir" default="maven"/>
109+
110+
<sequential>
111+
<mkdir dir="${dependencies}/@{target.dir}"/>
112+
113+
<java classname="org.apache.ivy.Main">
114+
<arg value="-dependency"/>
115+
<arg value="@{group}"/>
116+
<arg value="@{artifact}"/>
117+
<arg value="@{version}"/>
118+
<arg value="-retrieve"/>
119+
<arg value="${dependencies}/@{target.dir}/[artifact]-[revision](-[classifier]).[ext]"/>
120+
121+
<classpath>
122+
<pathelement location="${dependencies}/ivy.jar"/>
123+
</classpath>
124+
</java>
125+
</sequential>
126+
</macrodef>
127+
96128
<macrodef name="get-ant-library">
97129
<attribute name="version"/>
98130
<attribute name="folderName"/>
@@ -154,7 +186,7 @@
154186
</jar>
155187
</target>
156188

157-
<target name="fetch-third-party" depends="make-dependency-dirs, make-native-platform-uberjar">
189+
<target name="fetch-third-party" depends="get-ivy-library, make-dependency-dirs, make-native-platform-uberjar">
158190
<antcall target="override-version"/>
159191

160192
<!-- ProGuard -->
@@ -219,6 +251,11 @@
219251
<get-maven-library prefix="org/jetbrains/uast" lib="uast-java" version="${uast.version}" target.jar.name.base="uast-java" server="${uast.server}"/>
220252
<get-maven-library prefix="org/jetbrains/uast" lib="uast-tests" version="${uast.version}" target.jar.name.base="uast-tests" server="${uast.server}"/>
221253

254+
<get-maven-library-with-dependencies
255+
group="org.robolectric"
256+
artifact="robolectric"
257+
version="3.3.2"
258+
target.dir="robolectric"/>
222259

223260
<!-- kotlinx.coroutines -->
224261
<get-maven-library prefix="org/jetbrains/kotlinx" lib="kotlinx-coroutines-core" version="${kotlinx.coroutines.version}"

0 commit comments

Comments
 (0)