| /* |
| * Licensed to the Apache Software Foundation (ASF) under one or more |
| * contributor license agreements. See the NOTICE file distributed with |
| * this work for additional information regarding copyright ownership. |
| * The ASF licenses this file to You under the Apache License, Version 2.0 |
| * (the "License"); you may not use this file except in compliance with |
| * the License. You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| plugins { |
| id 'signing' |
| alias(libs.plugins.checksum) |
| alias(libs.plugins.cmake) |
| } |
| |
| import org.gradle.crypto.checksum.Checksum |
| |
| task copyNativeLibs(type: Copy) { |
| include "**/*.so" |
| from("$rootDir/modules/platforms/cpp") |
| into("$buildDir/classes/") |
| } |
| |
| cmake { |
| workingFolder=file("$buildDir/cpp") |
| sourceFolder=file("$projectDir/cpp") |
| generator='Unix Makefiles' |
| buildConfig='Release' |
| buildTarget='install' |
| } |
| |
| task buildNuGet(type: Exec) { |
| workingDir "$rootDir/modules/platforms/dotnet" |
| |
| commandLine "dotnet", "pack", "Apache.Ignite", |
| "--configuration", "Release", |
| "--include-source", |
| "--output", "$buildDir/nupkg" |
| "/p:Version=${project.version}" |
| } |
| |
| task zipNuGet(type: Zip) { |
| archiveName "apache-ignite-${project.version}-nuget.zip" |
| |
| from ("$buildDir/nupkg") { |
| include "*.nupkg" |
| include "*.snupkg" |
| } |
| |
| dependsOn buildNuGet |
| } |
| |
| task zipCppClient(type: Zip) { |
| archiveName "apache-ignite-${project.version}-cpp.zip" |
| |
| from ("$projectDir/cpp") { |
| exclude "CMakeFiles" |
| exclude "pom.xml" |
| exclude "StyleGuide.md" |
| exclude ".clang-tidy" |
| } |
| } |
| |
| task createChecksums(type: Checksum) { |
| dependsOn zipCppClient, zipNuGet |
| //TODO: remove distribution name hard code IGNITE-18092 |
| files = files("${buildDir}/distributions/apache-ignite-${project.version}-cpp.zip", |
| "${buildDir}/distributions/apache-ignite-${project.version}-nuget.zip") |
| outputDir = new File("${buildDir}/distributions") |
| algorithm = Checksum.Algorithm.SHA512 |
| } |
| |
| task buildAndSignNuGetZip(type: Sign) { |
| sign zipNuGet |
| } |
| |
| task buildAndSignCppClient(type: Sign) { |
| dependsOn createChecksums |
| sign zipCppClient |
| } |