Skip to content

Commit

Permalink
Revert "Revert "PIN-4024 Cleaning projects (#12)" (#13)" (#14)
Browse files Browse the repository at this point in the history
This reverts commit 2d32552.

Co-authored-by: Stefano Perazzolo <[email protected]>
  • Loading branch information
galales and beetlecrunch authored Jan 23, 2024
1 parent b2403b8 commit 867cd41
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 1,827 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
run: sbt ++${{ matrix.scala }} test

- name: Compress target directories
run: tar cf targets.tar party-process-client/target party-management-client/target user-registry-client/target selfcare-v2-client/target project/target
run: tar cf targets.tar selfcare-v2-client/target project/target

- name: Upload target directories
uses: actions/upload-artifact@v2
Expand Down
6 changes: 0 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,7 @@ metals.sbt
.metals
.bsp
.openapi-generator
party-management-client/src/
party-process-client/src/
user-registry-client/src/
selfcare-v2-client/src/
.DS_Store
party-process-client/project/build.properties
party-management-client/project/build.properties
user-registry-client/project/build.properties
selfcare-v2-client/project/build.properties
.env
103 changes: 1 addition & 102 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -15,104 +15,7 @@ val projectName = settingKey[String]("The project name prefix derived from the

lazy val root = (project in file("."))
.settings(name := "interop-selfcare-proxy-clients", publish / skip := true)
.aggregate(partyProcessClient, partyManagementClient, userRegistryClient, selfcareV2Client)

cleanFiles += baseDirectory.value / "party-process-client" / "src"
cleanFiles += baseDirectory.value / "party-process-client" / "target"

lazy val partyProcessClient = project
.in(file("party-process-client"))
.settings(
name := "interop-selfcare-party-process-client",
packagePrefix := name.value
.replaceFirst("interop-", "interop.")
.replaceFirst("selfcare-", "selfcare.")
.replaceFirst("party-process-", "partyprocess-.")
.replaceAll("-", ""),
projectName := name.value
.replaceFirst("interop-", "")
.replaceFirst("selfcare-", ""),
generateCode := {
Process(s"""openapi-generator-cli generate -t template/scala-akka-http-client
| -i party-process-client/interface-specification.yml
| -g scala-akka
| -p projectName=${projectName.value}
| -p invokerPackage=it.pagopa.${packagePrefix.value}.invoker
| -p modelPackage=it.pagopa.${packagePrefix.value}.model
| -p apiPackage=it.pagopa.${packagePrefix.value}.api
| -p modelPropertyNaming=original
| -p dateLibrary=java8
| -p entityStrictnessTimeout=15
| -o party-process-client""".stripMargin).!!
},
scalacOptions := Seq(),
libraryDependencies := Dependencies.Jars.client,
updateOptions := updateOptions.value.withGigahorse(false)
)

cleanFiles += baseDirectory.value / "party-management-client" / "src"
cleanFiles += baseDirectory.value / "party-management-client" / "target"

lazy val partyManagementClient = project
.in(file("party-management-client"))
.settings(
name := "interop-selfcare-party-management-client",
packagePrefix := name.value
.replaceFirst("interop-", "interop.")
.replaceFirst("selfcare-", "selfcare.")
.replaceFirst("party-management-", "partymanagement.")
.replaceAll("-", ""),
projectName := name.value
.replaceFirst("interop-", "")
.replaceFirst("selfcare-", ""),
generateCode := {
Process(s"""openapi-generator-cli generate -t template/scala-akka-http-client
| -i party-management-client/interface-specification.yml
| -g scala-akka
| -p projectName=${projectName.value}
| -p invokerPackage=it.pagopa.${packagePrefix.value}.invoker
| -p modelPackage=it.pagopa.${packagePrefix.value}.model
| -p apiPackage=it.pagopa.${packagePrefix.value}.api
| -p modelPropertyNaming=original
| -p dateLibrary=java8
| -o party-management-client""".stripMargin).!!
},
scalacOptions := Seq(),
libraryDependencies := Dependencies.Jars.client,
updateOptions := updateOptions.value.withGigahorse(false)
)

cleanFiles += baseDirectory.value / "user-registry-client" / "src"
cleanFiles += baseDirectory.value / "user-registry-client" / "target"

lazy val userRegistryClient = project
.in(file("user-registry-client"))
.settings(
name := "interop-selfcare-user-registry-client",
packagePrefix := name.value
.replaceFirst("interop-", "interop.")
.replaceFirst("selfcare-", "selfcare.")
.replaceFirst("user-registry-", "userregistry.")
.replaceAll("-", ""),
projectName := name.value
.replaceFirst("interop-", "")
.replaceFirst("selfcare-", ""),
generateCode := {
Process(s"""openapi-generator-cli generate -t template/scala-akka-http-client
| -i user-registry-client/interface-specification.yml
| -g scala-akka
| -p projectName=${projectName.value}
| -p invokerPackage=it.pagopa.${packagePrefix.value}.invoker
| -p modelPackage=it.pagopa.${packagePrefix.value}.model
| -p apiPackage=it.pagopa.${packagePrefix.value}.api
| -p modelPropertyNaming=original
| -p dateLibrary=java8
| -o user-registry-client""".stripMargin).!!
},
scalacOptions := Seq(),
libraryDependencies := Dependencies.Jars.client,
updateOptions := updateOptions.value.withGigahorse(false)
)
.aggregate(selfcareV2Client)

cleanFiles += baseDirectory.value / "selfcare-v2-client" / "src"
cleanFiles += baseDirectory.value / "selfcare-v2-client" / "target"
Expand Down Expand Up @@ -145,9 +48,5 @@ lazy val selfcareV2Client = project
libraryDependencies := Dependencies.Jars.client,
updateOptions := updateOptions.value.withGigahorse(false)
)

(Compile / compile) := ((Compile / compile) dependsOn partyProcessClient / generateCode).value
(Compile / compile) := ((Compile / compile) dependsOn partyManagementClient / generateCode).value
(Compile / compile) := ((Compile / compile) dependsOn userRegistryClient / generateCode).value
(Compile / compile) := ((Compile / compile) dependsOn selfcareV2Client / generateCode).value

27 changes: 0 additions & 27 deletions party-management-client/.openapi-generator-ignore

This file was deleted.

Loading

0 comments on commit 867cd41

Please sign in to comment.