2016-09-21 50 views

回答

0

使用任務javadocJarsourceJar

task javadocJar(type: Jar, dependsOn: javadoc) { 
    classifier = 'javadoc' 
    from javadoc.destinationDir 
} 

task sourcesJar(type: Jar, dependsOn: classes) { 
    classifier = 'sources' 
    from sourceSets.main.allSource 
} 

artifacts { 
    archives javadocJar  
    archives sourcesJar 
} 
相關問題