我在 java 代码中使用 apollo graphql 客户端。我的毕业文件是
plugins {
id 'org.springframework.boot' version '2.2.6.RELEASE'
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
id 'java'
}
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
maven {
url 'http://dl.bintray.com/apollographql/android'
}
}
dependencies {
implementation "com.apollographql.apollo:apollo-android-support:1.0.0"
implementation "com.apollographql.apollo:apollo-runtime:1.0.0"
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
}
test {
useJUnitPlatform()
}
我遵循了https://github.com/apollographql/apollo-android中提到的文档 我在第 4 步和第 5 步卡住了。无法添加
generateKotlinModels.set(false)
}
在 gradle 文件中并在执行命令 gradlew generateApollo 时出现错误,因为在根项目“testProject”中找不到任务“generateApolloSources”
谁能帮忙