diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index 33d07f3b..80cba70a 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -6,7 +6,7 @@
"version": "17",
"jdkDistro": "ms",
"installGradle": "true",
- "gradleVersion": "latest"
+ "gradleVersion": "8.7"
},
"ghcr.io/devcontainers/features/node:1": {}
},
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index da17c84d..92fe071e 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -15,6 +15,14 @@ jobs:
with:
node-version: 20
- uses: gradle/actions/setup-gradle@v3
+ with:
+ gradle-version: 8.7
+
+ - name: Display Tools Versions
+ run: |
+ gradle -v
+ echo "Node $(node -v)"
+ echo "NPM $(npm -v)"
- name: Create Release
if: github.ref == 'refs/heads/main'
@@ -26,7 +34,7 @@ jobs:
run: npm version from-git --no-git-tag-version --prefix docs
- name: Test dRAGon
- run: gradle npmInstall npmLint test
+ run: gradle npmInstall npmLint checkstyleMain checkstyleTest test
- name: Build Documentation
run: npm install --prefix docs && npm run build --prefix docs
diff --git a/backend/build.gradle b/backend/build.gradle
index d0e28f91..c5160a61 100644
--- a/backend/build.gradle
+++ b/backend/build.gradle
@@ -1,9 +1,11 @@
plugins {
id 'java'
+ id 'java-library'
+ id 'checkstyle'
id 'application'
id 'org.springframework.boot' version '3.2.5'
id 'io.spring.dependency-management' version '1.1.4'
- id "org.springdoc.openapi-gradle-plugin" version "1.8.0"
+ id 'org.springdoc.openapi-gradle-plugin' version '1.8.0'
}
group = 'ai'
@@ -54,6 +56,13 @@ openApi {
}
}
+checkstyle {
+ toolVersion '10.16.0'
+ config = rootProject.resources.text.fromFile('backend/checkstyle.xml')
+ ignoreFailures = false
+ maxWarnings = 0
+}
+
bootJar {
manifest {
attributes(
diff --git a/backend/checkstyle.xml b/backend/checkstyle.xml
new file mode 100644
index 00000000..7ed854da
--- /dev/null
+++ b/backend/checkstyle.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/backend/src/main/java/ai/dragon/DragonApplication.java b/backend/src/main/java/ai/dragon/DragonApplication.java
index 3a8c467e..8b98598c 100644
--- a/backend/src/main/java/ai/dragon/DragonApplication.java
+++ b/backend/src/main/java/ai/dragon/DragonApplication.java
@@ -5,7 +5,7 @@
@SpringBootApplication
public class DragonApplication {
- public static void main(String[] args) {
- SpringApplication.run(DragonApplication.class, args);
- }
+ public static void main(String[] args) {
+ SpringApplication.run(DragonApplication.class, args);
+ }
}
diff --git a/backend/src/main/java/ai/dragon/component/DirectoryStructureComponent.java b/backend/src/main/java/ai/dragon/component/DirectoryStructureComponent.java
index ca861b74..3103406f 100644
--- a/backend/src/main/java/ai/dragon/component/DirectoryStructureComponent.java
+++ b/backend/src/main/java/ai/dragon/component/DirectoryStructureComponent.java
@@ -71,4 +71,4 @@ private void createDatabaseDirectory() {
logger.debug("Database directory already exists : " + databaseDirectory);
}
}
-}
\ No newline at end of file
+}
diff --git a/backend/src/main/java/ai/dragon/entity/ProviderEntity.java b/backend/src/main/java/ai/dragon/entity/ProviderEntity.java
index c03f216a..ec95f4e2 100644
--- a/backend/src/main/java/ai/dragon/entity/ProviderEntity.java
+++ b/backend/src/main/java/ai/dragon/entity/ProviderEntity.java
@@ -32,7 +32,9 @@ public class ProviderEntity implements IAbstractEntity {
@Schema(description = "Type of the Provider")
private ProviderType type;
- @Schema(description = "Headers to be sent to the Provider (if applicable) in the form of key-value pairs. Could be used for authentication with API keys, tokens, etc.")
+ @Schema(description = """
+ Headers to be sent to the Provider (if applicable) in the form of key-value pairs.
+ Could be used for authentication with API keys, tokens, etc.""")
private Map httpHeaders;
public ProviderEntity() {
diff --git a/backend/src/test/java/ai/dragon/DragonApplicationTests.java b/backend/src/test/java/ai/dragon/DragonApplicationTests.java
index 771cfa54..60896218 100644
--- a/backend/src/test/java/ai/dragon/DragonApplicationTests.java
+++ b/backend/src/test/java/ai/dragon/DragonApplicationTests.java
@@ -5,9 +5,7 @@
@SpringBootTest
class DragonApplicationTests {
-
- @Test
- void contextLoads() {
- }
-
+ @Test
+ void contextLoads() {
+ }
}