Skip to content

Commit 29f7c04

Browse files
authored
Migrated Build System to Gradle 8.9 and Java 17 (fishercoder1534#186)
* Migrated Build System to Gradle 8.9 and Java 17 * Added checkstyle 6.17 * Update gradle.yml
1 parent 22462af commit 29f7c04

File tree

4 files changed

+44
-32
lines changed

4 files changed

+44
-32
lines changed

.github/workflows/gradle.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ jobs:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1818
with:
1919
fetch-depth: 0
20-
- name: Set up JDK 11
21-
uses: actions/setup-java@v3
20+
- name: Set up JDK 17
21+
uses: actions/setup-java@v4
2222
with:
2323
distribution: 'temurin'
24-
java-version: '11'
24+
java-version: '17'
2525
cache: 'gradle'
2626
- name: Build with Gradle
2727
run: chmod +x gradlew && ./gradlew build

build.gradle

Lines changed: 37 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,56 @@
1-
apply plugin: 'java'
2-
apply plugin: 'checkstyle'
1+
plugins {
2+
id 'java'
3+
id 'checkstyle'
4+
}
35

46
group = 'com.fishercoder'
57
version = '1.0-SNAPSHOT'
68

7-
javadoc.options.encoding = 'UTF-8'
8-
compileJava.options.encoding = 'UTF-8'
9-
10-
checkstyle {
11-
//include ( '**/*.java')
12-
configFile = file("${rootDir}/fishercoder_checkstyle.xml")
9+
java {
10+
toolchain {
11+
languageVersion = JavaLanguageVersion.of(17)
12+
}
1313
}
1414

15-
sourceSets {
16-
main {
17-
java {
18-
srcDir 'src/fishercoder'
19-
}
20-
}
15+
tasks.javadoc {
16+
options.encoding = 'UTF-8'
2117
}
2218

23-
description = """"""
19+
tasks.compileJava {
20+
options.encoding = 'UTF-8'
21+
}
2422

2523
repositories {
2624
mavenCentral()
27-
maven { url "http://repo.maven.apache.org/maven2" }
2825
}
2926

3027
dependencies {
31-
compile 'com.google.code.gson:gson:2.8.0'
32-
compile group: 'org.apache.commons', name: 'commons-collections4', version: '4.0'
28+
implementation 'com.google.code.gson:gson:2.10.1'
29+
implementation 'org.apache.commons:commons-collections4:4.0'
3330

34-
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
35-
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
31+
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.3'
32+
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.3'
3633

37-
testCompile("org.assertj:assertj-core:3.11.1")
38-
compileOnly 'org.projectlombok:lombok:1.18.12'
39-
annotationProcessor 'org.projectlombok:lombok:1.18.12'
40-
testCompileOnly 'org.projectlombok:lombok:1.18.12'
41-
testAnnotationProcessor 'org.projectlombok:lombok:1.18.12'
34+
testImplementation 'org.assertj:assertj-core:3.11.1'
35+
compileOnly 'org.projectlombok:lombok:1.18.32'
36+
annotationProcessor 'org.projectlombok:lombok:1.18.32'
37+
testCompileOnly 'org.projectlombok:lombok:1.18.32'
38+
testAnnotationProcessor 'org.projectlombok:lombok:1.18.32'
4239
}
4340

44-
test {
45-
useJUnitPlatform()
41+
testing {
42+
suites {
43+
test {
44+
useJUnitJupiter()
45+
}
46+
}
47+
}
48+
49+
tasks.withType(Test).configureEach {
50+
maxParallelForks = Runtime.runtime.availableProcessors()
51+
}
52+
53+
checkstyle {
54+
toolVersion = '6.17'
55+
config = rootProject.resources.text.fromFile('fishercoder_checkstyle.xml')
4656
}

gradle/wrapper/gradle-wrapper.jar

-10.7 KB
Binary file not shown.
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
46
zipStoreBase=GRADLE_USER_HOME
57
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy