# Override a version of a catalog by version alias

**URL:** <https://discuss.gradle.org/t/override-a-version-of-a-catalog-by-version-alias/44244>\
**Category:** Help/Discuss\
**Created:** [November 10, 2022, 10:35am UTC](https://discuss.gradle.org/t/override-a-version-of-a-catalog-by-version-alias/44244 "2022-11-10T10:35:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nebdir](https://avatars.discourse-cdn.com/v4/letter/n/2acd7d/32.png) [@Nebdir](https://discuss.gradle.org/u/Nebdir)\
**Post date:** [November 10, 2022, 10:35am UTC](https://discuss.gradle.org/t/override-a-version-of-a-catalog-by-version-alias/44244/1 "2022-11-10T10:35:24Z")

</div>

Hey ther im trying to override a version declared as

```nohighlight
[version]
a-b-foo-dev = "1.2.3"

```

ive read that the dashes doesnt matter, even thought i can replace them with dots.  
but upon overrwriting the version in the settings.gradle.kts its not clear how its working.

```gradle
create("libs"){
       from("de.me.catalog:android:0.1.0")
       version("a.b.foo.dev","1.2.8-dev.26")
}

```

other alias like `a-b-foo-dev` not working also.  
So whats the ideal way to clean this mess up?

---

<div class="post-metadata">

**Author:** ![Chris\_Dore](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/chris_dore/32/7592_2.png) [@Chris\_Dore](https://discuss.gradle.org/u/Chris_Dore)\
**Post date:** [November 11, 2022, 7:34am UTC](https://discuss.gradle.org/t/override-a-version-of-a-catalog-by-version-alias/44244/2 "2022-11-11T07:34:55Z")

</div>

I used the `version-catalog` plugin to create and publish a catalog containing:

```gradle
catalog {
    versionCatalog {
        version("a-b-c", "1.0")
    }
}

```

I then imported it into another project:

```gradle
dependencyResolutionManagement {
    repositories {
        mavenLocal()
    }
    versionCatalogs {
        create("libs") {
            from("io.github.oesolutions:catalog:0.0.1")
            version("a-b-c", "override")
        }
    }
}

```

Then in the build I print out the value in the build script:

```gradle
println(libs.versions.a.b.c.get())

```

Which results in `override` being displayed. I tested using Gradle 7.5.1.
