dant3 commented on code in PR #3180: URL: https://github.com/apache/ignite-3/pull/3180#discussion_r1497423146
########## 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: This one already have it -- 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]
