Skip to content

Commit 1e0b48d

Browse files
committed
Initial Commit
0 parents  commit 1e0b48d

File tree

13 files changed

+1123
-0
lines changed

13 files changed

+1123
-0
lines changed

.github/workflows/gradle.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Java CI
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v1
12+
- name: Set up JDK 12
13+
uses: actions/setup-java@v1
14+
with:
15+
java-version: 12
16+
- name: Build with Gradle
17+
run: ./gradlew build
18+
- uses: actions/upload-artifact@master
19+
with:
20+
name: build
21+
path: ./build/distributions/

.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Compiled class file
2+
*.class
3+
4+
# Log file
5+
*.log
6+
7+
# BlueJ files
8+
*.ctxt
9+
10+
# Mobile Tools for Java (J2ME)
11+
.mtj.tmp/
12+
13+
# Package Files #
14+
*.jar
15+
*.war
16+
*.nar
17+
*.ear
18+
*.zip
19+
*.tar.gz
20+
*.rar
21+
22+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
23+
hs_err_pid*
24+
25+
26+
build/
27+
.gradle/

LICENSE

Lines changed: 661 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Java-SF

build.gradle.kts

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
import de.undercouch.gradle.tasks.download.Download
2+
3+
plugins {
4+
java
5+
application
6+
id("com.github.spotbugs") version "2.0.0"
7+
checkstyle
8+
pmd
9+
id("de.undercouch.download") version "4.0.0"
10+
}
11+
12+
repositories {
13+
jcenter()
14+
}
15+
16+
dependencies {
17+
testImplementation("org.junit.jupiter:junit-jupiter-api:5.3.1")
18+
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.3.1")
19+
}
20+
21+
application {
22+
mainClassName = "jsf.App"
23+
}
24+
25+
java {
26+
sourceCompatibility = JavaVersion.VERSION_12
27+
}
28+
29+
tasks.withType<Jar> {
30+
manifest {
31+
attributes["Main-Class"] = application.mainClassName
32+
}
33+
34+
from(configurations.runtime.get().map { if (it.isDirectory) it else zipTree(it) })
35+
}
36+
37+
task<Download>("download-google-style") {
38+
src("https://raw.githubusercontent.com/checkstyle/checkstyle/master/src/main/resources/google_checks.xml")
39+
dest(File("config/checkstyle/checkstyle.xml"))
40+
overwrite(false)
41+
}
42+
43+
tasks {
44+
"checkstyleMain" {
45+
dependsOn("download-google-style")
46+
}
47+
}
48+
49+
checkstyle {
50+
toolVersion = "8.24"
51+
}
52+
53+
pmd {
54+
ruleSetFiles = files("config/pmd/ruleSet.xml")
55+
}
56+
57+
spotbugs {
58+
effort = "max"
59+
}

config/pmd/ruleSet.xml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0"?>
2+
3+
<ruleset name="Custom Rules"
4+
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
5+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6+
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd">
7+
8+
<description>
9+
My custom rules
10+
</description>
11+
12+
<rule ref="category/java/codestyle.xml">
13+
<exclude name="ShortClassName"/>
14+
<exclude name="AtLeastOneConstructor"/>
15+
</rule>
16+
<rule ref="category/java/bestpractices.xml" >
17+
<exclude name="SystemPrintln"/>
18+
</rule>
19+
<rule ref="category/java/design.xml"/>
20+
<rule ref="category/java/errorprone.xml"/>
21+
<rule ref="category/java/multithreading.xml"/>
22+
<rule ref="category/java/performance.xml"/>
23+
<rule ref="category/java/security.xml"/>
24+
25+
</ruleset>

gradle/wrapper/gradle-wrapper.jar

54.3 KB
Binary file not shown.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

gradlew

Lines changed: 188 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)