无法使用 Gradle 创建构建

Unable to create build using Gradle

MAC : 10.10.5

Java : 7

Gradle : 3.4.1

创建了一个包含以下内容的 build.gradle 文件

plugins {
  id "org.openbakery.xcode-plugin" version "0.14.5"
}

xcodebuild {
     target  = 'Hello-Gradle'
     scheme  = 'Debug'
}

在一号航站楼 运行

gradle xcodebuild

错误:

配置根项目时出现问题 'Hello-Gradle'。

Could not resolve all files for configuration ':classpath'. Could not download guava.jar (com.google.guava:guava:16.0.1) Could not get resource 'https://plugins.gradle.org/m2/com/google/guava/guava/16.0.1/guava-16.0.1.jar'. Could not HEAD 'https://plugins.gradle.org/m2/com/google/guava/guava/16.0.1/guava-16.0.1.jar'. Received status code 522 from server: Origin Connection Time-out

但是,如果我使用版本 0.11.4,我会得到:

错误:任务“:xcodebuild”执行失败。

No service of type StyledTextOutputFactory available in ProjectScopeServices.

plugins {
  id "org.openbakery.xcode-plugin" version "0.14.5"
}

xcodebuild {
     target = 'Hello-Gradle'

/* If need to differentiate between iOS and android */
     type = 'IOS'             

/* Set ipa file name*/
     ipaFileName = ipaName 

 /* if u wish to create archive its necessary to set simulator as FALSE coz for archive we need DEVICE*/
     simulator = false        
}

构建 IPA 的命令

$ gradle xcodebuild -q makebuild -q archive -Pipa=Test-QA --info

如果您只想针对您的目标进行构建

$ gradle build