cire
cire
JCHJava Community | Help. Code. Learn.
Created by cire on 12/30/2024 in #java-help
How can I dynamically change a plugin's version depending on certain criteria?
using this
val versionA = "1.0"
val versionB = "2.0"
var pluginVersion = versionA

pluginVersion = project.findProperty("buildingForB")?.let {
if (it == "true") versionB else versionA
} ?: versionA

gradle.taskGraph.whenReady {
if (tasks.contains(task("buildPlatformB")))
pluginVersion = versionB
}

buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("com.example:example-plugin:${pluginVersion]}")
}
}

apply(plugin = "com.example")
val versionA = "1.0"
val versionB = "2.0"
var pluginVersion = versionA

pluginVersion = project.findProperty("buildingForB")?.let {
if (it == "true") versionB else versionA
} ?: versionA

gradle.taskGraph.whenReady {
if (tasks.contains(task("buildPlatformB")))
pluginVersion = versionB
}

buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("com.example:example-plugin:${pluginVersion]}")
}
}

apply(plugin = "com.example")
errors with Unresolved reference: pluginVersion
7 replies
JCHJava Community | Help. Code. Learn.
Created by cire on 12/30/2024 in #java-help
How can I dynamically change a plugin's version depending on certain criteria?
Well I tried using a variable, the same issue occurred and I thought it might be some weird scoping issue, so i tried extra
7 replies
JCHJava Community | Help. Code. Learn.
Created by cire on 10/17/2024 in #java-help
Java agent throws UnsupportedClassVersionError when Instrumentation#retransformClasses is called.
and check logs
86 replies
JCHJava Community | Help. Code. Learn.
Created by cire on 10/17/2024 in #java-help
Java agent throws UnsupportedClassVersionError when Instrumentation#retransformClasses is called.
i think i'll just throw an exception if cancelled param is true
86 replies
JCHJava Community | Help. Code. Learn.
Created by cire on 10/17/2024 in #java-help
Java agent throws UnsupportedClassVersionError when Instrumentation#retransformClasses is called.
i'm only running this for debugging to figure out which plugin is cancelling the event
86 replies
JCHJava Community | Help. Code. Learn.
Created by cire on 10/17/2024 in #java-help
Java agent throws UnsupportedClassVersionError when Instrumentation#retransformClasses is called.
omg im stupid
86 replies
JCHJava Community | Help. Code. Learn.
Created by cire on 10/17/2024 in #java-help
Java agent throws UnsupportedClassVersionError when Instrumentation#retransformClasses is called.
i can just throw the exception and check console
86 replies
JCHJava Community | Help. Code. Learn.
Created by cire on 10/17/2024 in #java-help
Java agent throws UnsupportedClassVersionError when Instrumentation#retransformClasses is called.
i dont even need to printStackTrace
86 replies
JCHJava Community | Help. Code. Learn.
Created by cire on 10/17/2024 in #java-help
Java agent throws UnsupportedClassVersionError when Instrumentation#retransformClasses is called.
💀
86 replies
JCHJava Community | Help. Code. Learn.
Created by cire on 10/17/2024 in #java-help
Java agent throws UnsupportedClassVersionError when Instrumentation#retransformClasses is called.
i'm stupid
86 replies
JCHJava Community | Help. Code. Learn.
Created by cire on 10/17/2024 in #java-help
Java agent throws UnsupportedClassVersionError when Instrumentation#retransformClasses is called.
wait
86 replies
JCHJava Community | Help. Code. Learn.
Created by cire on 10/17/2024 in #java-help
Java agent throws UnsupportedClassVersionError when Instrumentation#retransformClasses is called.
shit
86 replies
JCHJava Community | Help. Code. Learn.
Created by cire on 10/17/2024 in #java-help
Java agent throws UnsupportedClassVersionError when Instrumentation#retransformClasses is called.
ohhhhhh
86 replies
JCHJava Community | Help. Code. Learn.
Created by cire on 10/17/2024 in #java-help
Java agent throws UnsupportedClassVersionError when Instrumentation#retransformClasses is called.
i have to write the dumping in bytecode
86 replies
JCHJava Community | Help. Code. Learn.
Created by cire on 10/17/2024 in #java-help
Java agent throws UnsupportedClassVersionError when Instrumentation#retransformClasses is called.
😒
86 replies
JCHJava Community | Help. Code. Learn.
Created by cire on 10/17/2024 in #java-help
Java agent throws UnsupportedClassVersionError when Instrumentation#retransformClasses is called.
buh
86 replies
JCHJava Community | Help. Code. Learn.
Created by cire on 10/17/2024 in #java-help
Java agent throws UnsupportedClassVersionError when Instrumentation#retransformClasses is called.
[SavageFactionsBugFixAgent] Transforming class PlayerInteractEvent
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401)
Caused by: java.lang.ClassFormatError
at sun.instrument.InstrumentationImpl.retransformClasses0(Native Method)
at sun.instrument.InstrumentationImpl.retransformClasses(InstrumentationImpl.java:144)
at me.cire3.sfbf.SFBFAgentEntryPoint.transform(SFBFAgentEntryPoint.java:41)
at me.cire3.sfbf.SFBFAgentEntryPoint.premain(SFBFAgentEntryPoint.java:19)
... 6 more
FATAL ERROR in native method: processing of -javaagent failed
[SavageFactionsBugFixAgent] Transforming class PlayerInteractEvent
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401)
Caused by: java.lang.ClassFormatError
at sun.instrument.InstrumentationImpl.retransformClasses0(Native Method)
at sun.instrument.InstrumentationImpl.retransformClasses(InstrumentationImpl.java:144)
at me.cire3.sfbf.SFBFAgentEntryPoint.transform(SFBFAgentEntryPoint.java:41)
at me.cire3.sfbf.SFBFAgentEntryPoint.premain(SFBFAgentEntryPoint.java:19)
... 6 more
FATAL ERROR in native method: processing of -javaagent failed
86 replies
JCHJava Community | Help. Code. Learn.
Created by cire on 10/17/2024 in #java-help
Java agent throws UnsupportedClassVersionError when Instrumentation#retransformClasses is called.
thanks
86 replies
JCHJava Community | Help. Code. Learn.
Created by cire on 10/17/2024 in #java-help
Java agent throws UnsupportedClassVersionError when Instrumentation#retransformClasses is called.
ill take a look at that
86 replies
JCHJava Community | Help. Code. Learn.
Created by cire on 10/17/2024 in #java-help
Java agent throws UnsupportedClassVersionError when Instrumentation#retransformClasses is called.
huh
86 replies