Skip to content

Commit 78d572f

Browse files
committed
Merge branch 'main' into renovate/configure
2 parents f779ca7 + a38c87c commit 78d572f

Some content is hidden

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

52 files changed

+16836
-0
lines changed

.github/workflows/gradle.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
6+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
7+
8+
name: Java CI with Gradle
9+
10+
on:
11+
push:
12+
branches:
13+
- main
14+
pull_request:
15+
types:
16+
- opened
17+
- synchronize
18+
- reopened
19+
branches:
20+
- main
21+
jobs:
22+
build:
23+
runs-on: ${{ matrix.os }}
24+
strategy:
25+
matrix:
26+
os: [ ubuntu-latest, windows-latest ]
27+
permissions:
28+
contents: read
29+
30+
steps:
31+
- uses: actions/checkout@v4
32+
- name: Set up JDK 17
33+
uses: actions/setup-java@v4
34+
with:
35+
java-version: '17'
36+
distribution: 'temurin'
37+
38+
# Configure Gradle for optimal use in GiHub Actions, including caching of downloaded dependencies.
39+
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
40+
- name: Setup Gradle
41+
uses: gradle/actions/setup-gradle@ec92e829475ac0c2315ea8f9eced72db85bb337a # v3.0.0
42+
43+
- name: Build with Gradle Wrapper
44+
run: ./gradlew build
45+
46+
# NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html).
47+
# If your project does not have the Gradle Wrapper configured, you can use the following configuration to run Gradle with a specified version.
48+
#
49+
# - name: Setup Gradle
50+
# uses: gradle/actions/setup-gradle@ec92e829475ac0c2315ea8f9eced72db85bb337a # v3.0.0
51+
# with:
52+
# gradle-version: '8.5'
53+
#
54+
# - name: Build with Gradle 8.5
55+
# run: gradle build
56+
57+
dependency-submission:
58+
59+
runs-on: ubuntu-latest
60+
permissions:
61+
contents: write
62+
63+
steps:
64+
- uses: actions/checkout@v4
65+
- name: Set up JDK 17
66+
uses: actions/setup-java@v4
67+
with:
68+
java-version: '17'
69+
distribution: 'temurin'
70+
71+
# Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies.
72+
# See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md
73+
- name: Generate and submit dependency graph
74+
uses: gradle/actions/dependency-submission@ec92e829475ac0c2315ea8f9eced72db85bb337a # v3.0.0

.github/workflows/sonar.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: SonarCloud
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
types: [ opened, synchronize, reopened ]
8+
jobs:
9+
build:
10+
name: Build and analyze
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
with:
15+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
16+
- name: Set up JDK 17
17+
uses: actions/setup-java@v3
18+
with:
19+
java-version: 17
20+
distribution: 'zulu' # Alternative distribution options are available
21+
- name: Cache SonarCloud packages
22+
uses: actions/cache@v3
23+
with:
24+
path: ~/.sonar/cache
25+
key: ${{ runner.os }}-sonar
26+
restore-keys: ${{ runner.os }}-sonar
27+
- name: Cache Gradle packages
28+
uses: actions/cache@v3
29+
with:
30+
path: ~/.gradle/caches
31+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
32+
restore-keys: ${{ runner.os }}-gradle
33+
- name: Build and analyze
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
36+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
37+
run: ./gradlew build sonar --info

.gitignore

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
HELP.md
2+
.gradle
3+
target/
4+
!.mvn/wrapper/maven-wrapper.jar
5+
!gradle/wrapper/gradle-wrapper.jar
6+
!**/src/main/**/target/
7+
!**/src/test/**/target/
8+
9+
### STS ###
10+
.apt_generated
11+
.classpath
12+
.factorypath
13+
.project
14+
.settings
15+
.springBeans
16+
.sts4-cache
17+
bin/
18+
!**/src/main/**/bin/
19+
!**/src/test/**/bin/
20+
21+
### IntelliJ IDEA ###
22+
.idea
23+
*.iws
24+
*.iml
25+
*.ipr
26+
out/
27+
!**/src/main/**/out/
28+
!**/src/test/**/out/
29+
30+
### NetBeans ###
31+
/nbproject/private/
32+
/nbbuild/
33+
/dist/
34+
/nbdist/
35+
/.nb-gradle/
36+
build/
37+
!**/src/main/**/build/
38+
!**/src/test/**/build/
39+
40+
### VS Code ###
41+
.vscode/
42+
43+
### Kotlin ###
44+
.kotlin

build.gradle.kts

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2+
3+
plugins {
4+
id("io.spring.dependency-management") version "1.1.4"
5+
kotlin("jvm") version "1.9.22"
6+
id("com.adarshr.test-logger") version "4.0.0"
7+
id("org.sonarqube") version "4.4.1.3373"
8+
}
9+
10+
group = "io.github.tobi.laa"
11+
version = "0.0.1-SNAPSHOT"
12+
13+
java {
14+
sourceCompatibility = JavaVersion.VERSION_17
15+
}
16+
17+
sonar {
18+
properties {
19+
property("sonar.projectKey", "tobias-laa_spring-boot-embedded-redis")
20+
property("sonar.organization", "tobias-laa")
21+
property("sonar.host.url", "https://sonarcloud.io")
22+
}
23+
}
24+
25+
repositories {
26+
mavenCentral()
27+
}
28+
29+
dependencyManagement {
30+
imports {
31+
mavenBom("org.springframework.boot:spring-boot-dependencies:3.2.2")
32+
}
33+
}
34+
35+
dependencies {
36+
api("com.github.codemonstur:embedded-redis:1.4.0")
37+
implementation("org.jetbrains.kotlin:kotlin-reflect")
38+
implementation("org.springframework.boot:spring-boot-test")
39+
implementation("org.springframework:spring-test")
40+
implementation("org.slf4j:slf4j-api")
41+
implementation("redis.clients:jedis")
42+
compileOnly("org.junit.jupiter:junit-jupiter-api")
43+
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
44+
testImplementation("org.junit.jupiter:junit-jupiter")
45+
testImplementation("org.springframework.boot:spring-boot-starter-data-redis")
46+
testImplementation("org.springframework.boot:spring-boot-starter-test")
47+
}
48+
49+
tasks.withType<KotlinCompile> {
50+
kotlinOptions {
51+
freeCompilerArgs += "-Xjsr305=strict"
52+
jvmTarget = "17"
53+
}
54+
}
55+
56+
tasks.withType<Test> {
57+
useJUnitPlatform()
58+
}

gradle/wrapper/gradle-wrapper.jar

62.2 KB
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)