Skip to content

Commit f41bacf

Browse files
authored
Upgrade ASM library again (#14)
1 parent 091613b commit f41bacf

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

build.gradle

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ buildscript {
33
jcenter()
44
maven { url "https://plugins.gradle.org/m2/" }
55
}
6-
dependencies { classpath 'org.minimallycorrect.gradle:DefaultsPlugin:0.0.44' }
6+
dependencies { classpath 'org.minimallycorrect.gradle:DefaultsPlugin:0.0.45' }
77
}
88
plugins {
99
id 'java'
10+
id 'java-library'
1011
id 'maven'
1112
}
1213
apply plugin: 'org.minimallycorrect.gradle.DefaultsPlugin'
@@ -20,17 +21,16 @@ minimallyCorrectDefaults {
2021
} ()
2122

2223
dependencies {
23-
testCompile "junit:junit:4.12"
24+
testImplementation "junit:junit:4.12"
2425
//Can we make these dependencies optional? Reduced jar size if not using source for patching
25-
compile 'org.ow2.asm:asm:6.2.1'
26-
compile 'org.ow2.asm:asm-util:6.2.1'
27-
compile 'org.ow2.asm:asm-tree:6.2.1'
28-
compile 'com.github.javaparser:javaparser-symbol-solver-core:3.6.24'
26+
implementation 'org.ow2.asm:asm:7.2'
27+
implementation 'org.ow2.asm:asm-util:7.2'
28+
implementation 'org.ow2.asm:asm-tree:7.2'
29+
implementation 'com.github.javaparser:javaparser-symbol-solver-core:3.6.24'
2930
}
3031

3132
tasks.withType(JavaCompile) {
32-
sourceCompatibility = 8
33-
targetCompatibility = 8
33+
targetCompatibility = sourceCompatibility = JavaVersion.VERSION_1_8
3434
options.with {
3535
deprecation = true
3636
encoding = 'UTF-8'

src/main/java/org/minimallycorrect/javatransformer/internal/ClassPaths.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public static class SystemClassPath {
5555
private static ClassPath makeSystemJarClassPath() {
5656
// only scan java/ files in boot class path
5757
// avoid JVM/JDK internals
58+
// TODO: self-test, if we can't load JDK classes with current asm version fall back to reflection
5859
try {
5960
val paths = Splitter.pathSplitter.split(ManagementFactory.getRuntimeMXBean().getBootClassPath())
6061
.map(it -> Paths.get(it)).filter(it -> it.getFileName().toString().equals("rt.jar"))

0 commit comments

Comments
 (0)