B4J Question MergeLibraries break my lib

Pendrush

Well-Known Member
Licensed User
Longtime User
#MergeLibraries: False = I can run app in Release mode
#MergeLibraries: True = App crash in Release mode

Stacktrace:

Line 42 in wrapper lib:
Java:
private val options = ChromeOptions() // <- global declaration
driver = ChromeDriver(options)        // <- error line 42 from stacktrace: at com.pendrush.selenium.kotlin.SeleniumLib.initialize(SeleniumLib.kt:42)

The error is completely unrelated... I cannot get it.

This behavior also create unusable app with standalone package.

Library:

I need to build standalone package, any solution?
 

Pendrush

Well-Known Member
Licensed User
Longtime User
After some research, I found that some files from my library were not copied into the JAR file that was compiled in release mode with flag #MergeLibraries: True.
If I copy ALL the files from my kotlin-selenium-all.jar library, WITHOUT overwriting, into the compiled JAR everything works fine.

You can also see the difference in the size of the files, it is obvious that something is also missing in the Release JAR:

My Library:
B4X:
Pnd_Selenium.xml              70,210
Pnd_Selenium.jar               6,457
kotlin-selenium-all.jar   30,139,004

Release JAR (#MergeLibraries: True):
B4X:
Selenium7.jar             26,156,717

Any solution?
 
Last edited:
Upvote 0

Pendrush

Well-Known Member
Licensed User
Longtime User
2940 Files are missing in Release Jar.
PDF with folders and file names is attached to this post.
 

Attachments

  • 2940MissingFilesInReleaseJar.zip
    454 KB · Views: 6
Upvote 0

Pendrush

Well-Known Member
Licensed User
Longtime User
Simple copy missing files from META-INF subfolder make app to work as it should.

EDIT:
Only one file make app to work on path: META-INF\selenium-build.properties

Is there any chance to make app in release mode and somehow to instruct B4J to include this file?
 
Last edited:
Upvote 0

Pendrush

Well-Known Member
Licensed User
Longtime User
File is used inside library:

also here:
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…