diff --git a/formatter/license-header.txt b/formatter/license-header.txt new file mode 100644 index 00000000..df0fa3f7 --- /dev/null +++ b/formatter/license-header.txt @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ \ No newline at end of file diff --git a/gradle/formatting.gradle b/gradle/formatting.gradle index d6247975..538c0d15 100644 --- a/gradle/formatting.gradle +++ b/gradle/formatting.gradle @@ -22,5 +22,10 @@ allprojects { paddedCell() } } + format("license", { + licenseHeaderFile("${rootProject.file("formatter/license-header.txt")}", "package "); + target("src/main/java/**/*.java") + targetExclude("**/netty4/*") + }) } -} \ No newline at end of file +} diff --git a/src/main/java/org/opensearch/sdk/ActionListener.java b/src/main/java/org/opensearch/sdk/ActionListener.java index 33d834f3..75b9ee2e 100644 --- a/src/main/java/org/opensearch/sdk/ActionListener.java +++ b/src/main/java/org/opensearch/sdk/ActionListener.java @@ -5,7 +5,6 @@ * this file be licensed under the Apache-2.0 license or a * compatible open source license. */ - package org.opensearch.sdk; import org.opensearch.common.SuppressForbidden; diff --git a/src/main/java/org/opensearch/sdk/ClusterSettingsResponseHandler.java b/src/main/java/org/opensearch/sdk/ClusterSettingsResponseHandler.java index c1657a96..157ec99e 100644 --- a/src/main/java/org/opensearch/sdk/ClusterSettingsResponseHandler.java +++ b/src/main/java/org/opensearch/sdk/ClusterSettingsResponseHandler.java @@ -1,3 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearch.sdk; import org.apache.logging.log4j.LogManager; diff --git a/src/main/java/org/opensearch/sdk/ClusterStateResponseHandler.java b/src/main/java/org/opensearch/sdk/ClusterStateResponseHandler.java index f1b8737e..8375f64f 100644 --- a/src/main/java/org/opensearch/sdk/ClusterStateResponseHandler.java +++ b/src/main/java/org/opensearch/sdk/ClusterStateResponseHandler.java @@ -1,3 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearch.sdk; import org.apache.logging.log4j.LogManager; diff --git a/src/main/java/org/opensearch/sdk/ExtensionSettings.java b/src/main/java/org/opensearch/sdk/ExtensionSettings.java index 2ab7f8dc..b69497a5 100644 --- a/src/main/java/org/opensearch/sdk/ExtensionSettings.java +++ b/src/main/java/org/opensearch/sdk/ExtensionSettings.java @@ -4,11 +4,7 @@ * The OpenSearch Contributors require contributions made to * this file be licensed under the Apache-2.0 license or a * compatible open source license. - * - * Modifications Copyright OpenSearch Contributors. See - * GitHub history for details. */ - package org.opensearch.sdk; /** diff --git a/src/main/java/org/opensearch/sdk/ExtensionsRunner.java b/src/main/java/org/opensearch/sdk/ExtensionsRunner.java index 228f49b5..b022495e 100644 --- a/src/main/java/org/opensearch/sdk/ExtensionsRunner.java +++ b/src/main/java/org/opensearch/sdk/ExtensionsRunner.java @@ -4,11 +4,7 @@ * The OpenSearch Contributors require contributions made to * this file be licensed under the Apache-2.0 license or a * compatible open source license. - * - * Modifications Copyright OpenSearch Contributors. See - * GitHub history for details. */ - package org.opensearch.sdk; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/src/main/java/org/opensearch/sdk/LocalNodeResponseHandler.java b/src/main/java/org/opensearch/sdk/LocalNodeResponseHandler.java index 8a16056b..8df34580 100644 --- a/src/main/java/org/opensearch/sdk/LocalNodeResponseHandler.java +++ b/src/main/java/org/opensearch/sdk/LocalNodeResponseHandler.java @@ -1,3 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearch.sdk; import org.apache.logging.log4j.LogManager;