Skip to content
This repository was archived by the owner on Apr 24, 2024. It is now read-only.

Commit 85611e6

Browse files
Merge pull request #84 from FrogDevelopment/develop
Merge develop on master
2 parents ffd2f10 + 128afde commit 85611e6

6 files changed

Lines changed: 153 additions & 158 deletions

File tree

.github/workflows/build.yml

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,16 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- name: Checkout with all branches and tags
16+
- name: Checkout
1717
uses: actions/checkout@v2
18-
with:
19-
fetch-depth: 0
2018

21-
- name: Setup Java 15
19+
- name: Setup Java 11
2220
uses: joschi/setup-jdk@v2
2321
with:
24-
java-version: '15'
22+
java-version: '11'
2523

2624
- name: Compile
2725
run: ./gradlew classes
2826

2927
- name: Test
3028
run: ./gradlew test
31-
32-
- name: Publish
33-
run: ./gradlew publish
34-
env:
35-
USERNAME: ${{ github.actor }}
36-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37-
38-
- name: Analyse
39-
if: github.ref == 'refs/heads/master'
40-
run: ./gradlew version sonarqube -Dsonar.login=${{ secrets.SONAR_LOGIN }}
41-
env:
42-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/sonar.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: SonarQube
2+
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
8+
jobs:
9+
build:
10+
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
17+
- name: Setup Java 11
18+
uses: joschi/setup-jdk@v2
19+
with:
20+
java-version: '11'
21+
22+
- name: Compile
23+
run: ./gradlew classes
24+
25+
- name: Test
26+
run: ./gradlew test
27+
28+
- name: Analyse
29+
if: github.ref == 'refs/heads/master'
30+
run: ./gradlew version sonarqube -Dsonar.login=${{ secrets.SONAR_LOGIN }}
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build.gradle

Lines changed: 0 additions & 140 deletions
This file was deleted.

build.gradle.kts

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
plugins {
2+
jacoco
3+
`java-library`
4+
`maven-publish`
5+
id ("org.sonarqube") version "3.3"
6+
id("io.freefair.lombok") version "6.2.0"
7+
}
8+
9+
group = "com.frog-development"
10+
11+
configure<JavaPluginExtension> {
12+
sourceCompatibility = JavaVersion.VERSION_11
13+
targetCompatibility = JavaVersion.VERSION_11
14+
}
15+
16+
repositories {
17+
mavenCentral()
18+
}
19+
20+
dependencies {
21+
22+
api("io.jsonwebtoken:jjwt:0.9.1")
23+
24+
implementation("org.springframework.boot:spring-boot-starter-security:2.5.6")
25+
implementation("org.springframework.boot:spring-boot-actuator-autoconfigure:2.5.6")
26+
implementation("ch.qos.logback:logback-classic:1.2.6")
27+
implementation("javax.servlet:javax.servlet-api:4.0.1")
28+
implementation("javax.xml.bind:jaxb-api:2.3.1")
29+
30+
compileOnly("org.jetbrains:annotations:23.0.0")
31+
compileOnly("org.springframework.security:spring-security-test:5.5.3")
32+
33+
testImplementation("org.springframework.boot:spring-boot-starter-test:2.5.6")
34+
testImplementation("org.springframework.security:spring-security-test:5.5.3")
35+
testImplementation("org.junit.platform:junit-platform-runner:1.8.1")
36+
}
37+
38+
tasks.named<Test>("test") {
39+
reports.html.required.set(false)
40+
41+
useJUnitPlatform {
42+
includeTags("unitTest")
43+
excludeTags("integrationTest")
44+
}
45+
46+
finalizedBy(tasks.named("jacocoTestReport"))
47+
}
48+
49+
tasks.named<JacocoReport>("jacocoTestReport") {
50+
dependsOn(tasks.named("test"))
51+
reports {
52+
xml.required.set(true)
53+
// xml.destination file("${buildDir}/reports/jacoco/test.xml")
54+
csv.required.set(false)
55+
html.required.set(false)
56+
}
57+
}
58+
59+
//tasks.named<JacocoCoverageVerification>("jacocoTestCoverageVerification") {
60+
// violationRules {
61+
// rule {
62+
// limit {
63+
// minimum = "0.9".toBigDecimal()
64+
// }
65+
// }
66+
// }
67+
//}
68+
69+
sonarqube {
70+
properties {
71+
// property ("sonar.coverage.jacoco.xmlReportPaths", "${buildDir}/reports/jacoco/test.xml")
72+
property ("sonar.projectKey", "FrogDevelopment_authorization-jwt-module")
73+
property ("sonar.organization", "frogdevelopment")
74+
property ("sonar.host.url", "https://sonarcloud.io")
75+
}
76+
}
77+
78+
project.tasks["sonarqube"].dependsOn("jacocoTestReport")
79+
80+
java {
81+
withSourcesJar()
82+
}
83+
84+
publishing {
85+
publications {
86+
create<MavenPublication>("mavenJava") {
87+
from(components["java"])
88+
89+
pom {
90+
name.set("Authorisation JWT")
91+
description.set("Handle Spring Security with JWT")
92+
licenses {
93+
license {
94+
name.set("The Apache License, Version 2.0")
95+
url.set("https://www.apache.org/licenses/LICENSE-2.0.txt")
96+
}
97+
}
98+
developers {
99+
developer {
100+
id.set("legall.benoit")
101+
name.set("Benoît Le Gall")
102+
email.set("legall.benoit@gmail.com")
103+
}
104+
}
105+
}
106+
}
107+
}
108+
}
109+
110+
tasks.wrapper {
111+
gradleVersion = "7.2"
112+
distributionType = Wrapper.DistributionType.ALL
113+
}

jitpack.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
before_install:
2+
- source "$HOME/.sdkman/bin/sdkman-init.sh"
3+
- sdk update
4+
- sdk install java 11.0.11.hs-adpt
5+
- sdk use java 11.0.11.hs-adpt

lombok.config

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
# This file is generated by the 'io.freefair.lombok' Gradle plugin
22
config.stopBubbling = true
33
lombok.addLombokGeneratedAnnotation = true
4-
lombok.extern.findbugs.addSuppressFBWarnings = true

0 commit comments

Comments
 (0)