preprocessor
preprocessor copied to clipboard
A Java+Kotlin source file preprocessor used in the RM to support multiple MC versions
Hey there, I'm currently trying to get the source code from 1.20.4-1.16.5 using Archloom down to 1.12/1.8(/1.7?) using [RetroFuturaGradle](https://github.com/GTNewHorizons/RetroFuturaGradle). Currently, I'm stuck at this step, as preprocessor doesn't seem able...
[here](https://pastebin.com/uUvKx79E) is the stacktrace. I don't really understand it at all xD. ```java ///* //#if MC < 11700 @ModifyExpressionValue( method = "checkEntityChunkPos", at = @At( value = "INVOKE", target =...
In particular, the following should not pass: ``` //#if MC>=12000 //$$ print(used1) //#else#if MC>=11600 //$$ print(used2) //#else //$$ print(used3) //#endif ``` Because 1. That's supposed to be an `elseif` but...
This would allow conditions instead of `MC
When processing sources, it doesn't recognize tab character as valid indentation, only space characters will be recognized as indentation (See `PreprocessTask`) Maybe adding an optional parameter to switch between space...
Shouldn't be better this file stored in the parent project instead of one level of folders up? I think it may cause problems in some cases. https://github.com/ReplayMod/preprocessor/blob/3c46acb326bf4c4c338046991b4835b9d3ecd2ae/src/main/kotlin/com/replaymod/gradle/preprocess/PreprocessPlugin.kt#L30
Sometimes you need to use a specific path in your pattern. For example, when a method is private in other versions you need to import the accessor for it. ```java...
the aim of this PR is to enable [build configuration caching](https://docs.gradle.org/8.7/userguide/configuration_cache.html) into the preprocessor. this substantially improves gradle build times. - gradle bumped with `gradle wrapper --gradle-version=8.7` (for build caching)...