summaryrefslogtreecommitdiff
path: root/api/build.gradle
diff options
context:
space:
mode:
authorMike Vink <mike1994vink@gmail.com>2021-06-25 12:56:04 +0200
committerMike Vink <mike1994vink@gmail.com>2021-06-25 12:56:04 +0200
commit6bd8d0345e3ac653c3fad4f1c7a6352e8a4a166e (patch)
treef142d3f43add40c2dd56bc496d6b4ab497f31a3e /api/build.gradle
parent38d59e2876b9f4d7c589d58295ef8acdf336a45b (diff)
parent102b25f18d9b269c58d15677f10cd71c15003c4b (diff)
Merge branch 'mvcFeature' into mainline
Diffstat (limited to 'api/build.gradle')
-rw-r--r--api/build.gradle50
1 files changed, 50 insertions, 0 deletions
diff --git a/api/build.gradle b/api/build.gradle
new file mode 100644
index 0000000..6dc681a
--- /dev/null
+++ b/api/build.gradle
@@ -0,0 +1,50 @@
+
+plugins {
+ id 'java'
+ // This time we're building a command-line executable application.
+ id 'application'
+}
+
+repositories {
+ jcenter()
+}
+
+dependencies {
+
+ // Use the Jersey framework to make writing and testing servlets easier.
+ implementation 'org.glassfish.jersey.containers:jersey-container-servlet-core:+'
+ implementation 'org.glassfish.jersey.containers:jersey-container-jetty-http:+'
+ implementation 'org.glassfish.jersey.core:jersey-server:+'
+ implementation 'org.glassfish.jersey.inject:jersey-hk2:+'
+ implementation 'org.glassfish.jersey.media:jersey-media-json-jackson:+'
+ // Use Jakarta (Java EE) for the servlet primitives.
+ implementation 'jakarta.servlet:jakarta.servlet-api:+'
+ // Use the Jetty server.
+ implementation 'org.eclipse.jetty:jetty-server:+'
+ implementation 'org.eclipse.jetty:jetty-servlet:+'
+ implementation 'org.eclipse.jetty:jetty-webapp:+'
+ // We want to have some logging output if things go wrong, so use the simple console logger from SLF4J.
+ // In our simple use case, the logger gets automatically configured by simply existing.
+ implementation 'org.slf4j:slf4j-simple:+'
+
+ // Reference the domain subproject.
+ implementation project(':domain')
+
+ // Use JUnit Jupiter API for testing.
+ testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.2'
+ // Also use the Mockito mocking framework to mock simple server functionality.
+ testImplementation "org.mockito:mockito-core:2.+"
+
+ // Use JUnit Jupiter Engine for testing.
+ testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.6.2'
+}
+
+application {
+ // Define the main class for the application.
+ mainClassName = 'mancala.App'
+}
+
+test {
+ // Use junit platform for unit tests
+ useJUnitPlatform()
+}