Skip to content

Commit

Permalink
Move cli to presentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Sloox authored and mergify-bot committed Apr 6, 2021
1 parent 3820f25 commit 9cb1c52
Show file tree
Hide file tree
Showing 91 changed files with 205 additions and 185 deletions.
2 changes: 1 addition & 1 deletion test_runner/src/main/kotlin/ftl/Main.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package ftl

import ftl.cli.MainCommand
import ftl.presentation.cli.MainCommand
import ftl.run.exception.withGlobalExceptionHandling
import picocli.CommandLine

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ package ftl.args

import com.google.common.annotations.VisibleForTesting
import ftl.args.yml.mergeYmlKeys
import ftl.cli.firebase.test.android.AndroidRunCommand
import ftl.config.android.AndroidFlankConfig
import ftl.config.android.AndroidGcloudConfig
import ftl.config.common.CommonFlankConfig
import ftl.config.common.CommonGcloudConfig
import ftl.config.defaultAndroidConfig
import ftl.config.loadAndroidConfig
import ftl.config.plus
import ftl.presentation.cli.firebase.test.android.AndroidRunCommand
import ftl.util.loadFile
import java.io.Reader
import java.nio.file.Files
Expand Down
2 changes: 1 addition & 1 deletion test_runner/src/main/kotlin/ftl/args/IosArgsCompanion.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ package ftl.args

import com.google.common.annotations.VisibleForTesting
import ftl.args.yml.mergeYmlKeys
import ftl.cli.firebase.test.ios.IosRunCommand
import ftl.config.common.CommonFlankConfig
import ftl.config.common.CommonGcloudConfig
import ftl.config.defaultIosConfig
import ftl.config.ios.IosFlankConfig
import ftl.config.ios.IosGcloudConfig
import ftl.config.loadIosConfig
import ftl.config.plus
import ftl.presentation.cli.firebase.test.ios.IosRunCommand
import ftl.util.loadFile
import java.io.Reader
import java.nio.file.Files
Expand Down
23 changes: 0 additions & 23 deletions test_runner/src/main/kotlin/ftl/cli/firebase/TestCommand.kt

This file was deleted.

This file was deleted.

27 changes: 0 additions & 27 deletions test_runner/src/main/kotlin/ftl/cli/firebase/test/IosCommand.kt

This file was deleted.

4 changes: 2 additions & 2 deletions test_runner/src/main/kotlin/ftl/config/Create.kt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package ftl.config

import ftl.cli.firebase.test.android.AndroidRunCommand
import ftl.cli.firebase.test.ios.IosRunCommand
import ftl.config.android.AndroidFlankConfig
import ftl.config.android.AndroidGcloudConfig
import ftl.config.common.CommonFlankConfig
import ftl.config.common.CommonGcloudConfig
import ftl.config.ios.IosFlankConfig
import ftl.config.ios.IosGcloudConfig
import ftl.presentation.cli.firebase.test.android.AndroidRunCommand
import ftl.presentation.cli.firebase.test.ios.IosRunCommand
import kotlin.properties.ReadOnlyProperty

fun defaultAndroidConfig() = AndroidConfig(
Expand Down
2 changes: 1 addition & 1 deletion test_runner/src/main/kotlin/ftl/domain/RunDoctorAndroid.kt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package ftl.domain

import ftl.args.AndroidArgs
import ftl.cli.firebase.test.processValidation
import ftl.doctor.validateYaml
import ftl.presentation.cli.firebase.test.processValidation
import java.nio.file.Paths

interface RunDoctorAndroid {
Expand Down
2 changes: 1 addition & 1 deletion test_runner/src/main/kotlin/ftl/domain/RunDoctorIos.kt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package ftl.domain

import ftl.args.IosArgs
import ftl.cli.firebase.test.processValidation
import ftl.doctor.validateYaml
import ftl.presentation.cli.firebase.test.processValidation
import java.nio.file.Paths

interface RunDoctorIos {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package ftl.cli
package ftl.presentation.cli

import ftl.cli.auth.LoginCommand
import ftl.util.PrintHelp
import picocli.CommandLine.Command

Expand All @@ -9,7 +8,7 @@ import picocli.CommandLine.Command
synopsisHeading = "%n",
header = ["Manage oauth2 credentials for Google Cloud"],
subcommands = [
LoginCommand::class
ftl.presentation.cli.auth.LoginCommand::class
],
usageHelpAutoWidth = true
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package ftl.cli
package ftl.presentation.cli

import ftl.cli.firebase.CancelCommand
import ftl.cli.firebase.RefreshCommand
import ftl.cli.firebase.TestCommand
import ftl.presentation.cli.firebase.CancelCommand
import ftl.presentation.cli.firebase.RefreshCommand
import ftl.presentation.cli.firebase.TestCommand
import ftl.util.PrintHelp
import picocli.CommandLine.Command

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package ftl.cli
package ftl.presentation.cli

import ftl.cli.firebase.CancelCommand
import ftl.cli.firebase.RefreshCommand
import ftl.cli.firebase.test.AndroidCommand
import ftl.cli.firebase.test.IPBlocksCommand
import ftl.cli.firebase.test.IosCommand
import ftl.cli.firebase.test.NetworkProfilesCommand
import ftl.cli.firebase.test.ProvidedSoftwareCommand
import ftl.log.setDebugLogging
import ftl.presentation.cli.firebase.CancelCommand
import ftl.presentation.cli.firebase.RefreshCommand
import ftl.presentation.cli.firebase.test.AndroidCommand
import ftl.presentation.cli.firebase.test.IPBlocksCommand
import ftl.presentation.cli.firebase.test.IosCommand
import ftl.presentation.cli.firebase.test.NetworkProfilesCommand
import ftl.presentation.cli.firebase.test.ProvidedSoftwareCommand
import ftl.util.printVersionInfo
import picocli.CommandLine

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ftl.cli.auth
package ftl.presentation.cli.auth

import ftl.domain.LoginGoogleAccount
import ftl.domain.invoke
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ftl.cli.firebase
package ftl.presentation.cli.firebase

import ftl.domain.CancelLastRun
import ftl.domain.invoke
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ftl.cli.firebase
package ftl.presentation.cli.firebase

import ftl.domain.RefreshLastRun
import ftl.domain.invoke
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package ftl.presentation.cli.firebase

import ftl.presentation.cli.firebase.test.IPBlocksCommand
import ftl.presentation.cli.firebase.test.IosCommand
import ftl.presentation.cli.firebase.test.NetworkProfilesCommand
import ftl.presentation.cli.firebase.test.ProvidedSoftwareCommand
import ftl.util.PrintHelp
import picocli.CommandLine.Command

@Command(
name = "test",
synopsisHeading = "",
subcommands = [
ftl.presentation.cli.firebase.test.AndroidCommand::class,
IosCommand::class,
NetworkProfilesCommand::class,
ProvidedSoftwareCommand::class,
IPBlocksCommand::class
],
usageHelpAutoWidth = true
)
class TestCommand : PrintHelp
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package ftl.presentation.cli.firebase.test

import ftl.presentation.cli.firebase.test.android.AndroidDoctorCommand
import ftl.presentation.cli.firebase.test.android.AndroidLocalesCommand
import ftl.presentation.cli.firebase.test.android.AndroidModelsCommand
import ftl.presentation.cli.firebase.test.android.AndroidOrientationsCommand
import ftl.presentation.cli.firebase.test.android.AndroidRunCommand
import ftl.presentation.cli.firebase.test.android.AndroidTestEnvironmentCommand
import ftl.presentation.cli.firebase.test.android.AndroidVersionsCommand
import ftl.util.PrintHelp
import picocli.CommandLine.Command

@Command(
name = "android",
synopsisHeading = "",
subcommands = [
AndroidRunCommand::class,
AndroidDoctorCommand::class,
AndroidModelsCommand::class,
AndroidVersionsCommand::class,
AndroidOrientationsCommand::class,
AndroidLocalesCommand::class,
AndroidTestEnvironmentCommand::class
],
usageHelpAutoWidth = true
)
class AndroidCommand : PrintHelp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ftl.cli.firebase.test
package ftl.presentation.cli.firebase.test

import flank.common.logLn
import ftl.args.yml.YamlDeprecated
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ftl.cli.firebase.test
package ftl.presentation.cli.firebase.test

import ftl.config.Config
import ftl.config.android.AndroidGcloudConfig
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package ftl.cli.firebase.test
package ftl.presentation.cli.firebase.test

import ftl.cli.firebase.test.ipblocks.IPBlocksListCommand
import ftl.presentation.cli.firebase.test.ipblocks.IPBlocksListCommand
import ftl.util.PrintHelp
import picocli.CommandLine

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package ftl.presentation.cli.firebase.test

import ftl.presentation.cli.firebase.test.ios.IosDoctorCommand
import ftl.presentation.cli.firebase.test.ios.IosLocalesCommand
import ftl.presentation.cli.firebase.test.ios.IosModelsCommand
import ftl.presentation.cli.firebase.test.ios.IosOrientationsCommand
import ftl.presentation.cli.firebase.test.ios.IosRunCommand
import ftl.presentation.cli.firebase.test.ios.IosTestEnvironmentCommand
import ftl.presentation.cli.firebase.test.ios.IosVersionsCommand
import ftl.util.PrintHelp
import picocli.CommandLine.Command

@Command(
name = "ios",
synopsisHeading = "",
subcommands = [
IosRunCommand::class,
IosDoctorCommand::class,
IosModelsCommand::class,
IosVersionsCommand::class,
IosLocalesCommand::class,
IosTestEnvironmentCommand::class,
IosOrientationsCommand::class
],
usageHelpAutoWidth = true
)
class IosCommand : PrintHelp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ftl.cli.firebase.test
package ftl.presentation.cli.firebase.test

import ftl.cli.firebase.test.networkprofiles.NetworkProfilesDescribeCommand
import ftl.cli.firebase.test.networkprofiles.NetworkProfilesListCommand
import ftl.presentation.cli.firebase.test.networkprofiles.NetworkProfilesDescribeCommand
import ftl.presentation.cli.firebase.test.networkprofiles.NetworkProfilesListCommand
import ftl.util.PrintHelp
import picocli.CommandLine

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package ftl.cli.firebase.test
package ftl.presentation.cli.firebase.test

import ftl.cli.firebase.test.providedsoftware.ProvidedSoftwareListCommand
import ftl.presentation.cli.firebase.test.providedsoftware.ProvidedSoftwareListCommand
import ftl.util.PrintHelp
import picocli.CommandLine

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ftl.cli.firebase.test.android
package ftl.presentation.cli.firebase.test.android

import ftl.config.FtlConstants
import ftl.domain.RunDoctorAndroid
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ftl.cli.firebase.test.android
package ftl.presentation.cli.firebase.test.android

import ftl.cli.firebase.test.android.locales.AndroidLocalesDescribeCommand
import ftl.cli.firebase.test.android.locales.AndroidLocalesListCommand
import ftl.presentation.cli.firebase.test.android.locales.AndroidLocalesDescribeCommand
import ftl.presentation.cli.firebase.test.android.locales.AndroidLocalesListCommand
import ftl.util.PrintHelp
import picocli.CommandLine

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ftl.cli.firebase.test.android
package ftl.presentation.cli.firebase.test.android

import ftl.cli.firebase.test.android.models.AndroidModelDescribeCommand
import ftl.cli.firebase.test.android.models.AndroidModelsListCommand
import ftl.presentation.cli.firebase.test.android.models.AndroidModelDescribeCommand
import ftl.presentation.cli.firebase.test.android.models.AndroidModelsListCommand
import ftl.util.PrintHelp
import picocli.CommandLine

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package ftl.cli.firebase.test.android
package ftl.presentation.cli.firebase.test.android

import ftl.cli.firebase.test.android.orientations.AndroidOrientationsListCommand
import ftl.presentation.cli.firebase.test.android.orientations.AndroidOrientationsListCommand
import ftl.util.PrintHelp
import picocli.CommandLine

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package ftl.cli.firebase.test.android
package ftl.presentation.cli.firebase.test.android

import ftl.cli.firebase.test.CommonRunCommand
import ftl.config.FtlConstants
import ftl.config.android.AndroidFlankConfig
import ftl.config.android.AndroidGcloudConfig
import ftl.config.createConfiguration
import ftl.domain.RunTestAndroid
import ftl.domain.invoke
import ftl.presentation.cli.firebase.test.CommonRunCommand
import ftl.run.ANDROID_SHARD_FILE
import picocli.CommandLine
import picocli.CommandLine.Command
Expand Down
Loading

0 comments on commit 9cb1c52

Please sign in to comment.