Gradle Kotlin DSL:jar 文件中 javadoc 的子目录

我的 build.gradle.kts 目前有以下配置:


tasks.withType<Jar> {

    manifest {

        attributes["Multi-Release"] = "true"

    }

    from(sourceSets["main"].allSource)

    from(sourceSets["test"].allSource)

    from(tasks["javadoc"])

}

当我运行 jar 任务时,生成的 javadoc html 文件包含在导出的 jar 中。但是,我想将 javadoc 包含在一个名为“javadoc”的子目录中。我怎样才能做到这一点,即更改生成的 javadoc 的输出位置?


交互式爱情
浏览 170回答 1
1回答

森林海

我刚刚解决了这个问题:tasks.withType<Jar> {&nbsp; &nbsp; manifest {&nbsp; &nbsp; &nbsp; &nbsp; attributes["Multi-Release"] = "true"&nbsp; &nbsp; }&nbsp; &nbsp; from(sourceSets["main"].allSource)&nbsp; &nbsp; from(sourceSets["test"].allSource)&nbsp; &nbsp; {&nbsp; &nbsp; &nbsp; &nbsp; from(tasks["javadoc"]).into("/javadoc")&nbsp; &nbsp; }}
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java