Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Advent of Code 2023 in Java
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LUDMANN Pierre
Advent of Code 2023 in Java
Commits
9cc429a6
Commit
9cc429a6
authored
1 year ago
by
LUDMANN Pierre
Browse files
Options
Downloads
Patches
Plain Diff
fix build and usage + test day5
parent
04f2befc
No related branches found
No related tags found
No related merge requests found
Pipeline
#16093
failed
1 year ago
Stage: build
Stage: test
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
README.md
+6
-5
6 additions, 5 deletions
README.md
pom.xml
+1
-1
1 addition, 1 deletion
pom.xml
src/main/java/CieDuVaseDesNoces/Day.java
+4
-6
4 additions, 6 deletions
src/main/java/CieDuVaseDesNoces/Day.java
src/main/java/CieDuVaseDesNoces/Main.java
+2
-2
2 additions, 2 deletions
src/main/java/CieDuVaseDesNoces/Main.java
with
13 additions
and
14 deletions
README.md
+
6
−
5
View file @
9cc429a6
...
...
@@ -12,13 +12,14 @@ Requirements
Build and use
-----
mvn test -Day=1
mvn test -Day=10
mvn test
```
bash
mvn verify
-Day
=
1
mvn verify
-Day
=
10
mvn verify
```
When no day is given, it assumes today.
From IntelliJ, you may run
`mvn
test
`
via the Maven panel.
From IntelliJ, you may run
`mvn
verify
`
via the Maven panel.
Access the Maven panel via its button on the right top bar,
or via View>Tool Windows.
...
...
This diff is collapsed.
Click to expand it.
pom.xml
+
1
−
1
View file @
9cc429a6
...
...
@@ -32,7 +32,7 @@
<version>
3.1.1
</version>
<executions>
<execution>
<phase>
test
</phase>
<phase>
verify
</phase>
<goals>
<goal>
java
</goal>
</goals>
...
...
This diff is collapsed.
Click to expand it.
src/main/java/CieDuVaseDesNoces/Day.java
+
4
−
6
View file @
9cc429a6
...
...
@@ -10,6 +10,10 @@ import static java.lang.Thread.currentThread;
abstract
class
Day
{
List
<
String
>
input
;
Day
()
{
}
Day
(
String
inputName
)
{
try
(
BufferedReader
reader
=
new
BufferedReader
(
new
InputStreamReader
(
Objects
.
requireNonNull
(
currentThread
().
getContextClassLoader
()
...
...
@@ -23,10 +27,4 @@ abstract class Day {
abstract
String
part1
();
abstract
String
part2
();
// public static void main(String[] args) {
//final Day today = new Day("1");
//System.out.println(part1());
//System.out.println(part2());
}
This diff is collapsed.
Click to expand it.
src/main/java/CieDuVaseDesNoces/Main.java
+
2
−
2
View file @
9cc429a6
...
...
@@ -18,7 +18,7 @@ public class Main {
(
Day
)
Class
.
forName
(
Main
.
class
.
getPackageName
()
+
".Day"
+
day
)
.
getDeclaredConstructor
(
String
.
class
)
.
newInstance
(
"day"
+
day
+
".input"
);
System
.
out
.
print
ln
(
today
.
part1
());
System
.
out
.
print
ln
(
today
.
part2
());
System
.
out
.
print
f
(
"Part 1: %s\n"
,
today
.
part1
());
System
.
out
.
print
f
(
"Part 2: %s\n"
,
today
.
part2
());
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment