The z3JarFile is just a string, and if the Z3 project wasn't compiled yet, unamangedJars will contain the right path to com.microsoft.z3.jar but the file won't be there, and compilation will simply fail. It would work the next time though, if somehow Z3 was built at least once and the jar is there.
A potential fix might be to make the z3JarFile be a task that dependsOn z3.value
— @dragos
See https://github.com/epfl-lara/ScalaZ3/pull/59#discussion_r184396851