Skip to content

Commit 3ff37e8

Browse files
authored
feat(tiered-pricing): adrianliz java solution (#55)
feat(tiered-pricing): java solution
2 parents e5a5362 + 24be6aa commit 3ff37e8

35 files changed

+1094
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
9+
[*.java]
10+
indent_size = 4
11+
indent_style = space
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Main Workflow
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
13+
- uses: actions/setup-java@v1
14+
with:
15+
java-version: 17
16+
17+
- name: Assemble
18+
run: ./gradlew assemble --warning-mode all
19+
20+
- name: Check
21+
run: ./gradlew check --warning-mode all
22+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Gradle
2+
.gradle
3+
build/
4+
5+
# Ignore Gradle GUI config
6+
gradle-app.setting
7+
8+
var/log/*
9+
!var/log/.gitkeep
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.PHONY: all
2+
all: build
3+
4+
.PHONY: build
5+
build:
6+
@./gradlew assemble --warning-mode all
7+
8+
.PHONY: test
9+
test:
10+
@./gradlew check --warning-mode all
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Tiered pricing: Java
2+
3+
Java codebase for [Tiered pricing](../../README.md) exercise.
4+
5+
# Testing
6+
7+
Run all tests with `make test`
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
plugins {
2+
id 'org.springframework.boot' version '2.6.3'
3+
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
4+
id 'java'
5+
}
6+
7+
group = 'tv.codely'
8+
9+
java {
10+
toolchain {
11+
languageVersion = JavaLanguageVersion.of(17)
12+
}
13+
}
14+
15+
repositories {
16+
mavenCentral()
17+
}
18+
19+
dependencies {
20+
implementation 'org.apache.logging.log4j:log4j-core:2.17.1'
21+
implementation 'com.vlkan.log4j2:log4j2-logstash-layout:1.0.5'
22+
implementation 'org.springframework.boot:spring-boot-starter-web:2.6.4'
23+
implementation 'org.json:json:20211205'
24+
25+
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
26+
testImplementation 'org.springframework.boot:spring-boot-starter-test:2.6.4'
27+
testImplementation 'com.github.javafaker:javafaker:1.0.2'
28+
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
29+
}
30+
31+
test {
32+
useJUnitPlatform()
33+
34+
testLogging {
35+
events "passed", "skipped", "failed"
36+
}
37+
}
Binary file not shown.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

exercises/tiered_pricing/solutions/adrianliz/java/gradlew

Lines changed: 172 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

exercises/tiered_pricing/solutions/adrianliz/java/gradlew.bat

Lines changed: 84 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)