how to tell gradle to download all the source jars

后端 未结 6 2048
暖寄归人
暖寄归人 2020-12-04 23:53

Ideally, we would like to add a task for downloading all the source jars for the first level and transitive dependencies of our project. Is there a way to do that?

<
6条回答
  •  -上瘾入骨i
    2020-12-05 00:03

    The eclipse task can be configured with downloadSources. Following is an example of that configuration

    apply plugin: 'java'
    apply plugin: 'eclipse'
    
    eclipse {
        classpath {
           downloadSources=true
        }
    }
    

    So run

    gradle cleanEclipse eclipse
    

    to have it download sources.

提交回复
热议问题