configurations{ swift { canBeConsumed = false canBeResolved = true } } dependencies { swift project(path: ':protobuf', configuration: 'swift') } task copySwiftCode(type: Copy, dependsOn: configurations.swift) { // Copy python protobuf code from proto project. from zipTree(configurations.swift.asPath) into './CarController/CarController' }