cabal-version:       2.4
name:                life-sync
version:             1.1.0.0
synopsis:            Synchronize personal configs across multiple machines.
description:         Synchronize personal configs across multiple machines.
                     See README for more details.
homepage:            https://github.com/kowainik/life-sync
bug-reports:         https://github.com/kowainik/life-sync/issues
license:             MPL-2.0
license-file:        LICENSE
author:              Dmitrii Kovanikov, Veronika Romashkina
maintainer:          Kowainik <xrom.xkov@gmail.com>
copyright:           2018-2020 Kowainik
category:            Configuration, CLI, CLI Tool, Development
stability:           experimental
build-type:          Simple
extra-doc-files:     README.md
                     CHANGELOG.md
tested-with:         GHC == 8.8.3

source-repository head
  type:                git
  location:            https://github.com/kowainik/life-sync.git

common common-options
  build-depends:       base ^>= 4.13.0.0
                     , relude ^>= 0.6.0.0

  mixins:              base hiding (Prelude)
                     , relude (Relude as Prelude
                              , Relude.Extra.Lens
                              , Relude.Unsafe
                              )

  ghc-options:         -Wall
                       -Wincomplete-uni-patterns
                       -Wincomplete-record-updates
                       -Wcompat
                       -Widentities
                       -Wredundant-constraints
                       -fhide-source-paths
                       -Wmissing-export-lists
                       -Wpartial-fields
  if impl(ghc >= 8.8.1)
    ghc-options:       -Wmissing-deriving-strategies
                       -Werror=missing-deriving-strategies

  default-language:    Haskell2010
  default-extensions:  ConstraintKinds
                       DeriveGeneric
                       DerivingStrategies
                       GeneralizedNewtypeDeriving
                       InstanceSigs
                       KindSignatures
                       LambdaCase
                       OverloadedStrings
                       RecordWildCards
                       ScopedTypeVariables
                       StandaloneDeriving
                       TupleSections
                       TypeApplications
                       ViewPatterns

library
  import:              common-options
  hs-source-dirs:      src

  exposed-modules:     Life.Cli
                       Life.Configuration
                       Life.Core
                       Life.Github
                       Life.Main
                         Life.Main.Add
                         Life.Main.Init
                         Life.Main.Pull
                         Life.Main.Push
                         Life.Main.Remove
                       Life.Message
                       Life.Path

  build-depends:       bytestring
                     , colourista ^>= 0.0.0.0
                     , containers
                     , exceptions
                     , optparse-applicative ^>= 0.15
                     , path
                     , path-io
                     , process
                     , shellmet ^>= 0.0.3.0
                     , text ^>= 1.2
                     , tomland ^>= 1.2.1.0
                     , validation-selective ^>= 0.0.0.0

executable life
  import:              common-options
  hs-source-dirs:      app
  main-is:             Main.hs
  build-depends:       life-sync
  ghc-options:         -threaded -rtsopts -with-rtsopts=-N

test-suite life-sync-test
  import:              common-options
  type:                exitcode-stdio-1.0
  hs-source-dirs:      test
  main-is:             Spec.hs
  other-modules:       Test.Configuration
  ghc-options:         -threaded -rtsopts -with-rtsopts=-N

  build-depends:       life-sync
                     , containers
                     , filepath ^>= 1.4
                     , hedgehog ^>= 1.0
                     , hspec ^>= 2.7.1
                     , hspec-hedgehog ^>= 0.0.1.1
                     , path
                     , text