24 Mar 2022 |
SethTisue#7418 | I don't think there's any way to put them anywhere else. (you can also put code in project/*.scala , but that code has to be called from an .sbt file at the root level) | 16:13:16 |
SethTisue#7418 | * hard to be 100% sure about a negative, I don't think there's any way to put them anywhere else. (you can also put code in project/*.scala , but that code has to be called from an .sbt file at the root level) | 16:13:30 |
SethTisue#7418 | * hard to be 100% sure about a negative, but I've never heard of there being any way to put them anywhere else. (you can also put code in project/*.scala , but that code has to be called from an .sbt file at the root level) | 16:13:41 |
SethTisue#7418 | * hard to be 100% sure about a negative, but I've never heard of there being any way to put them anywhere else. (you can also put code in project/*.scala , but that code has to ultimately be called from an .sbt file at the root level) | 16:13:52 |
Dan | ohkeycaps.com#6915 | so I could have a file project/aliases.sbt , and call it from build.sbt ? | 16:17:55 |
Dan | ohkeycaps.com#6915 | ragnar and how do you call that file from build.sbt ? | 16:47:56 |
| ragnar#4252 joined the room. | 16:49:43 |
ragnar#4252 | Dan | ohkeycaps.com the .scala files are just normal scala files compiled together with your project. So if they contain an object Aliases then in your build you can do import Aliases._ . | 16:49:44 |
Dan | ohkeycaps.com#6915 | Ah ok | 16:50:03 |
ragnar#4252 | Dan | ohkeycaps.com because they are just normal scala files, you may want to consider the following imports if you use any of the SBT stuff:
import sbt.Keys._
import sbt._ | 16:52:41 |
Dan | ohkeycaps.com#6915 | ^ true I've seen that in sbt files before. | 16:53:05 |
ragnar#4252 | I think in .sbt files those imports are added automatically … kinda. | 16:53:46 |
| mbesida joined the room. | 17:46:25 |
mbesida | When I do publishLocal on a project with SNAPSHOT version, first time it performs well, second time it warns that I have to manually delete already existing version from ~/.ivy2/local location. Is it an expected benhaviour? I find it cumbersome each time to go to that location and delete it manually. Maybe sbt has some commands to automate that? | 17:46:26 |
Dan | ohkeycaps.com#6915 | Hm I thought that it would override the existing one, especially since it is a snapshot | 17:54:33 |
| agustinpereyra87 joined the room. | 17:57:32 |
| zzyzzyxx#4150 joined the room. | 18:01:28 |
zzyzzyxx#4150 | you can set isSnapshot := true | 18:01:28 |
mbesida | thanks, that works | 18:20:07 |
mbesida | appears that it doesn't care about version at all, unless you set isSnapshot := true | 18:20:11 |
mbesida | * appears that it doesn't care about version at all, unless you set isSnapshot := true | 18:20:14 |
zzyzzyxx#4150 | it has this code internally isSnapshot := (isSnapshot or version(_ endsWith "-SNAPSHOT")).value, | 18:20:18 |
zzyzzyxx#4150 | but that's in ivyBaseSettings , so maybe it only matters if you are publishing ivy-style | 18:20:45 |
zzyzzyxx#4150 | * but that's in ivyBaseSettings , so maybe it only matters if you are publishing ivy-style vs maven-style? | 18:21:56 |
mbesida | I didn't set any special settings regarding publishing. My sbt version is 1.6.2. And what are the defaults, maven-style? | 18:23:02 |
zzyzzyxx#4150 | ah just found publishLocalConfiguration := publishConfig(
false, //publishMavenStyle.value,
deliverPattern(crossTarget.value),
if (isSnapshot.value) "integration" else "release",
ivyConfigurations.value.map(c => ConfigRef(c.name)).toVector,
(publishLocal / packagedArtifacts).value.toVector,
(publishLocal / checksums).value.toVector,
logging = ivyLoggingLevel.value,
overwrite = isSnapshot.value
)
which looks like it's forced to ivy-style, and should respect the version ending in -SNAPSHOT | 18:27:40 |
zzyzzyxx#4150 | * ah just found publishLocalConfiguration := publishConfig(
false, //publishMavenStyle.value,
deliverPattern(crossTarget.value),
if (isSnapshot.value) "integration" else "release",
ivyConfigurations.value.map(c => ConfigRef(c.name)).toVector,
(publishLocal / packagedArtifacts).value.toVector,
(publishLocal / checksums).value.toVector,
logging = ivyLoggingLevel.value,
overwrite = isSnapshot.value
)
which looks like publishLocal forces ivy-style, and should respect the version ending in -SNAPSHOT | 18:27:58 |
zzyzzyxx#4150 | any chance you didn't have the hyphen, or had something else after SNAPSHOT? | 18:28:47 |
mbesida | yeah, I just set version := "SNAPHSOT" | 18:30:25 |
mbesida | * yeah, I just set version := "SNAPSHOT" | 18:30:48 |