From 31689bb7d308ae27abca37d4c44b116d44fac194 Mon Sep 17 00:00:00 2001 From: Graham Date: Thu, 18 Feb 2021 21:35:32 +0000 Subject: [PATCH] Update dependencies Signed-off-by: Graham --- buildSrc/src/main/kotlin/Versions.kt | 4 ++-- .../kotlin/org/openrs2/deob/ast/Library.kt | 21 ++++++++++++------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/Versions.kt index a254784375..2fb5da433a 100644 --- a/buildSrc/src/main/kotlin/Versions.kt +++ b/buildSrc/src/main/kotlin/Versions.kt @@ -15,7 +15,7 @@ object Versions { const val h2 = "1.4.200" const val inlineLogger = "1.0.3" const val jackson = "2.12.1" - const val javaParser = "3.18.0" + const val javaParser = "3.19.0" const val jdom = "2.0.6" const val jgrapht = "1.5.0" const val jimfs = "1.2" @@ -28,7 +28,7 @@ object Versions { const val netty = "4.1.59.Final" const val nettyIoUring = "0.0.4.Final" const val openrs2Natives = "3.2.0" - const val postgres = "42.2.18" + const val postgres = "42.2.19" const val shadowPlugin = "6.1.0" const val thymeleaf = "3.0.12.RELEASE" const val thymeleafJava8Time = "3.0.4.RELEASE" diff --git a/deob-ast/src/main/kotlin/org/openrs2/deob/ast/Library.kt b/deob-ast/src/main/kotlin/org/openrs2/deob/ast/Library.kt index b1983915de..599d4631fd 100644 --- a/deob-ast/src/main/kotlin/org/openrs2/deob/ast/Library.kt +++ b/deob-ast/src/main/kotlin/org/openrs2/deob/ast/Library.kt @@ -2,8 +2,14 @@ package org.openrs2.deob.ast import com.github.javaparser.ParserConfiguration import com.github.javaparser.ast.CompilationUnit -import com.github.javaparser.printer.PrettyPrinter -import com.github.javaparser.printer.PrettyPrinterConfiguration +import com.github.javaparser.printer.DefaultPrettyPrinter +import com.github.javaparser.printer.configuration.DefaultConfigurationOption +import com.github.javaparser.printer.configuration.DefaultPrinterConfiguration +import com.github.javaparser.printer.configuration.DefaultPrinterConfiguration.ConfigOption.INDENTATION +import com.github.javaparser.printer.configuration.DefaultPrinterConfiguration.ConfigOption.INDENT_CASE_IN_SWITCH +import com.github.javaparser.printer.configuration.DefaultPrinterConfiguration.ConfigOption.ORDER_IMPORTS +import com.github.javaparser.printer.configuration.Indentation +import com.github.javaparser.printer.configuration.Indentation.IndentType.TABS_WITH_SPACE_ALIGN import com.github.javaparser.symbolsolver.JavaSymbolSolver import com.github.javaparser.symbolsolver.resolution.typesolvers.ClassLoaderTypeSolver import com.github.javaparser.symbolsolver.resolution.typesolvers.CombinedTypeSolver @@ -45,12 +51,11 @@ public class Library( private val PC_ANNOTATION_REGEX = Regex("@Pc\\(([0-9]+)\\)\\s+") private val printer = Function( - PrettyPrinter( - PrettyPrinterConfiguration() - .setIndentType(PrettyPrinterConfiguration.IndentType.TABS_WITH_SPACE_ALIGN) - .setIndentSize(1) - .setIndentCaseInSwitch(false) - .setOrderImports(true) + DefaultPrettyPrinter( + DefaultPrinterConfiguration() + .addOption(DefaultConfigurationOption(INDENTATION, Indentation(TABS_WITH_SPACE_ALIGN, 1))) + .addOption(DefaultConfigurationOption(INDENT_CASE_IN_SWITCH, false)) + .addOption(DefaultConfigurationOption(ORDER_IMPORTS, true)) )::print ).andThen(::stripNewlineAfterPcAnnotation)