Pochatkin commented on code in PR #3180: URL: https://github.com/apache/ignite-3/pull/3180#discussion_r1490851146
########## packaging/client/java/build.gradle: ########## @@ -0,0 +1,128 @@ +/* + * 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 'distribution' + id 'signing' + alias(libs.plugins.nebula) + alias(libs.plugins.checksum) +} + +import org.gradle.crypto.checksum.Checksum + +configurations { + javaClient { + attributes.attribute(Attribute.of("org.gradle.jvm.environment", String), "standard-jvm") + } +} + +def igniteJavaClient = project(':ignite-client') + +dependencies { + javaClient(igniteJavaClient) +} + +tasks.register('createChecksums', Checksum) { + dependsOn distZip + + inputFiles.from distZip.outputs.files + checksumAlgorithm = Checksum.Algorithm.SHA512 +} + +def tokens = [ + PRODUCT_NAME : 'ignite3-java-client', + LIB_JAR : "${igniteJavaClient.name}-${igniteJavaClient.version}.jar".toString(), +] + + +// ZIP packaging +distributions { + main { + distributionBaseName = tokens.PRODUCT_NAME + contents { + into('') { + from "$rootDir/LICENSE" + from "$rootDir/NOTICE" + } + into('lib') { + from configurations.javaClient + } + } + } +} + +// --- ZIP packaging --- // +configurations { + javaClientZip { + canBeConsumed = true + canBeResolved = false + } +} + +artifacts { + javaClientZip(distZip) +} + +// Explicitly create task so that the resulting artifact is not added to the configuration +def signJavaClientZip = tasks.register('signJavaClientZip', Sign) { + sign configurations.javaClientZip +} + +// --- DEB/RPM packaging --- // +def linuxTokens = tokens + [ + LIB_DIR : '/usr/lib/ignite3-java-client' +] + +ospackage { + license "ASL 2.0" + packageName linuxTokens.PRODUCT_NAME + packageGroup "Development/Libraries" + url "https://ignite.apache.org" + packageDescription "This package will install Apache Ignite Java Client" + os LINUX + user 'root' + + into(linuxTokens.LIB_DIR) { + from configurations.javaClient + } +} + +buildDeb { + signingKeyId = project.findProperty("signing.keyId") + signingKeyPassphrase = project.findProperty("signing.password") + signingKeyRingFile = project.hasProperty("signing.secretKeyRingFile") ? file(project.property("signing.secretKeyRingFile")) : null +} + + +// --- release setup --- // +configurations { + javaClientRelease { + canBeConsumed = true + canBeResolved = false + } +} + +if (project.hasProperty('prepareRelease')) { + artifacts { + javaClientRelease(file("$buildDir/distributions")) { + builtBy signJavaClientZip, buildDeb, buildRpm + } + javaClientRelease(file("$buildDir/checksums")) { + builtBy createChecksums + } + } +} Review Comment: Empty line eof ########## packaging/client/dotnet/build.gradle: ########## @@ -0,0 +1,115 @@ +import org.gradle.crypto.checksum.Checksum + +/* + * 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 'distribution' + id 'signing' + alias(libs.plugins.nebula) + alias(libs.plugins.checksum) +} + +configurations { + dotNetClient +} + +dependencies { + dotNetClient(project(path: ":platforms", configuration: "dotNet")) +} + +def tokens = [ + LIB_DIR : "/usr/lib/ignite3-dotnet-client", +] + +configurations { + dotNetClientZip { + canBeConsumed = true + canBeResolved = false + } +} + +artifacts { + dotNetClientZip(distZip) +} + +distributions { + main { + distributionBaseName = 'ignite3-dotnet-client' + contents { + into('') { + from "$rootDir/LICENSE" + from "$rootDir/NOTICE" + } + + into('lib') { + from configurations.dotNetClient + } + } + } +} + +distZip { + onlyIf { + project.hasProperty('platforms.enable') + } +} + +// Explicitly create task so that the resulting artifact is not added to the configuration +def signDotNetClientZip = tasks.register('signDotNetClientZip', Sign) { + sign configurations.dotNetClientZip +} + + +ospackage { + license "ASL 2.0" + packageName "ignite3-dotnet-client" + packageGroup "Development/Libraries" + url "https://ignite.apache.org" + packageDescription "This package will install Apache Ignite 3 client library for .NET" + os LINUX + + into(tokens.LIB_DIR) { + from configurations.dotNetClient + } +} + +buildRpm { + onlyIf { + project.hasProperty('platforms.enable') + } +} + +buildDeb { + onlyIf { + project.hasProperty('platforms.enable') + } +} + + +// --- release setup --- // +tasks.register('createChecksums', Checksum) { + onlyIf { + project.hasProperty('platforms.enable') + } + dependsOn distZip + + inputFiles.from distZip.outputs.files + checksumAlgorithm = Checksum.Algorithm.SHA512 +} + +distZip.finalizedBy(createChecksums) Review Comment: Empty line eof ########## packaging/client/cpp/build.gradle: ########## @@ -0,0 +1,124 @@ +import org.gradle.crypto.checksum.Checksum + +/* + * 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 'distribution' + id 'signing' + alias(libs.plugins.nebula) + alias(libs.plugins.checksum) +} + +configurations { + cppClient + cppClientHeaders +} + +dependencies { + cppClient(project(path: ":platforms", configuration: "cppClient")) + cppClientHeaders(project(path: ":platforms", configuration: "cppClientHeaders")) +} + +def tokens = [ + LIB_DIR : "/usr/lib", + INCLUDE_DIR : "/usr/include" +] + +configurations { + cppClientZip { + canBeConsumed = true + canBeResolved = false + } +} + +artifacts { + cppClientZip(distZip) +} + +distributions { + main { + distributionBaseName = 'ignite3-client' + contents { + into('') { + from "$rootDir/LICENSE" + from "$rootDir/NOTICE" + } + + into('lib') { + from configurations.cppClient + } + into('include') { + from configurations.cppClientHeaders + } + } + } +} + +distZip { + onlyIf { + project.hasProperty('platforms.enable') + } +} + +// Explicitly create task so that the resulting artifact is not added to the configuration +def signCppClientZip = tasks.register('signCppClientZip', Sign) { + sign configurations.cppClientZip +} + + +ospackage { + license "ASL 2.0" + packageName "ignite3-client" + packageGroup "Development/Libraries" + url "https://ignite.apache.org" + packageDescription "This package will install Apache Ignite 3 client library" + os LINUX + + into(tokens.LIB_DIR) { + from configurations.cppClient + } + into(tokens.INCLUDE_DIR) { + from configurations.cppClientHeaders + } +} + +buildRpm { + onlyIf { + project.hasProperty('platforms.enable') + } +} + +buildDeb { + onlyIf { + project.hasProperty('platforms.enable') + } +} + +// --- release setup --- // +tasks.register('createChecksums', Checksum) { + onlyIf { + project.hasProperty('platforms.enable') + } + + dependsOn distZip + + inputFiles.from distZip.outputs.files + checksumAlgorithm = Checksum.Algorithm.SHA512 +} + +distZip.finalizedBy(createChecksums) Review Comment: Empty line eof. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
