# versionMapping

abstract fun versionMapping(configureAction: Action<in VersionMappingStrategy>)(source)

Configures the version mapping strategy. For example, to use resolved versions for runtime dependencies:

    plugins {
        id 'java'
        id 'maven-publish'
    }

    publishing {
      publications {
        maven(MavenPublication) {
          from components.java
          versionMapping {
            usage('java-runtime'){
              fromResolutionResult()
            }
          }
        }
      }
    }

Content copied to clipboard

#### Since

5.2

#### Parameters

configureAction

the configuration