Skip to content

Commit

Permalink
Update core usages in cli module
Browse files Browse the repository at this point in the history
  • Loading branch information
mr3y-the-programmer committed Jun 15, 2024
1 parent c12ee30 commit ccdf1e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 1 addition & 4 deletions cli/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,12 @@ application {
mainClass.set(mainCliClassName)
}

repositories {
mavenCentral()
}

dependencies {
implementation(project(":core"))
implementation(project(":report-generator"))

implementation(kotlin("stdlib"))
implementation(libs.okio)
implementation(libs.kotlinx.cli)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import kotlinx.cli.ArgParser
import kotlinx.cli.ArgType
import kotlinx.cli.default
import kotlinx.cli.required
import okio.Path.Companion.toOkioPath
import java.io.File
import java.nio.file.Path
import java.nio.file.Paths
Expand Down Expand Up @@ -205,10 +206,10 @@ class CliArguments(args: Array<String>, private val path: Path) {
}

private fun getRawReportProviderFromDirectory(directory: String): ComposeCompilerRawReportProvider.FromDirectory {
return ComposeCompilerRawReportProvider.FromDirectory(File(Paths.get(directory).toAbsolutePath().toString()))
return ComposeCompilerRawReportProvider.FromDirectory(File(Paths.get(directory).toAbsolutePath().toString()).toOkioPath())
}

private fun files(filenames: String): List<File> {
private fun files(filenames: String): List<okio.Path> {
return filenames.split(",").map { ensureFileExists(it) { "File not exist: $it" } }
}
}
Expand Down

0 comments on commit ccdf1e2

Please sign in to comment.