Skip to content

Commit 26b4b47

Browse files
authored
Merge pull request #31 from code-star/shared
Added shared library between backend and data project
2 parents 0374f40 + 3cdce3e commit 26b4b47

File tree

165 files changed

+864
-26
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

165 files changed

+864
-26
lines changed

.github/workflows/build-and-test.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,17 @@ name: build-and-test
33
on: [push]
44

55
jobs:
6+
shared:
7+
name: "shared / Build and test"
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v1
11+
- name: Run Gradle
12+
run: ./gradlew :shared:clean :shared:test
13+
614
backend:
715
name: "backend / Build and test"
16+
needs: shared
817
runs-on: ubuntu-latest
918
steps:
1019
- uses: actions/checkout@v1
@@ -25,9 +34,12 @@ jobs:
2534

2635
data:
2736
name: "data / Build and test"
37+
needs: shared
2838
runs-on: ubuntu-latest
2939
steps:
3040
- uses: actions/checkout@v1
3141
- name: Run Gradle
3242
run: ./gradlew :data:clean :data:test
3343

44+
45+

backend/build.gradle.kts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,6 @@ application {
2727
mainClassName = "io.ktor.server.netty.EngineMain"
2828
}
2929

30-
repositories {
31-
mavenLocal()
32-
jcenter()
33-
maven { url = uri("https://kotlin.bintray.com/ktor") }
34-
maven { url = uri("https://plugins.gradle.org/m2/") }
35-
}
36-
3730
tasks {
3831
withType<KotlinCompile> {
3932
kotlinOptions.jvmTarget = "1.8"

data/build.gradle.kts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,8 @@ apply {
3232
plugin("com.github.johnrengelman.shadow")
3333
}
3434

35-
repositories {
36-
mavenLocal()
37-
jcenter()
38-
maven { url = uri("https://kotlin.bintray.com/ktor") }
39-
maven { url = uri("https://plugins.gradle.org/m2/") }
40-
}
41-
4235
dependencies {
36+
implementation(project(":shared"))
4337
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version")
4438
implementation("ch.qos.logback:logback-classic:$logback_version")
4539
implementation("io.ktor:ktor-server-netty:$ktor_version")

data/src/main/kotlin/nl/codestar/interchange/Application.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ import nl.codestar.interchange.domain.Position
1818

1919
import nl.codestar.interchange.here.HereRoutingAPIResponse
2020

21-
22-
2321
fun CoroutineScope.produceNumbers() = produce<List<HereRoute>> {
2422
while (true) {
2523

settings.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ rootProject.name = "interchange"
22

33
include("backend")
44
include("data")
5+
include("shared")

shared/build.gradle.kts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
val serialization_version: String by project
2+
3+
plugins {
4+
kotlin("jvm")
5+
}
6+
7+
group = "nl.codestar"
8+
version = "0.0.1-SNAPSHOT"
9+
10+
buildscript {
11+
dependencies {
12+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50")
13+
classpath("org.jetbrains.kotlin:kotlin-serialization:1.3.50")
14+
}
15+
}
16+
17+
apply {
18+
plugin("kotlinx-serialization")
19+
}
20+
21+
dependencies {
22+
implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime:$serialization_version")
23+
testImplementation("io.kotlintest:kotlintest-runner-junit5:3.4.2")
24+
}
25+
26+
tasks {
27+
compileKotlin {
28+
kotlinOptions.jvmTarget = "1.8"
29+
}
30+
compileTestKotlin {
31+
kotlinOptions.jvmTarget = "1.8"
32+
}
33+
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
1
2+
0
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
81 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
1
2+
0
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/Users/dku21348/Projects/codestar/interchange/shared/build/classes/kotlin/main/nl/codestar/interchange/Edge$$serializer.class:/Users/dku21348/Projects/codestar/interchange/shared/build/classes/kotlin/main/nl/codestar/interchange/Edge$Companion.class:/Users/dku21348/Projects/codestar/interchange/shared/build/classes/kotlin/main/nl/codestar/interchange/Edge.class:/Users/dku21348/Projects/codestar/interchange/shared/build/classes/kotlin/main/nl/codestar/interchange/Graph$Companion$descriptor$1.class:/Users/dku21348/Projects/codestar/interchange/shared/build/classes/kotlin/main/nl/codestar/interchange/Graph$Companion.class:/Users/dku21348/Projects/codestar/interchange/shared/build/classes/kotlin/main/nl/codestar/interchange/Graph.class:/Users/dku21348/Projects/codestar/interchange/shared/build/classes/kotlin/main/nl/codestar/interchange/Node$$serializer.class:/Users/dku21348/Projects/codestar/interchange/shared/build/classes/kotlin/main/nl/codestar/interchange/Node$Companion.class:/Users/dku21348/Projects/codestar/interchange/shared/build/classes/kotlin/main/nl/codestar/interchange/Node.class:/Users/dku21348/Projects/codestar/interchange/shared/build/classes/kotlin/main/nl/codestar/interchange/Position$$serializer.class:/Users/dku21348/Projects/codestar/interchange/shared/build/classes/kotlin/main/nl/codestar/interchange/Position$Companion.class:/Users/dku21348/Projects/codestar/interchange/shared/build/classes/kotlin/main/nl/codestar/interchange/Position.class:/Users/dku21348/Projects/codestar/interchange/shared/build/classes/kotlin/main/nl/codestar/interchange/RefEdge$$serializer.class:/Users/dku21348/Projects/codestar/interchange/shared/build/classes/kotlin/main/nl/codestar/interchange/RefEdge$Companion.class:/Users/dku21348/Projects/codestar/interchange/shared/build/classes/kotlin/main/nl/codestar/interchange/RefEdge.class
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
5+
<meta http-equiv="x-ua-compatible" content="IE=edge"/>
6+
<title>Test results - Class nl.codestar.interchange.domain.GraphTest</title>
7+
<link href="../css/base-style.css" rel="stylesheet" type="text/css"/>
8+
<link href="../css/style.css" rel="stylesheet" type="text/css"/>
9+
<script src="../js/report.js" type="text/javascript"></script>
10+
</head>
11+
<body>
12+
<div id="content">
13+
<h1>Class nl.codestar.interchange.domain.GraphTest</h1>
14+
<div class="breadcrumbs">
15+
<a href="../index.html">all</a> &gt;
16+
<a href="../packages/nl.codestar.interchange.domain.html">nl.codestar.interchange.domain</a> &gt; GraphTest</div>
17+
<div id="summary">
18+
<table>
19+
<tr>
20+
<td>
21+
<div class="summaryGroup">
22+
<table>
23+
<tr>
24+
<td>
25+
<div class="infoBox" id="tests">
26+
<div class="counter">1</div>
27+
<p>tests</p>
28+
</div>
29+
</td>
30+
<td>
31+
<div class="infoBox" id="failures">
32+
<div class="counter">0</div>
33+
<p>failures</p>
34+
</div>
35+
</td>
36+
<td>
37+
<div class="infoBox" id="ignored">
38+
<div class="counter">0</div>
39+
<p>ignored</p>
40+
</div>
41+
</td>
42+
<td>
43+
<div class="infoBox" id="duration">
44+
<div class="counter">0.035s</div>
45+
<p>duration</p>
46+
</div>
47+
</td>
48+
</tr>
49+
</table>
50+
</div>
51+
</td>
52+
<td>
53+
<div class="infoBox success" id="successRate">
54+
<div class="percent">100%</div>
55+
<p>successful</p>
56+
</div>
57+
</td>
58+
</tr>
59+
</table>
60+
</div>
61+
<div id="tabs">
62+
<ul class="tabLinks">
63+
<li>
64+
<a href="#tab0">Tests</a>
65+
</li>
66+
</ul>
67+
<div id="tab0" class="tab">
68+
<h2>Tests</h2>
69+
<table>
70+
<thead>
71+
<tr>
72+
<th>Test</th>
73+
<th>Duration</th>
74+
<th>Result</th>
75+
</tr>
76+
</thead>
77+
<tr>
78+
<td class="success">serialization should work correctly</td>
79+
<td class="success">0.035s</td>
80+
<td class="success">passed</td>
81+
</tr>
82+
</table>
83+
</div>
84+
</div>
85+
<div id="footer">
86+
<p>
87+
<div>
88+
<label class="hidden" id="label-for-line-wrapping-toggle" for="line-wrapping-toggle">Wrap lines
89+
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
90+
</label>
91+
</div>Generated by
92+
<a href="http://www.gradle.org">Gradle 6.1</a> at 17-Jan-2020 15:09:51</p>
93+
</div>
94+
</div>
95+
</body>
96+
</html>
Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
2+
body {
3+
margin: 0;
4+
padding: 0;
5+
font-family: sans-serif;
6+
font-size: 12pt;
7+
}
8+
9+
body, a, a:visited {
10+
color: #303030;
11+
}
12+
13+
#content {
14+
padding-left: 50px;
15+
padding-right: 50px;
16+
padding-top: 30px;
17+
padding-bottom: 30px;
18+
}
19+
20+
#content h1 {
21+
font-size: 160%;
22+
margin-bottom: 10px;
23+
}
24+
25+
#footer {
26+
margin-top: 100px;
27+
font-size: 80%;
28+
white-space: nowrap;
29+
}
30+
31+
#footer, #footer a {
32+
color: #a0a0a0;
33+
}
34+
35+
#line-wrapping-toggle {
36+
vertical-align: middle;
37+
}
38+
39+
#label-for-line-wrapping-toggle {
40+
vertical-align: middle;
41+
}
42+
43+
ul {
44+
margin-left: 0;
45+
}
46+
47+
h1, h2, h3 {
48+
white-space: nowrap;
49+
}
50+
51+
h2 {
52+
font-size: 120%;
53+
}
54+
55+
ul.tabLinks {
56+
padding-left: 0;
57+
padding-top: 10px;
58+
padding-bottom: 10px;
59+
overflow: auto;
60+
min-width: 800px;
61+
width: auto !important;
62+
width: 800px;
63+
}
64+
65+
ul.tabLinks li {
66+
float: left;
67+
height: 100%;
68+
list-style: none;
69+
padding-left: 10px;
70+
padding-right: 10px;
71+
padding-top: 5px;
72+
padding-bottom: 5px;
73+
margin-bottom: 0;
74+
-moz-border-radius: 7px;
75+
border-radius: 7px;
76+
margin-right: 25px;
77+
border: solid 1px #d4d4d4;
78+
background-color: #f0f0f0;
79+
}
80+
81+
ul.tabLinks li:hover {
82+
background-color: #fafafa;
83+
}
84+
85+
ul.tabLinks li.selected {
86+
background-color: #c5f0f5;
87+
border-color: #c5f0f5;
88+
}
89+
90+
ul.tabLinks a {
91+
font-size: 120%;
92+
display: block;
93+
outline: none;
94+
text-decoration: none;
95+
margin: 0;
96+
padding: 0;
97+
}
98+
99+
ul.tabLinks li h2 {
100+
margin: 0;
101+
padding: 0;
102+
}
103+
104+
div.tab {
105+
}
106+
107+
div.selected {
108+
display: block;
109+
}
110+
111+
div.deselected {
112+
display: none;
113+
}
114+
115+
div.tab table {
116+
min-width: 350px;
117+
width: auto !important;
118+
width: 350px;
119+
border-collapse: collapse;
120+
}
121+
122+
div.tab th, div.tab table {
123+
border-bottom: solid #d0d0d0 1px;
124+
}
125+
126+
div.tab th {
127+
text-align: left;
128+
white-space: nowrap;
129+
padding-left: 6em;
130+
}
131+
132+
div.tab th:first-child {
133+
padding-left: 0;
134+
}
135+
136+
div.tab td {
137+
white-space: nowrap;
138+
padding-left: 6em;
139+
padding-top: 5px;
140+
padding-bottom: 5px;
141+
}
142+
143+
div.tab td:first-child {
144+
padding-left: 0;
145+
}
146+
147+
div.tab td.numeric, div.tab th.numeric {
148+
text-align: right;
149+
}
150+
151+
span.code {
152+
display: inline-block;
153+
margin-top: 0em;
154+
margin-bottom: 1em;
155+
}
156+
157+
span.code pre {
158+
font-size: 11pt;
159+
padding-top: 10px;
160+
padding-bottom: 10px;
161+
padding-left: 10px;
162+
padding-right: 10px;
163+
margin: 0;
164+
background-color: #f7f7f7;
165+
border: solid 1px #d0d0d0;
166+
min-width: 700px;
167+
width: auto !important;
168+
width: 700px;
169+
}
170+
171+
span.wrapped pre {
172+
word-wrap: break-word;
173+
white-space: pre-wrap;
174+
word-break: break-all;
175+
}
176+
177+
label.hidden {
178+
display: none;
179+
}

0 commit comments

Comments
 (0)