diff --git a/clients/algoliasearch-client-dart/packages/client_core/LICENSE b/clients/algoliasearch-client-dart/packages/client_core/LICENSE deleted file mode 100644 index 1d81c34423..0000000000 --- a/clients/algoliasearch-client-dart/packages/client_core/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023 Algolia - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/clients/algoliasearch-client-dart/packages/client_insights/LICENSE b/clients/algoliasearch-client-dart/packages/client_insights/LICENSE deleted file mode 100644 index 1d81c34423..0000000000 --- a/clients/algoliasearch-client-dart/packages/client_insights/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023 Algolia - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/LICENSE b/clients/algoliasearch-client-dart/packages/client_recommend/LICENSE deleted file mode 100644 index 1d81c34423..0000000000 --- a/clients/algoliasearch-client-dart/packages/client_recommend/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023 Algolia - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/config/generation.config.mjs b/config/generation.config.mjs index 69f450d9e3..5ef7c84c88 100644 --- a/config/generation.config.mjs +++ b/config/generation.config.mjs @@ -159,4 +159,6 @@ export const patterns = [ 'tests/output/swift/Package.swift', '!tests/output/swift/handwritten/**', '!tests/output/swift/Utils/**', + + 'clients/**/LICENSE' ]; diff --git a/generators/src/main/java/com/algolia/codegen/AlgoliaCSharpGenerator.java b/generators/src/main/java/com/algolia/codegen/AlgoliaCSharpGenerator.java index f7a82dcc24..15672ee230 100644 --- a/generators/src/main/java/com/algolia/codegen/AlgoliaCSharpGenerator.java +++ b/generators/src/main/java/com/algolia/codegen/AlgoliaCSharpGenerator.java @@ -122,6 +122,7 @@ public void processOpts() { supportingFiles.add(new SupportingFile("globaljson.mustache", "../", "global.json")); supportingFiles.add(new SupportingFile("netcore_project.mustache", "Algolia.Search.csproj")); supportingFiles.add(new SupportingFile("Configuration.mustache", "Clients", packageName + "Configuration.cs")); + supportingFiles.add(new SupportingFile("LICENSE", "", "LICENSE")); } /** Escape <> in generic with {} */ diff --git a/generators/src/main/java/com/algolia/codegen/AlgoliaDartGenerator.java b/generators/src/main/java/com/algolia/codegen/AlgoliaDartGenerator.java index 3cb99c75ee..4b4c96814f 100644 --- a/generators/src/main/java/com/algolia/codegen/AlgoliaDartGenerator.java +++ b/generators/src/main/java/com/algolia/codegen/AlgoliaDartGenerator.java @@ -99,6 +99,7 @@ public void processOpts() { supportingFiles.removeIf(file -> file.getTemplateFile().contains("README")); supportingFiles.add(new SupportingFile("version.mustache", srcFolder, "version.dart")); + supportingFiles.add(new SupportingFile("LICENSE", "", "LICENSE")); // Search config additionalProperties.put("isSearchClient", client.equals("search")); diff --git a/generators/src/main/java/com/algolia/codegen/AlgoliaGoGenerator.java b/generators/src/main/java/com/algolia/codegen/AlgoliaGoGenerator.java index c37752efb7..6673768ca0 100644 --- a/generators/src/main/java/com/algolia/codegen/AlgoliaGoGenerator.java +++ b/generators/src/main/java/com/algolia/codegen/AlgoliaGoGenerator.java @@ -52,6 +52,7 @@ public void processOpts() { supportingFiles.clear(); supportingFiles.add(new SupportingFile("configuration.mustache", "", "configuration.go")); supportingFiles.add(new SupportingFile("client.mustache", "", "client.go")); + supportingFiles.add(new SupportingFile("LICENSE", "", "LICENSE")); try { additionalProperties.put("packageVersion", Helpers.getClientConfigField("go", "packageVersion")); diff --git a/generators/src/main/java/com/algolia/codegen/AlgoliaJavaGenerator.java b/generators/src/main/java/com/algolia/codegen/AlgoliaJavaGenerator.java index 6d93c5424f..029bc1d48d 100644 --- a/generators/src/main/java/com/algolia/codegen/AlgoliaJavaGenerator.java +++ b/generators/src/main/java/com/algolia/codegen/AlgoliaJavaGenerator.java @@ -55,6 +55,7 @@ public void processOpts() { supportingFiles.add(new SupportingFile("build_config.mustache", invokerFolder, "BuildConfig.java")); supportingFiles.add(new SupportingFile("gradle.properties.mustache", "", "gradle.properties")); additionalProperties.put("isSearchClient", client.equals("search")); + supportingFiles.add(new SupportingFile("LICENSE", "", "LICENSE")); try { additionalProperties.put("packageVersion", Helpers.getClientConfigField("java", "packageVersion")); diff --git a/generators/src/main/java/com/algolia/codegen/AlgoliaJavascriptGenerator.java b/generators/src/main/java/com/algolia/codegen/AlgoliaJavascriptGenerator.java index c5718756eb..1c40d58e7f 100644 --- a/generators/src/main/java/com/algolia/codegen/AlgoliaJavascriptGenerator.java +++ b/generators/src/main/java/com/algolia/codegen/AlgoliaJavascriptGenerator.java @@ -58,6 +58,7 @@ public void processOpts() { // root export files supportingFiles.add(new SupportingFile("index.mustache", "", "index.js")); supportingFiles.add(new SupportingFile("index.d.mustache", "", "index.d.ts")); + supportingFiles.add(new SupportingFile("LICENSE", "", "LICENSE")); // `client` related files, `algoliasearch` have it's own logic below if (!isAlgoliasearchClient) { diff --git a/generators/src/main/java/com/algolia/codegen/AlgoliaKotlinGenerator.java b/generators/src/main/java/com/algolia/codegen/AlgoliaKotlinGenerator.java index 7e0d7b6b4c..17547ef08c 100644 --- a/generators/src/main/java/com/algolia/codegen/AlgoliaKotlinGenerator.java +++ b/generators/src/main/java/com/algolia/codegen/AlgoliaKotlinGenerator.java @@ -112,6 +112,7 @@ public void processOpts() { supportingFiles.add(new SupportingFile("ApiClient.kt.mustache", apiFolder, "ApiClient.kt")); supportingFiles.add(new SupportingFile("gradle.properties.mustache", "", "gradle.properties")); supportingFiles.add(new SupportingFile("README_BOM.mustache", "client-bom", "README.md")); + supportingFiles.add(new SupportingFile("LICENSE", "", "LICENSE")); additionalProperties.put("packageVersion", Helpers.getClientConfigField("kotlin", "packageVersion")); } diff --git a/generators/src/main/java/com/algolia/codegen/AlgoliaPhpGenerator.java b/generators/src/main/java/com/algolia/codegen/AlgoliaPhpGenerator.java index 5f916bf918..8646d66496 100644 --- a/generators/src/main/java/com/algolia/codegen/AlgoliaPhpGenerator.java +++ b/generators/src/main/java/com/algolia/codegen/AlgoliaPhpGenerator.java @@ -50,6 +50,8 @@ public void processOpts() { supportingFiles.add(new SupportingFile("client_config.mustache", "lib/Configuration", getClientName(client) + "Config.php")); supportingFiles.add(new SupportingFile("Algolia.mustache", "lib", "Algolia.php")); + supportingFiles.add(new SupportingFile("LICENSE", "", "LICENSE")); + additionalProperties.put("isSearchClient", client.equals("search")); additionalProperties.put("configClassname", getClientName(client) + "Config"); diff --git a/generators/src/main/java/com/algolia/codegen/AlgoliaPythonGenerator.java b/generators/src/main/java/com/algolia/codegen/AlgoliaPythonGenerator.java index e288c8127f..03ed21378f 100644 --- a/generators/src/main/java/com/algolia/codegen/AlgoliaPythonGenerator.java +++ b/generators/src/main/java/com/algolia/codegen/AlgoliaPythonGenerator.java @@ -85,6 +85,7 @@ public void processOpts() { supportingFiles.add(new SupportingFile("__init__.mustache", packageName + "/models", "__init__.py")); supportingFiles.add(new SupportingFile("__init__.mustache", "http", "__init__.py")); supportingFiles.add(new SupportingFile("config.mustache", packageName, "config.py")); + supportingFiles.add(new SupportingFile("LICENSE", "", "LICENSE")); } @Override diff --git a/generators/src/main/java/com/algolia/codegen/AlgoliaRubyGenerator.java b/generators/src/main/java/com/algolia/codegen/AlgoliaRubyGenerator.java index 3b3681ffd9..f91f0a608a 100644 --- a/generators/src/main/java/com/algolia/codegen/AlgoliaRubyGenerator.java +++ b/generators/src/main/java/com/algolia/codegen/AlgoliaRubyGenerator.java @@ -42,6 +42,8 @@ public void processOpts() { apiTestTemplateFiles.clear(); modelTestTemplateFiles.clear(); + supportingFiles.add(new SupportingFile("LICENSE", "", "LICENSE")); + // Remove some files we don't want to output or change their paths supportingFiles.removeIf(file -> file.getTemplateFile().equals("gitignore.mustache") || diff --git a/generators/src/main/java/com/algolia/codegen/AlgoliaScalaGenerator.java b/generators/src/main/java/com/algolia/codegen/AlgoliaScalaGenerator.java index 79bea197c8..a434821b16 100644 --- a/generators/src/main/java/com/algolia/codegen/AlgoliaScalaGenerator.java +++ b/generators/src/main/java/com/algolia/codegen/AlgoliaScalaGenerator.java @@ -74,6 +74,7 @@ public void processOpts() { var modelFolder = sourceFolder + File.separator + modelPackage.replace(".", File.separator); supportingFiles.add(new SupportingFile("version.mustache", "", "version.sbt")); supportingFiles.add(new SupportingFile("jsonSupport.mustache", modelFolder, "JsonSupport.scala")); + supportingFiles.add(new SupportingFile("LICENSE", "", "LICENSE")); additionalProperties.put("isSearchClient", client.equals("search")); typeMapping.put("AnyType", "Any"); diff --git a/generators/src/main/java/com/algolia/codegen/AlgoliaSwiftGenerator.java b/generators/src/main/java/com/algolia/codegen/AlgoliaSwiftGenerator.java index ebbb2d4543..648e0bffbc 100644 --- a/generators/src/main/java/com/algolia/codegen/AlgoliaSwiftGenerator.java +++ b/generators/src/main/java/com/algolia/codegen/AlgoliaSwiftGenerator.java @@ -206,6 +206,7 @@ public void processOpts() { supportingFiles.add( new SupportingFile("client_configuration.mustache", sourceFolder, getClientName(CLIENT) + "ClientConfiguration.swift") ); + supportingFiles.add(new SupportingFile("LICENSE", "", "LICENSE")); supportingFiles.add(new SupportingFile("Package.mustache", "Package.swift")); supportingFiles.add(new SupportingFile("podspec.mustache", projectName + ".podspec")); supportingFiles.add( diff --git a/clients/algoliasearch-client-python/LICENSE b/templates/LICENSE similarity index 99% rename from clients/algoliasearch-client-python/LICENSE rename to templates/LICENSE index c3082af2ab..fddf416f92 100644 --- a/clients/algoliasearch-client-python/LICENSE +++ b/templates/LICENSE @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. diff --git a/templates/csharp/LICENSE b/templates/csharp/LICENSE new file mode 120000 index 0000000000..ea5b60640b --- /dev/null +++ b/templates/csharp/LICENSE @@ -0,0 +1 @@ +../LICENSE \ No newline at end of file diff --git a/templates/dart/LICENSE b/templates/dart/LICENSE new file mode 120000 index 0000000000..ea5b60640b --- /dev/null +++ b/templates/dart/LICENSE @@ -0,0 +1 @@ +../LICENSE \ No newline at end of file diff --git a/templates/go/LICENSE b/templates/go/LICENSE new file mode 120000 index 0000000000..ea5b60640b --- /dev/null +++ b/templates/go/LICENSE @@ -0,0 +1 @@ +../LICENSE \ No newline at end of file diff --git a/templates/java/LICENSE b/templates/java/LICENSE new file mode 120000 index 0000000000..ea5b60640b --- /dev/null +++ b/templates/java/LICENSE @@ -0,0 +1 @@ +../LICENSE \ No newline at end of file diff --git a/templates/javascript/clients/LICENSE b/templates/javascript/clients/LICENSE new file mode 120000 index 0000000000..30cff7403d --- /dev/null +++ b/templates/javascript/clients/LICENSE @@ -0,0 +1 @@ +../../LICENSE \ No newline at end of file diff --git a/templates/kotlin/LICENSE b/templates/kotlin/LICENSE new file mode 120000 index 0000000000..ea5b60640b --- /dev/null +++ b/templates/kotlin/LICENSE @@ -0,0 +1 @@ +../LICENSE \ No newline at end of file diff --git a/templates/php/LICENSE b/templates/php/LICENSE new file mode 120000 index 0000000000..ea5b60640b --- /dev/null +++ b/templates/php/LICENSE @@ -0,0 +1 @@ +../LICENSE \ No newline at end of file diff --git a/templates/python/LICENSE b/templates/python/LICENSE new file mode 120000 index 0000000000..ea5b60640b --- /dev/null +++ b/templates/python/LICENSE @@ -0,0 +1 @@ +../LICENSE \ No newline at end of file diff --git a/templates/ruby/LICENSE b/templates/ruby/LICENSE new file mode 120000 index 0000000000..ea5b60640b --- /dev/null +++ b/templates/ruby/LICENSE @@ -0,0 +1 @@ +../LICENSE \ No newline at end of file diff --git a/templates/scala/LICENSE b/templates/scala/LICENSE new file mode 120000 index 0000000000..ea5b60640b --- /dev/null +++ b/templates/scala/LICENSE @@ -0,0 +1 @@ +../LICENSE \ No newline at end of file diff --git a/templates/swift/LICENSE b/templates/swift/LICENSE new file mode 120000 index 0000000000..ea5b60640b --- /dev/null +++ b/templates/swift/LICENSE @@ -0,0 +1 @@ +../LICENSE \ No newline at end of file