我有2个像图书馆一样的gradle项目。我从git中取出它并且无法构建它。我有错误:
Error:(3, 0) Could not get unknown property 'classes' for root project 'my project' of type org.gradle.api.Project.
并显示此行:
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
full build.gradle
group 'my group'
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
dependencies {
compile 'org.springframework:spring-context:4.3.8.RELEASE'
compile 'com.rabbitmq:amqp-client:4.1.0'
compile 'com.typesafe:config:1.3.1'
compile 'com.typesafe.akka:akka-stream_2.12:2.5.0'
compile 'com.fasterxml.jackson.core:jackson-databind:2.8.8'
compile 'org.slf4j:slf4j-api:1.7.22'
compile 'ch.qos.logback:logback-classic:1.2.1'
testCompile 'junit:junit:4.12'
}