Skip to content

Commit

Permalink
Merge pull request #56 from itsallcode/upgrade-dependencies
Browse files Browse the repository at this point in the history
Upgrade dependencies
  • Loading branch information
kaklakariada authored Dec 2, 2023
2 parents 176b223 + f2ca771 commit ad0c19e
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 28 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ jobs:
build:

runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

steps:
- uses: actions/checkout@v4
Expand All @@ -18,7 +21,7 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 11
java-version: 17
cache: 'gradle'
- uses: gradle/wrapper-validation-action@v1
- name: Cache SonarQube packages
Expand All @@ -32,11 +35,7 @@ jobs:
./gradlew build --warning-mode=summary
- name: Sonar analysis
if: ${{ env.SONAR_TOKEN != null }}
run: |
./gradlew sonarqube -Dsonar.host.url=https://sonarcloud.io \
-Dsonar.organization=itsallcode \
-Dsonar.login=$SONAR_TOKEN \
--warning-mode=summary
run: ./gradlew sonar -Dsonar.login=$SONAR_TOKEN --warning-mode=summary
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@
/.project
/bin/
/.settings/org.eclipse.buildship.core.prefs
/.settings/org.eclipse.core.resources.prefs
/.settings/org.sonarlint.eclipse.core.prefs
2 changes: 0 additions & 2 deletions .settings/org.eclipse.core.resources.prefs

This file was deleted.

6 changes: 3 additions & 3 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=11
org.eclipse.jdt.core.compiler.source=17
org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false
org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
Expand Down
6 changes: 0 additions & 6 deletions .settings/org.sonarlint.eclipse.core.prefs

This file was deleted.

17 changes: 17 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"editor.formatOnSave": true,
"java.configuration.updateBuildConfiguration": "automatic",
"editor.codeActionsOnSave": {
"source.organizeImports": true,
"source.generate.finalModifiers": true,
"source.fixAll": true
},
"java.codeGeneration.useBlocks": true,
"java.saveActions.organizeImports": true,
"java.sources.organizeImports.starThreshold": 3,
"java.sources.organizeImports.staticStarThreshold": 3,
"sonarlint.connectedMode.project": {
"connectionId": "itsallcode",
"projectKey": "org.itsallcode:holiday-calculator"
}
}
27 changes: 17 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ plugins {
id 'maven-publish'
id 'jacoco'
id 'com.github.hierynomus.license' version '0.16.1'
id 'org.sonarqube' version '3.3'
id 'org.sonarqube' version '4.4.1.3373'
id 'io.codearte.nexus-staging' version '0.30.0'
id "com.github.ben-manes.versions" version '0.42.0'
id "com.github.ben-manes.versions" version '0.50.0'
}

group 'org.itsallcode'
version = '0.2.1'
version = '0.2.2'

java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
languageVersion = JavaLanguageVersion.of(17)
}
withJavadocJar()
withSourcesJar()
Expand All @@ -38,16 +38,16 @@ test {
}

ext {
junitVersion = '5.8.2'
mockitoVersion = '4.5.1'
lockbackVersion = '1.2.11'
junitVersion = '5.10.1'
mockitoVersion = '5.8.0'
lockbackVersion = '1.4.14'
}

dependencies {
implementation 'org.slf4j:slf4j-api:1.7.36'
implementation 'org.slf4j:slf4j-api:2.0.9'

testImplementation "org.mockito:mockito-core:$mockitoVersion"
testImplementation 'org.assertj:assertj-core:3.22.0'
testImplementation 'org.assertj:assertj-core:3.24.2'
testImplementation "org.mockito:mockito-junit-jupiter:$mockitoVersion"
testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion"
testImplementation "org.junit.jupiter:junit-jupiter-params:$junitVersion"
Expand All @@ -59,7 +59,7 @@ dependencies {
license {
header = file('gradle/license-header.txt')
ext.project = 'holiday-calculator'
ext.year = Calendar.getInstance().get(Calendar.YEAR)
ext.year = 2022
ext.name = 'itsallcode'
ext.email = '[email protected]'
include '**/*.java'
Expand All @@ -71,6 +71,13 @@ jacocoTestReport {
}
}

sonar {
properties {
property("sonar.organization", "itsallcode")
property("sonar.host.url", "https://sonarcloud.io")
}
}

rootProject.tasks["sonarqube"].dependsOn(tasks["jacocoTestReport"])

def getOptionalProperty(String name) {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit ad0c19e

Please sign in to comment.