I publishLocal a jar with sbt. The jar is produced in a local file at a reasonable path based on build.sbt configuration as follows:
name := "Utilities One"
organization := "com.cosi"
scalaVersion := 2.11.6"
version := "0.2"
This creates the jar at: /home/bill/.ivy2/local/com.cosi/utilities-one_2.11/0.2/jars/utilities-one_2.11.jar
My build.gradle points to the ivy repo, and additionally names the dependency as follows:
dependencies {
compile 'com.cosi:utilities-one_2.11:0.2@jar'
}
This causes the gradle process to seek the jar at the path /home/bill/.ivy2/local/com.cosi/utilities-one_2.11/0.2/utilities-one_2.11-0.2.jar
I work around the incompatibility in path construction by manually creating a symbolic link, and the project builds (for Android) successfully.
But I would like to eliminate the need for the symbolic link by either adjusting the build.sbt or the gradle.sbt or both. Is it possible, and what would be best practice?
Well, the simpler solution is embarrassingly obvious, but still unsatisfying:
That is, merely change the Gradle reference type to file instead of ivy, since it is a local file. Maybe sbt and gradle and ivy weren't meant to play together.