Skip to content

Commit 65a4698

Browse files
committed
[fix][Intellij] Intellij now correctly builds jars and tests with all the new libraries
1 parent 3f20177 commit 65a4698

File tree

7 files changed

+240
-40
lines changed

7 files changed

+240
-40
lines changed

.idea/artifacts/openrocket_jar.xml

+10-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/Openrocket_UI_Jar.xml

+1-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/OpenRocket Core.iml

+139-6
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
</component>
2626
<component name="NewModuleRootManager">
2727
<output url="file://$MODULE_DIR$/bin" />
28+
<output-test url="file://$MODULE_DIR$/../out/test/OpenRocket Core" />
2829
<exclude-output />
2930
<content url="file://$MODULE_DIR$">
3031
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
@@ -34,7 +35,60 @@
3435
</content>
3536
<orderEntry type="sourceFolder" forTests="false" />
3637
<orderEntry type="inheritedJdk" />
37-
<orderEntry type="module" module-name="OpenRocket Test Libraries" />
38+
<orderEntry type="module-library" scope="TEST">
39+
<library>
40+
<CLASSES>
41+
<root url="jar://$MODULE_DIR$/../lib-test/hamcrest-core-1.3.jar!/" />
42+
</CLASSES>
43+
<JAVADOC />
44+
<SOURCES />
45+
</library>
46+
</orderEntry>
47+
<orderEntry type="module-library" scope="TEST">
48+
<library>
49+
<CLASSES>
50+
<root url="jar://$MODULE_DIR$/../lib-test/hamcrest-library-1.3.jar!/" />
51+
</CLASSES>
52+
<JAVADOC />
53+
<SOURCES />
54+
</library>
55+
</orderEntry>
56+
<orderEntry type="module-library" scope="TEST">
57+
<library>
58+
<CLASSES>
59+
<root url="jar://$MODULE_DIR$/../lib-test/jmock-2.9.0.jar!/" />
60+
</CLASSES>
61+
<JAVADOC />
62+
<SOURCES />
63+
</library>
64+
</orderEntry>
65+
<orderEntry type="module-library" scope="TEST">
66+
<library>
67+
<CLASSES>
68+
<root url="jar://$MODULE_DIR$/../lib-test/jmock-junit4-2.9.0.jar!/" />
69+
</CLASSES>
70+
<JAVADOC />
71+
<SOURCES />
72+
</library>
73+
</orderEntry>
74+
<orderEntry type="module-library" scope="TEST">
75+
<library>
76+
<CLASSES>
77+
<root url="jar://$MODULE_DIR$/../lib-test/junit-4.12.jar!/" />
78+
</CLASSES>
79+
<JAVADOC />
80+
<SOURCES />
81+
</library>
82+
</orderEntry>
83+
<orderEntry type="module-library" scope="TEST">
84+
<library>
85+
<CLASSES>
86+
<root url="jar://$MODULE_DIR$/../lib-test/test-plugin.jar!/" />
87+
</CLASSES>
88+
<JAVADOC />
89+
<SOURCES />
90+
</library>
91+
</orderEntry>
3892
<orderEntry type="module-library">
3993
<library>
4094
<CLASSES>
@@ -72,20 +126,18 @@
72126
</library>
73127
</orderEntry>
74128
<orderEntry type="module-library">
75-
<library name="guice-4.2.1.jar">
129+
<library>
76130
<CLASSES>
77131
<root url="jar://$MODULE_DIR$/lib/guice-4.2.1.jar!/" />
78132
</CLASSES>
79133
<JAVADOC />
80134
<SOURCES />
81135
</library>
82136
</orderEntry>
83-
<orderEntry type="library" name="lib-test" level="project" />
84-
<orderEntry type="library" name="javax" level="project" />
85137
<orderEntry type="module-library">
86138
<library>
87139
<CLASSES>
88-
<root url="jar://$MODULE_DIR$/lib/opencsv-4.3.2.jar!/" />
140+
<root url="jar://$MODULE_DIR$/lib/guava-26.0-jre.jar!/" />
89141
</CLASSES>
90142
<JAVADOC />
91143
<SOURCES />
@@ -94,7 +146,70 @@
94146
<orderEntry type="module-library">
95147
<library>
96148
<CLASSES>
97-
<root url="jar://$MODULE_DIR$/lib/guava-26.0-jre.jar!/" />
149+
<root url="jar://$MODULE_DIR$/lib/istack-commons-runtime.jar!/" />
150+
</CLASSES>
151+
<JAVADOC />
152+
<SOURCES />
153+
</library>
154+
</orderEntry>
155+
<orderEntry type="module-library">
156+
<library>
157+
<CLASSES>
158+
<root url="jar://$MODULE_DIR$/lib/istack-commons-tools.jar!/" />
159+
</CLASSES>
160+
<JAVADOC />
161+
<SOURCES />
162+
</library>
163+
</orderEntry>
164+
<orderEntry type="module-library">
165+
<library>
166+
<CLASSES>
167+
<root url="jar://$MODULE_DIR$/lib/javax.inject.jar!/" />
168+
</CLASSES>
169+
<JAVADOC />
170+
<SOURCES />
171+
</library>
172+
</orderEntry>
173+
<orderEntry type="module-library">
174+
<library>
175+
<CLASSES>
176+
<root url="jar://$MODULE_DIR$/lib/javax.activation-api-2.3.1.jar!/" />
177+
</CLASSES>
178+
<JAVADOC />
179+
<SOURCES />
180+
</library>
181+
</orderEntry>
182+
<orderEntry type="module-library">
183+
<library>
184+
<CLASSES>
185+
<root url="jar://$MODULE_DIR$/lib/javax.json-1.1.3.jar!/" />
186+
</CLASSES>
187+
<JAVADOC />
188+
<SOURCES />
189+
</library>
190+
</orderEntry>
191+
<orderEntry type="module-library">
192+
<library>
193+
<CLASSES>
194+
<root url="jar://$MODULE_DIR$/lib/javax.json-api-1.1.3.jar!/" />
195+
</CLASSES>
196+
<JAVADOC />
197+
<SOURCES />
198+
</library>
199+
</orderEntry>
200+
<orderEntry type="module-library">
201+
<library>
202+
<CLASSES>
203+
<root url="jar://$MODULE_DIR$/lib/jaxb-api.2.3.1.jar!/" />
204+
</CLASSES>
205+
<JAVADOC />
206+
<SOURCES />
207+
</library>
208+
</orderEntry>
209+
<orderEntry type="module-library">
210+
<library>
211+
<CLASSES>
212+
<root url="jar://$MODULE_DIR$/lib/jaxb-runtime.2.3.1.jar!/" />
98213
</CLASSES>
99214
<JAVADOC />
100215
<SOURCES />
@@ -118,6 +233,15 @@
118233
<SOURCES />
119234
</library>
120235
</orderEntry>
236+
<orderEntry type="module-library">
237+
<library>
238+
<CLASSES>
239+
<root url="jar://$MODULE_DIR$/lib/opencsv-4.3.2.jar!/" />
240+
</CLASSES>
241+
<JAVADOC />
242+
<SOURCES />
243+
</library>
244+
</orderEntry>
121245
<orderEntry type="module-library">
122246
<library>
123247
<CLASSES>
@@ -127,5 +251,14 @@
127251
<SOURCES />
128252
</library>
129253
</orderEntry>
254+
<orderEntry type="module-library">
255+
<library>
256+
<CLASSES>
257+
<root url="jar://$MODULE_DIR$/lib/script-api-1.0.jar!/" />
258+
</CLASSES>
259+
<JAVADOC />
260+
<SOURCES />
261+
</library>
262+
</orderEntry>
130263
</component>
131264
</module>

core/test/net/sf/openrocket/communication/UpdateInfoTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public void testRandomInputData() {
196196

197197
Random rnd = new Random();
198198
for (int i = 0; i < 10; i++) {
199-
int size = (int) ((1 + 0.3 * rnd.nextGaussian()) * Math.pow(i, 6));
199+
int size = Math.abs((int) ((1 + 0.3 * rnd.nextGaussian()) * Math.pow(i, 6)));
200200
byte[] buf = new byte[size];
201201
rnd.nextBytes(buf);
202202

lib-test/OpenRocket Test Libraries.iml

+6-15
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<content url="file://$MODULE_DIR$" />
1717
<orderEntry type="sourceFolder" forTests="false" />
1818
<orderEntry type="inheritedJdk" />
19-
<orderEntry type="module-library">
19+
<orderEntry type="module-library" scope="TEST">
2020
<library>
2121
<CLASSES>
2222
<root url="jar://$MODULE_DIR$/hamcrest-core-1.3.jar!/" />
@@ -25,7 +25,7 @@
2525
<SOURCES />
2626
</library>
2727
</orderEntry>
28-
<orderEntry type="module-library">
28+
<orderEntry type="module-library" scope="TEST">
2929
<library>
3030
<CLASSES>
3131
<root url="jar://$MODULE_DIR$/hamcrest-library-1.3.jar!/" />
@@ -34,7 +34,7 @@
3434
<SOURCES />
3535
</library>
3636
</orderEntry>
37-
<orderEntry type="module-library">
37+
<orderEntry type="module-library" scope="TEST">
3838
<library>
3939
<CLASSES>
4040
<root url="jar://$MODULE_DIR$/jmock-2.9.0.jar!/" />
@@ -43,7 +43,7 @@
4343
<SOURCES />
4444
</library>
4545
</orderEntry>
46-
<orderEntry type="module-library">
46+
<orderEntry type="module-library" scope="TEST">
4747
<library>
4848
<CLASSES>
4949
<root url="jar://$MODULE_DIR$/jmock-junit4-2.9.0.jar!/" />
@@ -52,7 +52,7 @@
5252
<SOURCES />
5353
</library>
5454
</orderEntry>
55-
<orderEntry type="module-library">
55+
<orderEntry type="module-library" scope="TEST">
5656
<library>
5757
<CLASSES>
5858
<root url="jar://$MODULE_DIR$/junit-4.12.jar!/" />
@@ -61,7 +61,7 @@
6161
<SOURCES />
6262
</library>
6363
</orderEntry>
64-
<orderEntry type="module-library">
64+
<orderEntry type="module-library" scope="TEST">
6565
<library>
6666
<CLASSES>
6767
<root url="jar://$MODULE_DIR$/test-plugin.jar!/" />
@@ -70,14 +70,5 @@
7070
<SOURCES />
7171
</library>
7272
</orderEntry>
73-
<orderEntry type="module-library">
74-
<library>
75-
<CLASSES>
76-
<root url="jar://$MODULE_DIR$/../core/lib/script-api-1.0.jar!/" />
77-
</CLASSES>
78-
<JAVADOC />
79-
<SOURCES />
80-
</library>
81-
</orderEntry>
8273
</component>
8374
</module>

0 commit comments

Comments
 (0)