44 * SPDX-License-Identifier: Apache-2.0
55 */
66
7- buildscript {
8- repositories {
9- maven { url " https://oss.sonatype.org/content/repositories/snapshots" }
10- maven { url " https://www.jitpack.io" }
11- mavenCentral()
12- gradlePluginPortal()
13- }
14- dependencies {
15- classpath ' com.bmuschko:gradle-docker-plugin:9.4.0'
16- }
7+ plugins {
8+ id ' com.bmuschko.docker-remote-api' version ' 9.4.0'
179}
1810
19- apply plugin : ' com.bmuschko.docker-remote-api'
11+ repositories {
12+ maven { url " https://oss.sonatype.org/content/repositories/snapshots" }
13+ maven { url " https://www.jitpack.io" }
14+ mavenCentral()
15+ }
2016
2117import com.bmuschko.gradle.docker.tasks.image.*
2218
23- task copyLib ( type : Copy ) {
19+ tasks . register( ' copyLib ' , Copy ) {
2420 dependsOn ' :fabric-chaincode-shim:build'
2521 from project(' :fabric-chaincode-shim' ). configurations. runtimeClasspath
2622 into(' build/distributions/chaincode-java/lib' )
2723}
2824
29- task copyShimJar ( type : Copy ) {
25+ tasks . register( ' copyShimJar ' , Copy ) {
3026 dependsOn copyLib
3127 from project(' :fabric-chaincode-shim' ). jar
3228 into(' build/distributions/chaincode-java/lib' )
3329}
3430
35- task copyStartScript ( type : Copy ) {
31+ tasks . register( ' copyStartScript ' , Copy ) {
3632 dependsOn copyShimJar
37- from (' start' )
38- into (' build/distributions/chaincode-java' )
33+ from(' start' )
34+ into(' build/distributions/chaincode-java' )
3935}
4036
41- task copyBuildScript ( type : Copy ) {
37+ tasks . register( ' copyBuildScript ' , Copy ) {
4238 dependsOn copyStartScript
43- from (' build.sh' )
44- into (' build/distributions/chaincode-java' )
39+ from(' build.sh' )
40+ into(' build/distributions/chaincode-java' )
4541}
4642
47- task copyAllDeps ( type : Copy ) {
43+ tasks . register( ' copyAllDeps ' , Copy ) {
4844 dependsOn copyBuildScript
4945 copy {
5046 from project(' :fabric-chaincode-shim' ). getProjectDir()
@@ -62,7 +58,7 @@ task copyAllDeps(type: Copy) {
6258 }
6359}
6460
65- task buildImage ( type : DockerBuildImage ) {
61+ tasks . register( ' buildImage ' , DockerBuildImage ) {
6662 dependsOn copyAllDeps
6763 inputDir = project. file(' Dockerfile' ). parentFile
6864 images = [' hyperledger/fabric-javaenv' , ' hyperledger/fabric-javaenv:2.5' , ' hyperledger/fabric-javaenv:amd64-2.5.6' , ' hyperledger/fabric-javaenv:amd64-latest' ]
0 commit comments