错误:(3,0)无法获取根项目的未知属性“类”..... Gradle

时间:2017-05-27 06:06:24

标签: gradle build.gradle

我有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'
}

0 个答案:

没有答案