File tree Expand file tree Collapse file tree
src/main/java/org/fury_phoenix/mixinAp/annotation Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ dependencies {
3030}
3131
3232tasks. withType(JavaCompile ) {
33- options. release = 21
33+ options. release = 17
3434}
3535
3636shadowJar {
Original file line number Diff line number Diff line change @@ -90,24 +90,19 @@ private boolean targetsClient(Collection<?> classTargets) {
9090 }
9191
9292 private boolean targetsClient (Object classTarget ) {
93- return switch (classTarget ) {
94- case TypeElement te ->
95- isClientMarked (te );
96- case TypeMirror tm -> {
97- var el = types .asElement (tm );
98- yield el != null ? targetsClient (el ) : warn ("TypeMirror of " + tm );
99- }
100- // If you're using a dollar sign in class names you are insane
101- case String s -> {
102- var te =
103- elemUtils .getTypeElement (toSourceString (s .split ("\\ $" )[0 ]));
104- yield te != null ? targetsClient (te ) : warn (s );
105- }
106- default ->
107- throw new IllegalArgumentException ("Unhandled type: "
93+ if (classTarget instanceof TypeElement te ) {
94+ return isClientMarked (te );
95+ } else if (classTarget instanceof TypeMirror tm ) {
96+ var el = types .asElement (tm );
97+ return el != null ? targetsClient (el ) : warn ("TypeMirror of " + tm );
98+ } else if (classTarget instanceof String s ) {
99+ var te = elemUtils .getTypeElement (toSourceString (s .split ("\\ $" )[0 ]));
100+ return te != null ? targetsClient (te ) : warn (s );
101+ } else {
102+ throw new IllegalArgumentException ("Unhandled type: "
108103 + classTarget .getClass () + "\n " + "Stringified contents: "
109104 + classTarget .toString ());
110- };
105+ }
111106 }
112107
113108 private boolean isClientMarked (TypeElement te ) {
Original file line number Diff line number Diff line change @@ -91,12 +91,7 @@ tasks.named<Jar>("jar") {
9191 ))
9292}
9393
94- // We must force the Java 21 compiler to be used because our AP requires Java 21
95-
9694java {
97- toolchain {
98- languageVersion = JavaLanguageVersion .of(21 )
99- }
10095 val curSourceCompatLevel = JavaVersion .VERSION_17
10196 sourceCompatibility = curSourceCompatLevel
10297 targetCompatibility = curSourceCompatLevel
You can’t perform that action at this time.
0 commit comments