Skip to content

Commit

Permalink
TAP5-2769 Upgrade ASM to 9.6 to allow running on Java 21 (#46)
Browse files Browse the repository at this point in the history
* TAP5-2769 Upgrade ASM to 9.6 to allow running on Java 21

- Remove the copy of ASM
- Add project 'plastic-asm' to be the shadowed version of ASM 9.6
- Add a version property for ASM in the build

* TAP5-2769 Upgrade ASM to 9.6 to allow running on Java 21

- Inject a Tapestry specific TapestryAnnotationNode into ASM to get access to the static helper instead of relying on reflection

---------

Co-authored-by: Chris Poulsen <[email protected]>
  • Loading branch information
chrispoulsen and cpoulsen-dezide authored Dec 2, 2023
1 parent 8c6cc2d commit ecb81b8
Show file tree
Hide file tree
Showing 146 changed files with 36 additions and 47,651 deletions.
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ project.ext.versions = [
jsonschemaGenerator: "4.20.0",
junitJupiter: "5.8.2",
commonsLang: "3.4",
webdriverManager: "5.3.1"
webdriverManager: "5.3.1",
asm: "9.6"
]

ext.continuousIntegrationBuild = Boolean.getBoolean("ci")
Expand Down
19 changes: 19 additions & 0 deletions plastic-asm/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
plugins {
id 'com.github.johnrengelman.shadow' version '7.1.2'
}

description = "Shadow asm for plastic"

jar {
enabled = false
}

shadowJar {
relocate("org.objectweb.asm", "org.apache.tapestry5.internal.plastic.asm")
archiveClassifier = ""
}

dependencies {
implementation("org.ow2.asm:asm-commons:${versions.asm}")
implementation("org.ow2.asm:asm-util:${versions.asm}")
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package org.objectweb.asm.tree;

import org.objectweb.asm.AnnotationVisitor;

public class TapestryAnnotationNode extends AnnotationNode {
public TapestryAnnotationNode(String desc) {
super(desc);
}

public static void accept(AnnotationVisitor annotationVisitor, String name, Object value) {
AnnotationNode.accept(annotationVisitor, name, value);}
}
5 changes: 1 addition & 4 deletions plastic/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
description = "High-level runtime transformations of Java classes"

dependencies {
api(project(path: ":plastic-asm", configuration: "shadow"))
implementation "org.slf4j:slf4j-api:${versions.slf4j}"
testImplementation "org.junit.jupiter:junit-jupiter:${versions.junitJupiter}"
}
Expand All @@ -9,7 +10,3 @@ test {
useJUnit()
}

// Add the source directory for the imported/repackaged ASM 7.0.1 code

sourceSets.main.java.srcDir "src/external/java"

This file was deleted.

Loading

0 comments on commit ecb81b8

Please sign in to comment.