Splitting all output directories in Gradle

后端 未结 4 999
别跟我提以往
别跟我提以往 2021-02-05 02:26

Gradle 4.0 came out yesterday and I updated my project for it.

Now I am getting the following warning:

Gradle now uses separate output directories

4条回答
  •  粉色の甜心
    2021-02-05 02:51

    This is due to the change introduced in Gradle 4.0: it now uses separate output directories if there are multiple language sources.

    To return to the old behaviour and get rid of the warning, insert this into your build.gradle:

    // Change the output directory for the main source set back to the old path sourceSets.main.output.classesDir = new File(buildDir, "classes/main")

    Reference: https://docs.gradle.org/4.0/release-notes.html#multiple-class-directories-for-a-single-source-set

提交回复
热议问题