Skip to content

Commit

Permalink
actually fix it
Browse files Browse the repository at this point in the history
  • Loading branch information
wagyourtail committed Jun 6, 2024
1 parent 8aa0c90 commit 51c8871
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 3 deletions.
6 changes: 6 additions & 0 deletions ExpectPlatform.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="CheckStyle-IDEA-Module" serialisationVersion="2">
<option name="activeLocationsIds" />
</component>
</module>
2 changes: 1 addition & 1 deletion expect-platform-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ buildscript {
}
}
dependencies {
classpath "xyz.wagyourtail.unimined.expect-platform:expect-platform:1.0.0"
classpath "xyz.wagyourtail.unimined.expect-platform:expect-platform:1.0.2"
classpath "org.ow2.asm:asm-tree:9.7"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@ public static String platformTest(String name) {
return "Hello a! " + name;
}

public static String platformTest2(String name) {
return "Goodbye a! " + name;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ public static String platformTest(String name) {
return "Hello b! " + name;
}

public static String platformTest2(String name) {
return "Goodbye b! " + name;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package xyz.wagyourtail.ept.c;

public class MainImpl {

public static String platformTest2(String name) {
return "Goodbye c! " + name;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public static void main(String[] args) {
Target.getCurrentTarget();

System.out.println(platformTest("test"));
System.out.println(platformTest2("test"));

try {
Main.class.getDeclaredMethod("platformOnlyTest");
Expand All @@ -32,6 +33,12 @@ public static String platformTest(String name) {
throw new AssertionError();
}


@ExpectPlatform
public static String platformTest2(String name) {
throw new AssertionError();
}

@PlatformOnly({"a", "b"})
public static void platformOnlyTest() {
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
kotlin.code.style=official

version = 1.0.1
version = 1.0.2

asmVersion=9.7
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class TransformPlatform(val platformName: String) {
}

@Suppress("UNCHECKED_CAST")
val platforms = annotation.values[1] as? List<AnnotationNode>
val platforms = annotation.values?.get(1) as? List<AnnotationNode>

var platformClass: String? = null

Expand Down

0 comments on commit 51c8871

Please sign in to comment.