Skip to content

Commit

Permalink
add to toFlags
Browse files Browse the repository at this point in the history
  • Loading branch information
wagyourtail committed Dec 7, 2024
1 parent 97d6f74 commit ff6dd80
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import org.gradle.api.JavaVersion
import xyz.wagyourtail.jvmdg.cli.Flags
import xyz.wagyourtail.jvmdg.logging.Logger
import xyz.wagyourtail.jvmdg.util.toOpcode
import xyz.wagyourtail.jvmdg.version.map.FullyQualifiedMemberNameAndDesc

fun DowngradeFlags.toFlags(): Flags {
val flags = Flags()
Expand All @@ -13,6 +14,7 @@ fun DowngradeFlags.toFlags(): Flags {
flags.logLevel = Logger.Level.valueOf(logLevel.getOrElse("INFO").uppercase())
flags.printDebug = debug.getOrElse(false)
flags.classVersion = downgradeTo.getOrElse(JavaVersion.VERSION_1_8).toOpcode()
flags.debugSkipStub = debugSkipStub.getOrElse(emptySet()).map { FullyQualifiedMemberNameAndDesc.of(it) }.toSet()
flags.debugSkipStubs = debugSkipStubs.getOrElse(emptySet()).map { it.toOpcode() }.toSet()
ignoreWarningsIn.getOrElse(emptyList()).forEach { flags.addIgnore(it) }
flags.debugDumpClasses = debugDumpClasses.getOrElse(false)
Expand Down

0 comments on commit ff6dd80

Please sign in to comment.