File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : SonarCloud
2+ on :
3+ push :
4+ branches :
5+ - master
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 21
17+ uses : actions/setup-java@v3
18+ with :
19+ java-version : 21
20+ distribution : ' temurin'
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
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ plugins {
2+ `java- library`
3+ id(" org.sonarqube" ) version " 4.4.1.3373"
4+ }
5+
6+ group = " com.Jkantrell.mc"
7+ version = " 1.5.1"
8+ java.sourceCompatibility = JavaVersion .VERSION_21
9+
10+ repositories {
11+ mavenCentral()
12+ mavenLocal()
13+ maven (" https://jitpack.io" )
14+ }
15+
16+
17+ dependencies {
18+ // testImplementation platform("org.junit:junit-bom:5.9.1")
19+ // testImplementation("org.junit.jupiter:junit-jupiter")
20+ implementation(" org.apache.commons:commons-lang3:3.12.0" )
21+ api(" com.jkantrell:KntNBT:2.2.2" )
22+ }
23+
24+ tasks.test {
25+ useJUnitPlatform()
26+ }
27+
28+ sonar {
29+ properties {
30+ property(" sonar.projectKey" , " mvndicraft_underilla" )
31+ property(" sonar.organization" , " mvndicraft" )
32+ property(" sonar.host.url" , " https://sonarcloud.io" )
33+ }
34+ }
You can’t perform that action at this time.
0 commit comments