Skip to content

Commit bb8b8d5

Browse files
committed
[CALCITE-6687] Add dependency constraints for org.ow2.asm for Gradle build environment
1 parent 2baa36e commit bb8b8d5

File tree

2 files changed

+21
-10
lines changed

2 files changed

+21
-10
lines changed

build.gradle.kts

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,25 @@ import de.thetaphi.forbiddenapis.gradle.CheckForbiddenApis
3131
import de.thetaphi.forbiddenapis.gradle.CheckForbiddenApisExtension
3232
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
3333

34+
buildscript {
35+
36+
repositories {
37+
jcenter()
38+
}
39+
40+
dependencies {
41+
constraints {
42+
// FIXME Should use asm.version from properties
43+
"classpath"("org.ow2.asm:asm::9.7.1")
44+
"classpath"("org.ow2.asm:asm-all:9.7.1")
45+
"classpath"("org.ow2.asm:asm-analysis:9.7.1")
46+
"classpath"("org.ow2.asm:asm-commons:9.7.1")
47+
"classpath"("org.ow2.asm:asm-tree:9.7.1")
48+
"classpath"("org.ow2.asm:asm-util:9.7.1")
49+
}
50+
}
51+
}
52+
3453
plugins {
3554
publishing
3655
// Verification
@@ -345,16 +364,6 @@ allprojects {
345364
// By default spotbugs verifies TEST classes as well, and we do not want that
346365
this.sourceSets = listOf(sourceSets["main"])
347366
}
348-
dependencies {
349-
constraints {
350-
"spotbugs"("org.ow2.asm:asm:${"asm".v}")
351-
"spotbugs"("org.ow2.asm:asm-all:${"asm".v}")
352-
"spotbugs"("org.ow2.asm:asm-analysis:${"asm".v}")
353-
"spotbugs"("org.ow2.asm:asm-commons:${"asm".v}")
354-
"spotbugs"("org.ow2.asm:asm-tree:${"asm".v}")
355-
"spotbugs"("org.ow2.asm:asm-util:${"asm".v}")
356-
}
357-
}
358367
}
359368

360369
configure<CheckForbiddenApisExtension> {

gradle.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ checkstyle.version=10.19.0
5555
jdk8.checkstyle.version=9.3
5656
spotbugs.version=3.1.11
5757

58+
# This only applies to the asm used in the tests. To override the asm used by the gradle plugins
59+
# change the version in the buildScript block of build.gradle.kts directly
5860
asm.version=9.7.1
5961
bouncycastle.version=1.70
6062
bytebuddy.version=1.15.1

0 commit comments

Comments
 (0)