Remove lock files

This commit is contained in:
Erik C. Thauvin 2023-09-04 14:44:51 -07:00
parent 32e21491c7
commit dd2dc9e380
5 changed files with 2 additions and 233 deletions

View file

@ -8,15 +8,4 @@ dependencies {
implementation("org.jetbrains.dokka:dokka-gradle-plugin:1.9.0")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0")
implementation("org.jetbrains.kotlinx:kover-gradle-plugin:0.7.3")
}
dependencyLocking {
lockMode.set(LockMode.STRICT)
}
configurations {
// only lock compile & runtime to prevent error:
// Locking strict mode: Configuration ':buildSrc:testCompileClasspath' is locked but does not have lock state.
compileClasspath { resolutionStrategy.activateDependencyLocking() }
runtimeClasspath { resolutionStrategy.activateDependencyLocking() }
}
}

View file

@ -15,22 +15,4 @@ tasks.withType<AbstractArchiveTask>().configureEach {
// https://docs.gradle.org/current/userguide/working_with_files.html#sec:reproducible_archives
isPreserveFileTimestamps = false
isReproducibleFileOrder = true
}
dependencyLocking {
lockMode.set(LockMode.STRICT)
lockAllConfigurations()
}
tasks.register("resolveAndLockAllDependencies") {
// https://docs.gradle.org/current/userguide/dependency_locking.html#ex-resolving-all-configurations
group = "dependencies"
notCompatibleWithConfigurationCache("Filters configurations at execution time")
val resolvableConfigurations = configurations.matching { it.isCanBeResolved }
doFirst {
require(gradle.startParameter.isWriteDependencyLocks) { "$path must be run from the command line with the `--write-locks` flag" }
}
doLast {
resolvableConfigurations.forEach { it.resolve() }
}
}
}