https://kotlinlang.org logo
#gradle
Title
# gradle
r

reactormonk

02/22/2024, 4:42 PM
Copy code
dependencyResolutionManagement {
    // repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        maven { url "<https://jitpack.io>" }
        // TODO replace by includeBuild <https://stackoverflow.com/questions/72543519/gradle-sync-failed-when-upgrade-to-7-3-3-and-agp-7-2-0-cannot-initiate-v1-model>
        mavenLocal {
            content {
                includeGroup("no.entur.android.nfc")
                includeGroup("net.folivo")
            }
        }

    }
}
And this code:
Copy code
implementation("net.folivo:trixnity-client:4.2.6-LOCAL")
and
Copy code
~/.m2/repository/net/folivo/trixnity-client $ cat maven-metadata-local.xml
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
  <groupId>net.folivo</groupId>
  <artifactId>trixnity-client</artifactId>
  <versioning>
    <latest>4.2.6-LOCAL</latest>
    <release>4.2.6-LOCAL</release>
    <versions>
      <version>4.2.6-LOCAL</version>
    </versions>
    <lastUpdated>20240222160142</lastUpdated>
  </versioning>
</metadata>
But I get
Copy code
Failed to resolve: net.folivo:trixnity-client:4.2.6-LOCAL
a

Adam S

02/22/2024, 4:45 PM
Does the subproject with the dependency have any repositories defined? If it does, they can override all of the ones defined in the
dependencyResolutionManagement {}
block. What happens if you uncomment
FAIL_ON_PROJECT_REPOS
?
r

reactormonk

02/22/2024, 4:47 PM
Nope, nothing defined. No change.
v

Vampire

02/22/2024, 5:49 PM
Is it only in that XML, or is the dependency / version actually there?
The xml is only used if a dynamic range is used iirc
r

reactormonk

02/22/2024, 6:10 PM
Wrong file -.-, fixed it.
👌 1