Skip to content

Commit e5d451e

Browse files
committed
Start adding a target to generate dist jars
1 parent 96862eb commit e5d451e

File tree

3 files changed

+61
-10
lines changed

3 files changed

+61
-10
lines changed

BUCK

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
export_file(
2+
name = 'notice',
3+
out = 'NOTICE',
4+
src = 'NOTICE',
5+
visibility = [ 'PUBLIC' ],
6+
)
7+
8+
export_file(
9+
name = 'license',
10+
out = 'LICENSE',
11+
src = 'LICENSE',
12+
visibility = [ 'PUBLIC' ],
13+
)

java/BUCK

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export_file(
2+
name = 'changelog',
3+
out = "CHANGELOG",
4+
src = "CHANGELOG",
5+
visibility = [
6+
"//java/...",
7+
],
8+
)

java/client/src/org/openqa/selenium/BUCK

+40-10
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ java_library(name = 'core',
8080

8181
genrule(name = 'manifest',
8282
out = 'manifest.mf',
83-
bash = 'cp $(location :build-stamp) $OUT && printf "Selenium-Version: {}\n\n" >> $OUT'.format(SE_VERSION),
83+
bash = "cp $(location :build-stamp) $OUT && printf 'Selenium-Version: {}\n\n' >> $OUT".format(SE_VERSION),
8484
cmd_exe = "copy $(location :build-stamp) %OUT% && (echo Selenium-Version: {}\n\n) >> %OUT%".format(SE_VERSION),
8585
)
8686

@@ -170,22 +170,52 @@ java_library(
170170
maven_coords = 'org.seleniumhq.selenium:selenium-java:' + SE_VERSION,
171171
maven_pom_template = ':template-pom',
172172
exported_deps = [
173-
":selenium",
174-
"//java/client/src/org/openqa/selenium/chrome:chrome",
175-
"//java/client/src/org/openqa/selenium/firefox:firefox",
176-
"//java/client/src/org/openqa/selenium/edge:edge",
177-
"//java/client/src/org/openqa/selenium/ie:ie",
178-
"//java/client/src/org/openqa/selenium/opera:opera",
179-
"//java/client/src/org/openqa/selenium/remote:remote",
180-
"//java/client/src/org/openqa/selenium/safari:safari",
181-
"//java/client/src/org/openqa/selenium/support:support"
173+
':selenium',
174+
'//java/client/src/org/openqa/selenium/chrome:chrome',
175+
'//java/client/src/org/openqa/selenium/firefox:firefox',
176+
'//java/client/src/org/openqa/selenium/edge:edge',
177+
'//java/client/src/org/openqa/selenium/ie:ie',
178+
'//java/client/src/org/openqa/selenium/opera:opera',
179+
'//java/client/src/org/openqa/selenium/remote:remote',
180+
'//java/client/src/org/openqa/selenium/safari:safari',
181+
'//java/client/src/org/openqa/selenium/support:support'
182182
],
183183
visibility = [
184184
'//java/server/src/org/openqa/grid/selenium:classes',
185185
'//java/server/test/org/openqa/selenium:lib',
186186
],
187187
)
188188

189+
java_binary(
190+
name = 'client-combined-' + SE_VERSION,
191+
blacklist = [
192+
'^(?!com.thoughtworks.selenium.*|org.openqa.selenium.*|org.openqa.grid.*)',
193+
],
194+
deps = [
195+
':client-combined',
196+
],
197+
)
198+
199+
# Output of this rule is named a source jar so we can do merging later
200+
genrule(
201+
name = 'client-libs',
202+
out = 'libs-sources.jar',
203+
cmd = 'mkdir libs && echo $(classpath :client-combined) | tr : "\\n" | grep third_party/java | grep .jar | xargs -J % cp % libs && jar cMf $OUT libs/*',
204+
)
205+
206+
zip_file(
207+
name = 'client-combined-zip',
208+
out = 'selenium-java-' + SE_VERSION + '.zip',
209+
srcs = [
210+
':client-combined-' + SE_VERSION,
211+
':client-libs',
212+
'//java:changelog',
213+
'//:notice',
214+
'//:license',
215+
],
216+
)
217+
218+
189219
export_file(
190220
name = 'template-pom',
191221
src = 'pom.xml',

0 commit comments

Comments
 (0)