Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement spotless gradle pre-commit hook #105

Merged
merged 12 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 33 additions & 19 deletions plugins/command-manager/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,41 @@
import org.opensearch.gradle.test.RestIntegTestTask

buildscript {
ext {
opensearch_version = System.getProperty("opensearch.version", "2.16.0")
wazuh_version = System.getProperty("version", "5.0.0")
revision = System.getProperty("revision", "0")
}

repositories {
mavenLocal()
maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" }
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}

dependencies {
classpath "org.opensearch.gradle:build-tools:${opensearch_version}"
configurations.all {
resolutionStrategy {
force("org.eclipse.platform:org.eclipse.core.runtime:4.29.0") // CVE for < 4.29
force("org.eclipse.platform:org.eclipse.core.resources:4.20.0") // CVE for < 4.20
}
}
QU3B1M marked this conversation as resolved.
Show resolved Hide resolved
}
}

plugins {
id "com.diffplug.spotless" version "6.25.0"
}

apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'opensearch.opensearchplugin'
apply plugin: 'opensearch.yaml-rest-test'
apply plugin: 'opensearch.pluginzip'
apply from: 'gradle/formatting.gradle'

def pluginName = 'wazuh-indexer-command-manager'
def pluginDescription = 'The Command Manager plugin handles and distributes commands across your Wazuh environment.'
Expand Down Expand Up @@ -68,6 +98,9 @@ dependencies {
api "org.conscrypt:conscrypt-openjdk-uber:${versions.conscrypt}"
}

// Add the spotlessCheck to gradle check
check.dependsOn spotlessCheck

// This requires an additional Jar not published as part of build-tools
loggerUsageCheck.enabled = false

Expand All @@ -80,25 +113,6 @@ thirdPartyAudit.enabled = false
//Skip checking for third party licenses
dependencyLicenses.enabled = false

buildscript {
ext {
opensearch_version = System.getProperty("opensearch.version", "2.16.0")
wazuh_version = System.getProperty("version", "5.0.0")
revision = System.getProperty("revision", "0")
}

repositories {
mavenLocal()
maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" }
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}

dependencies {
classpath "org.opensearch.gradle:build-tools:${opensearch_version}"
}
}

repositories {
mavenLocal()
maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" }
Expand Down
Loading
Loading