Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Move cli to presentation #1774

Merged
merged 2 commits into from
Apr 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

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,6 @@
package ftl.cli
package ftl.presentation.cli

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

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
@@ -1,10 +1,10 @@
package ftl.cli.firebase
package ftl.presentation.cli.firebase

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.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.PrintHelp
import picocli.CommandLine.Command

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.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
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.DescribeAndroidTestEnvironment
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.versions.AndroidVersionsDescribeCommand
import ftl.cli.firebase.test.android.versions.AndroidVersionsListCommand
import ftl.presentation.cli.firebase.test.android.versions.AndroidVersionsDescribeCommand
import ftl.presentation.cli.firebase.test.android.versions.AndroidVersionsListCommand
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.locales
package ftl.presentation.cli.firebase.test.android.locales

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

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

import ftl.config.FtlConstants
import ftl.domain.DescribeAndroidModels
Expand Down
Loading