Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
build: distinguish between compile, runtime and test dependencies (#2028
)

* add missing dependencies

* add sbt cancelation setting

* remove unused and doubled stuff

* remove suggested by the plugin deps unused during compile time

* manage runtime deps

* hide recently added deps suggested by plugin

* bring back rdf4jClient

* PR2018 fix

* simplify deps structure

* add project specific deps containers

Co-authored-by: Ivan Subotic <400790+subotic@users.noreply.github.com>
  • Loading branch information
mpro7 and subotic committed Mar 31, 2022
1 parent 8a30894 commit 7cb326f
Show file tree
Hide file tree
Showing 3 changed files with 189 additions and 213 deletions.
23 changes: 11 additions & 12 deletions build.sbt
Expand Up @@ -15,6 +15,9 @@ import scala.sys.process.Process
// GLOBAL SETTINGS
//////////////////////////////////////

// when true enables run cancellation w/o exiting sbt
cancelable in Global := true

lazy val aggregatedProjects: Seq[ProjectReference] = Seq(webapi, sipi)

lazy val buildSettings = Seq(
Expand Down Expand Up @@ -93,10 +96,6 @@ lazy val webApiCommonSettings = Seq(
name := "webapi"
)

// GatlingPlugin - load testing
// JavaAgent - adds AspectJ Weaver configuration
// BuildInfoPlugin - allows generation of scala code with version information

lazy val webapi: Project = Project(id = "webapi", base = file("webapi"))
.settings(buildSettings)
.enablePlugins(SbtTwirl, JavaAppPackaging, DockerPlugin, GatlingPlugin, JavaAgent, RevolverPlugin, BuildInfoPlugin)
Expand All @@ -105,7 +104,7 @@ lazy val webapi: Project = Project(id = "webapi", base = file("webapi"))
resolvers ++= Seq(
Resolver.bintrayRepo("hseeberger", "maven")
),
Dependencies.webapiLibraryDependencies
libraryDependencies ++= Dependencies.webapiLibraryDependencies
)
.settings(
inConfig(Test)(Defaults.testTasks ++ baseAssemblySettings)
Expand Down Expand Up @@ -138,7 +137,7 @@ lazy val webapi: Project = Project(id = "webapi", base = file("webapi"))
"-javaagent:" + resolved.artifact.absolutePath + resolved.agent.arguments
}, // allows sbt-javaagent to work with sbt-revolver
reStart / javaOptions ++= webapiJavaRunOptions,
javaAgents += Dependencies.Compile.aspectJWeaver,
javaAgents += Dependencies.aspectJWeaver,
fork := true, // run tests in a forked JVM
Test / testForkedParallel := false, // run forked tests in parallel
Test / parallelExecution := false, // run non-forked tests in parallel
Expand Down Expand Up @@ -224,7 +223,7 @@ lazy val apiMain = project
.in(file("dsp-api-main"))
.settings(
name := "dsp-api-main",
Dependencies.webapiLibraryDependencies,
libraryDependencies ++= Dependencies.dspApiMainLibraryDependencies,
testFrameworks := Seq(new TestFramework("zio.test.sbt.ZTestFramework"))
)
.dependsOn(schemaCore, schemaRepo, schemaApi)
Expand All @@ -233,7 +232,7 @@ lazy val schemaApi = project
.in(file("dsp-schema/api"))
.settings(
name := "schemaApi",
Dependencies.webapiLibraryDependencies,
libraryDependencies ++= Dependencies.schemaApiLibraryDependencies,
testFrameworks := Seq(new TestFramework("zio.test.sbt.ZTestFramework"))
)
.dependsOn(schemaCore)
Expand All @@ -242,15 +241,15 @@ lazy val schemaCore = project
.in(file("dsp-schema/core"))
.settings(
name := "schemaCore",
Dependencies.webapiLibraryDependencies,
libraryDependencies ++= Dependencies.schemaCoreLibraryDependencies,
testFrameworks := Seq(new TestFramework("zio.test.sbt.ZTestFramework"))
)

lazy val schemaRepo = project
.in(file("dsp-schema/repo"))
.settings(
name := "schemaRepo",
Dependencies.webapiLibraryDependencies,
libraryDependencies ++= Dependencies.schemaRepoLibraryDependencies,
testFrameworks := Seq(new TestFramework("zio.test.sbt.ZTestFramework"))
)
.dependsOn(schemaCore)
Expand All @@ -259,7 +258,7 @@ lazy val schemaRepoEventStoreService = project
.in(file("dsp-schema/repo-eventstore-service"))
.settings(
name := "schemaRepoEventstoreService",
Dependencies.webapiLibraryDependencies,
libraryDependencies ++= Dependencies.schemaRepoEventStoreServiceLibraryDependencies,
testFrameworks := Seq(new TestFramework("zio.test.sbt.ZTestFramework"))
)
.dependsOn(schemaRepo)
Expand All @@ -268,7 +267,7 @@ lazy val schemaRepoSearchService = project
.in(file("dsp-schema/repo-search-service"))
.settings(
name := "dsp-schema-repo-search-service",
Dependencies.webapiLibraryDependencies,
libraryDependencies ++= Dependencies.schemaRepoSearchServiceLibraryDependencies,
testFrameworks := Seq(new TestFramework("zio.test.sbt.ZTestFramework"))
)
.dependsOn(schemaRepo)
2 changes: 1 addition & 1 deletion docs/02-knora-ontologies/knora-base.md
Expand Up @@ -50,7 +50,7 @@ the `kb:isInProject` property, as described in
### Ontologies

Each user-created ontology must be defined as an `owl:Ontology` with the properties `rdfs:label` and `kb:attachedToProject`.
Since [DSP-API v19](https://github.com/dasch-swiss/dsp-api/releases/tag/v19.0.0) `kb:lastModificationDate` property is also required.
Since [DSP-API v20](https://github.com/dasch-swiss/dsp-api/releases/tag/v20.0.0) `kb:lastModificationDate` property is also required.

### Resources

Expand Down

0 comments on commit 7cb326f

Please sign in to comment.