Skip to content

Commit

Permalink
KSP2 command line tool: exit with exit code
Browse files Browse the repository at this point in the history
  • Loading branch information
ting-yuan committed Nov 14, 2024
1 parent 755cba4 commit 58bf5ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import com.google.devtools.ksp.processing.KspGradleLogger
import com.google.devtools.ksp.processing.SymbolProcessorProvider
import com.google.devtools.ksp.processing.kspJvmArgParser
import com.google.devtools.ksp.processing.kspJvmArgParserHelp
import kotlin.system.exitProcess
import java.io.File
import java.net.URLClassLoader
import java.util.ServiceLoader
Expand Down Expand Up @@ -45,5 +46,6 @@ internal fun runWithArgs(args: Array<String>, parse: (Array<String>) -> Pair<KSP
)
.toList() as List<SymbolProcessorProvider>

KotlinSymbolProcessing(config, processorProviders, logger).execute()
val exitCode = KotlinSymbolProcessing(config, processorProviders, logger).execute()
exitProcess(exitCode.code)
}
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class KotlinSymbolProcessing(
val logger: KSPLogger
) {
enum class ExitCode(
@Suppress("UNUSED_PARAMETER") code: Int
val code: Int
) {
OK(0),

Expand Down

0 comments on commit 58bf5ad

Please sign in to comment.