Dylan Bolger
03/19/2024, 7:45 PMmavenLocal() over a RELEASE one living in a Maven Repository? I'd like it where if the artifact exists in mavenLocal, it's preferred and used. Otherwise if a RELEASE version is found, it can be used.
I think this goes against Gradle's typical rules of preferring the highest version first (1.0-RELEASE > 1.0-SNAPSHOT). We have our architecture set up in such a way that doing composite builds isn't practical and we'd like to keep referring to mavenLocal, despite it's pitfalls.
I've seen examples where you can prefer a local dependency on a project(':myProject') over a artifact coming from elsewhere, but I'm unsure how to take on this approach if the project I'd like to refer to doesn't live in the same code repository/Gradle project space.Dylan Bolger
03/19/2024, 7:58 PMAdam
03/19/2024, 9:06 PMrepositories {
mavenLocal {
mavenContent { snapshotsOnly() }
}
mavenCentral()
}Dylan Bolger
03/20/2024, 6:18 PMAdam
03/22/2024, 11:21 AMpreferProjectModules() https://docs.gradle.org/current/kotlin-dsl/gradle/org.gradle.api.artifacts/-resolution-strategy/prefer-project-modules.html
I was looking at a different problem, and just bumped into it.Dylan Bolger
03/25/2024, 7:27 PMDylan Bolger
03/25/2024, 7:27 PM