@@ -13,6 +13,8 @@ dependencies {
1313
1414 // BCEL is required for Codesize
1515 runtimeOnly(libs.bcel)
16+
17+ runtimeOnly(libs.picocontainer)
1618}
1719
1820tasks {
@@ -27,22 +29,121 @@ tasks {
2729 }
2830
2931 val copyExternalLibs by registering(Copy ::class ) {
30- dependsOn(configurations.runtimeClasspath)
3132 from({
32- configurations.runtimeClasspath.get().filter { it.name.endsWith(" jar" ) && it.name.contains( " kotlin " ) }.map { it }
33+ configurations.runtimeClasspath.get().filter { it.name.endsWith(" jar" ) }.map { it }
3334 })
3435 into(" ../.sandbox/libs" )
3536 }
3637
3738 val copyCompilers by registering(Copy ::class ) {
3839 from({
39- configurations.runtimeClasspath.get().filter { it.name.endsWith(" jar" ) &&
40- (it.name.contains(" eclipse" ) || (it.name.startsWith(" ecj" )))}.map { it }
40+ configurations.runtimeClasspath.get().filter {
41+ it.name.endsWith(" jar" ) &&
42+ (it.name.contains(" eclipse" ) || (it.name.startsWith(" ecj" )))
43+ }.map { it }
4144 })
4245 into(" ../.sandbox/compilers" )
4346 }
4447
45- processResources {
48+ val copyRobocodeApiLib by registering(Copy ::class ) {
49+ dependsOn(project(" :robocode.api" ).tasks.named(" jar" ))
50+
51+ from(
52+ project(" :robocode.api" ).fileTree(" build/libs" ).matching {
53+ include(" robocode.jar" )
54+ }
55+ )
56+ into(" ../.sandbox/libs" ) // Copy to the target directory
57+ }
58+
59+ val copyRobocodeBattleLib by registering(Copy ::class ) {
60+ dependsOn(project(" :robocode.battle" ).tasks.named(" jar" ))
61+
62+ from(
63+ project(" :robocode.battle" ).fileTree(" build/libs" ).matching {
64+ include(" robocode.battle-*.jar" )
65+ exclude(" robocode.battle-*-javadoc.jar" , " robocode.battle-*-sources.jar" )
66+ }
67+ )
68+ into(" ../.sandbox/libs" ) // Copy to the target directory
69+ }
70+
71+ val copyRobocodeCoreLib by registering(Copy ::class ) {
72+ dependsOn(project(" :robocode.core" ).tasks.named(" jar" ))
73+
74+ from(
75+ project(" :robocode.core" ).fileTree(" build/libs" ).matching {
76+ include(" robocode.core-*.jar" )
77+ }
78+ )
79+ into(" ../.sandbox/libs" ) // Copy to the target directory
80+ }
81+
82+ val copyRobocodeHostLib by registering(Copy ::class ) {
83+ dependsOn(project(" :robocode.host" ).tasks.named(" jar" ))
84+
85+ from(
86+ project(" :robocode.host" ).fileTree(" build/libs" ).matching {
87+ include(" robocode.host-*.jar" )
88+ }
89+ )
90+ into(" ../.sandbox/libs" ) // Copy to the target directory
91+ }
92+
93+ val copyRobocodeRepositoryLib by registering(Copy ::class ) {
94+ dependsOn(project(" :robocode.repository" ).tasks.named(" jar" ))
95+
96+ from(
97+ project(" :robocode.repository" ).fileTree(" build/libs" ).matching {
98+ include(" robocode.repository-*.jar" )
99+ }
100+ )
101+ into(" ../.sandbox/libs" ) // Copy to the target directory
102+ }
103+
104+ val copyRobocodeSoundLib by registering(Copy ::class ) {
105+ dependsOn(project(" :robocode.sound" ).tasks.named(" jar" ))
106+
107+ from(
108+ project(" :robocode.sound" ).fileTree(" build/libs" ).matching {
109+ include(" robocode.sound-*.jar" )
110+ }
111+ )
112+ into(" ../.sandbox/libs" ) // Copy to the target directory
113+ }
114+
115+ val copyRobocodeUiLib by registering(Copy ::class ) {
116+ dependsOn(project(" :robocode.ui" ).tasks.named(" jar" ))
117+
118+ from(
119+ project(" :robocode.ui" ).fileTree(" build/libs" ).matching {
120+ include(" robocode.ui-*.jar" )
121+ }
122+ )
123+ into(" ../.sandbox/libs" ) // Copy to the target directory
124+ }
125+
126+ val copyRobocodeUiEditorLib by registering(Copy ::class ) {
127+ dependsOn(project(" :robocode.ui.editor" ).tasks.named(" jar" ))
128+
129+ from(
130+ project(" :robocode.ui.editor" ).fileTree(" build/libs" ).matching {
131+ include(" robocode.ui.editor-*.jar" )
132+ }
133+ )
134+ into(" ../.sandbox/libs" ) // Copy to the target directory
135+ }
136+
137+ assemble {
138+ dependsOn(copyRobocodeApiLib)
139+ dependsOn(copyRobocodeBattleLib)
140+ dependsOn(copyRobocodeCoreLib)
141+ dependsOn(copyRobocodeHostLib)
142+ dependsOn(copyRobocodeRepositoryLib)
143+ dependsOn(copyRobocodeSoundLib)
144+ dependsOn(copyRobocodeUiLib)
145+ dependsOn(copyRobocodeUiEditorLib)
146+
46147 dependsOn(copyContent)
47148 dependsOn(copyExternalLibs)
48149 dependsOn(copyCompilers)
0 commit comments