Skip to content

Commit f3304e3

Browse files
committed
Contains the checking materials of gradle and java for everyone who want to do
1 parent 9c1ffc6 commit f3304e3

File tree

11 files changed

+495
-0
lines changed

11 files changed

+495
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
* This file was generated by the Gradle 'init' task.
3+
*
4+
* This generated file contains a sample Java application project to get you started.
5+
* For more details on building Java & JVM projects, please refer to https://docs.gradle.org/9.2.1/userguide/building_java_projects.html in the Gradle documentation.
6+
* This project uses @Incubating APIs which are subject to change.
7+
*/
8+
9+
plugins {
10+
// Apply the application plugin to add support for building a CLI application in Java.
11+
application
12+
}
13+
14+
repositories {
15+
// Use Maven Central for resolving dependencies.
16+
mavenCentral()
17+
}
18+
19+
dependencies {
20+
// This dependency is used by the application.
21+
implementation(libs.guava)
22+
}
23+
24+
testing {
25+
suites {
26+
// Configure the built-in test suite
27+
val test by getting(JvmTestSuite::class) {
28+
// Use JUnit Jupiter test framework
29+
useJUnitJupiter("5.12.1")
30+
}
31+
}
32+
}
33+
34+
// Apply a specific Java toolchain to ease working on different environments.
35+
java {
36+
toolchain {
37+
languageVersion = JavaLanguageVersion.of(8)
38+
}
39+
}
40+
41+
application {
42+
// Define the main class for the application.
43+
mainClass = "org.example.App"
44+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* This source file was generated by the Gradle 'init' task
3+
*/
4+
package org.example;
5+
6+
public class App {
7+
public String getGreeting() {
8+
return "Hello World!";
9+
}
10+
11+
public static void main(String[] args) {
12+
System.out.println(new App().getGreeting());
13+
}
14+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* This source file was generated by the Gradle 'init' task
3+
*/
4+
package org.example;
5+
6+
import org.junit.jupiter.api.Test;
7+
import static org.junit.jupiter.api.Assertions.*;
8+
9+
class AppTest {
10+
@Test void appHasAGreeting() {
11+
App classUnderTest = new App();
12+
assertNotNull(classUnderTest.getGreeting(), "app should have a greeting");
13+
}
14+
}

gradle_workflow/build.gradle.kts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// This is a Gradle build configuration file using Kotlin DSL
2+
// It is intended for use within a Java project structure
3+
4+
// Note: The following blocks are standard Gradle configuration
5+
// for a Java application.
6+
7+
plugins {
8+
// Apply the java plugin to add support for Java
9+
id("java")
10+
// Apply the application plugin to make it easy to run the code
11+
id("application")
12+
id("checkstyle")
13+
}
14+
15+
repositories {
16+
// Use Maven Central for resolving dependencies
17+
mavenCentral()
18+
}
19+
20+
dependencies {
21+
// Standard testing library configuration
22+
testImplementation("org.junit.jupiter:junit-jupiter:5.10.0")
23+
}
24+
25+
// Configuration for Java toolchain
26+
java {
27+
toolchain {
28+
// Matches the JDK 25 version found in your environment
29+
languageVersion.set(JavaLanguageVersion.of(25))
30+
}
31+
}
32+
33+
// Application entry point configuration
34+
application {
35+
// The main class of your DSA project
36+
mainClass.set("Main")
37+
}
38+
39+
tasks.withType<Test> {
40+
useJUnitPlatform()
41+
}

gradle_workflow/gradle.properties

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# This file was generated by the Gradle 'init' task.
2+
# https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties
3+
4+
org.gradle.configuration-cache=true
5+
org.gradle.parallel=true
6+
org.gradle.caching=true
7+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# This file was generated by the Gradle 'init' task.
2+
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format
3+
4+
[versions]
5+
guava = "33.4.6-jre"
6+
7+
[libraries]
8+
guava = { module = "com.google.guava:guava", version.ref = "guava" }
44.6 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-9.2.1-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

gradle_workflow/gradlew

Lines changed: 251 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)