Change output directory of generated code in gradle

前端 未结 3 979
名媛妹妹
名媛妹妹 2021-02-19 03:32

Project contains annotation processor which generates java code during compilation. By default, gradle outputs generated source files into build/classes directory.

3条回答
  •  忘掉有多难
    2021-02-19 04:25

    Simply specify value for project.buildDir property in your build.gradle file:

    project.buildDir = '/gen/main/java'
    

    This will put all generated build files to the /gen/main/java folder.

提交回复
热议问题