Dependency locking for specific configurations onl...
# community-support
s
Dependency locking for specific configurations only I have just enabled dependency configuration for my project: If I use
Copy code
configurations.all {
    dependencyLocking {
       lockAllConfigurations()
    }
}
I see gradle.lockfile that has dependencies listed from tasks such as ktlint, detekt ch.qos.logbacklogback classic1.3.0=ktlint ch.qos.logbacklogback core1.3.0=ktlint So I decided to enable configuration locking only for certain flavor using this:
_configurations_._forEach_ *{*
if (*it*._name_._lowercase_()._contains_("CompileClasspath") ||
*it*._name_._lowercase_()._contains_("RuntimeClasspath")) {
*it*.resolutionStrategy *{*
activateDependencyLocking()
}
}
}
But with above configuration I see gradle.lockfile ignores all dependencies gradle.lockfile has this content. empty=androidTestApiDependenciesMetadata,androidTestCompileOnlyDependenciesMetadata,androidTestDebugApiDependenciesMetadata,androidTestDebugCompileOnlyDependenciesMetadata.... How do I generate lockfile for specific configuration?