Skip to content

Commit 3ea4024

Browse files
authored
Merge pull request #15 from CodeToTime/fix/formatting
Fix/formatting
2 parents 88bd11f + ad9e0dc commit 3ea4024

File tree

94 files changed

+12696
-11527
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+12696
-11527
lines changed

build.gradle

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ plugins {
55
id 'java'
66
id 'application'
77
id 'com.gradleup.shadow' version '9.3.1'
8-
id("pl.allegro.tech.build.axion-release") version "1.20.1"
8+
id "pl.allegro.tech.build.axion-release" version "1.20.1"
9+
id 'com.diffplug.spotless' version '8.3.0'
10+
id 'checkstyle'
911
}
1012

1113
group = 'com.codetotime'
@@ -78,16 +80,16 @@ tasks.register('generateBuildInfo') {
7880
outputDir.mkdirs()
7981

8082
def outputFile = file("$outputDir/BuildInfo.java")
81-
outputFile.text = """package EPPClient;
83+
outputFile.text = """package com.codetotime.eppclient;
8284
8385
public class BuildInfo {
84-
public static final String BUILD_VERSION = "$buildVersion";
85-
public static final String BUILD_DATE = "$date";
86-
public static final String BUILD_COMPANY = "$buildCompany";
87-
public static final String BUILD_PIVA = "$buildPIVA";
88-
public static final String BUILD_REGISTRAR_TAG = "$buildRegistrarTag";
89-
public static final String BUILD_ORDER = "$buildOrder";
90-
public static final String BUILD_LABEL = "$buildLabel";
86+
public static final String BUILD_VERSION = "$buildVersion";
87+
public static final String BUILD_DATE = "$date";
88+
public static final String BUILD_COMPANY = "$buildCompany";
89+
public static final String BUILD_PIVA = "$buildPIVA";
90+
public static final String BUILD_REGISTRAR_TAG = "$buildRegistrarTag";
91+
public static final String BUILD_ORDER = "$buildOrder";
92+
public static final String BUILD_LABEL = "$buildLabel";
9193
}
9294
"""
9395
}
@@ -108,3 +110,29 @@ jar {
108110
attributes('Main-Class': application.mainClass)
109111
}
110112
}
113+
114+
checkstyle {
115+
toolVersion = '13.3.0'
116+
configFile = file("${rootDir}/config/checkstyle/google_checks.xml")
117+
ignoreFailures = false
118+
maxWarnings = 0
119+
showViolations = true
120+
}
121+
122+
spotless {
123+
java {
124+
googleJavaFormat('1.35.0') // formats to Google style automatically
125+
removeUnusedImports()
126+
trimTrailingWhitespace()
127+
endWithNewline()
128+
}
129+
}
130+
131+
tasks.withType(Checkstyle).configureEach {
132+
reports {
133+
xml.required = true
134+
html.required = true
135+
sarif.required = true
136+
}
137+
classpath = files() // don't need compiled classes to check style
138+
}

config/checkstyle/google_checks.xml

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

src/main/java/EPPClient/InfoDialog.java

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

src/main/java/EPPClient/UpdateChecker.java

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

0 commit comments

Comments
 (0)