Skip to content

Commit 49548c1

Browse files
committed
dependency locking.
1 parent ba233f2 commit 49548c1

File tree

16 files changed

+99
-1
lines changed

16 files changed

+99
-1
lines changed

build.gradle

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ subprojects {
2121
mavenCentral()
2222
}
2323

24+
configurations {
25+
[compileClasspath, runtimeClasspath]*.resolutionStrategy*.activateDependencyLocking()
26+
}
27+
2428
java {
2529
withJavadocJar()
2630
withSourcesJar()
@@ -60,6 +64,16 @@ subprojects {
6064
options.memberLevel = JavadocMemberLevel.PROTECTED
6165
options.addBooleanOption('html5', true)
6266
}
67+
68+
tasks.register('resolveAndLock') {
69+
notCompatibleWithConfigurationCache('Fitlers configurations at execution time')
70+
doFirst {
71+
assert gradle.startParameter.writeDependencyLocks : "$path must be run from the the command line with the `--write-locks` flag"
72+
}
73+
doLast {
74+
[configurations.compileClasspath, configurations.runtimeClasspath].each { it.resolve() }
75+
}
76+
}
6377
}
6478

6579
nexusPublishing {

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jaxen = 'jaxen:jaxen:2.0.0'
1717
jdom2 = 'org.jdom:jdom2:2.0.6.1'
1818
json-api = 'jakarta.json:jakarta.json-api:2.1.3'
1919
json-impl = 'org.glassfish:jakarta.json:2.0.1'
20-
junit-jupiter = 'org.junit.jupiter:junit-jupiter:5.11.0'
20+
junit-jupiter = 'org.junit.jupiter:junit-jupiter:5.11.1'
2121
mockito = 'org.mockito:mockito-junit-jupiter:5.13.0'
2222
scala-library-v212 = { module = 'org.scala-lang:scala-library', version.ref = 'scala212' }
2323
scala-library-v213 = { module = 'org.scala-lang:scala-library', version.ref = 'scala213' }

settings-gradle.lockfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# This is a Gradle generated file for dependency locking.
2+
# Manual edits can break the build and are not advised.
3+
# This file is expected to be part of source control.
4+
empty=incomingCatalogForLibs0

xpath-to-json-gson/gradle.lockfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# This is a Gradle generated file for dependency locking.
2+
# Manual edits can break the build and are not advised.
3+
# This file is expected to be part of source control.
4+
com.google.code.gson:gson:2.11.0=compileClasspath,runtimeClasspath
5+
com.google.errorprone:error_prone_annotations:2.27.0=compileClasspath,runtimeClasspath
6+
empty=
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# This is a Gradle generated file for dependency locking.
2+
# Manual edits can break the build and are not advised.
3+
# This file is expected to be part of source control.
4+
com.fasterxml.jackson.core:jackson-annotations:2.17.2=compileClasspath,runtimeClasspath
5+
com.fasterxml.jackson.core:jackson-core:2.17.2=compileClasspath,runtimeClasspath
6+
com.fasterxml.jackson.core:jackson-databind:2.17.2=compileClasspath,runtimeClasspath
7+
com.fasterxml.jackson:jackson-bom:2.17.2=compileClasspath,runtimeClasspath
8+
empty=
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# This is a Gradle generated file for dependency locking.
2+
# Manual edits can break the build and are not advised.
3+
# This file is expected to be part of source control.
4+
jakarta.json:jakarta.json-api:2.1.3=compileClasspath
5+
empty=runtimeClasspath

xpath-to-xml-core/gradle.lockfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# This is a Gradle generated file for dependency locking.
2+
# Manual edits can break the build and are not advised.
3+
# This file is expected to be part of source control.
4+
empty=compileClasspath,runtimeClasspath

xpath-to-xml-dom/gradle.lockfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# This is a Gradle generated file for dependency locking.
2+
# Manual edits can break the build and are not advised.
3+
# This file is expected to be part of source control.
4+
empty=compileClasspath,runtimeClasspath

xpath-to-xml-dom4j/gradle.lockfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This is a Gradle generated file for dependency locking.
2+
# Manual edits can break the build and are not advised.
3+
# This file is expected to be part of source control.
4+
javax.xml.bind:jaxb-api:2.2.12=runtimeClasspath
5+
javax.xml.stream:stax-api:1.0-2=runtimeClasspath
6+
jaxen:jaxen:1.1.6=runtimeClasspath
7+
net.java.dev.msv:xsdlib:2013.6.1=runtimeClasspath
8+
org.dom4j:dom4j:2.1.4=compileClasspath,runtimeClasspath
9+
pull-parser:pull-parser:2.1.10=runtimeClasspath
10+
relaxngDatatype:relaxngDatatype:20020414=runtimeClasspath
11+
xpp3:xpp3:1.1.4c=runtimeClasspath
12+
empty=

xpath-to-xml-jdom/gradle.lockfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# This is a Gradle generated file for dependency locking.
2+
# Manual edits can break the build and are not advised.
3+
# This file is expected to be part of source control.
4+
org.jdom:jdom2:2.0.6.1=compileClasspath,runtimeClasspath
5+
empty=

0 commit comments

Comments
 (0)